Increased width of zfs filesystem column. Output sorted by filesystem now.
authorAlan J. Pippin <ajp@pippins.net>
Sun, 2 Mar 2008 15:17:38 +0000 (08:17 -0700)
committerAlan J. Pippin <ajp@pippins.net>
Sun, 2 Mar 2008 15:17:38 +0000 (08:17 -0700)
zfs-snapshot-totals

index 53bcd7b20029a3f4050b85a0000a97b81ba4e86d..09abb7457660aa3f4e4b967bad9afea27fcb78a2 100755 (executable)
@@ -29,18 +29,18 @@ foreach $snapshot (@snapshots)
   }
 }
 
   }
 }
 
-printf "%-20s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
-printf "%-20s %-15s %-10s\n","--","--","--";
-foreach $key (keys %totals)
+printf "%-30s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
+printf "%-30s %-15s %-10s\n","--","--","--";
+foreach $key (sort keys %totals)
 {
   $size = $totals{$key}{size};
   $total_size += $size;
   $total_snapshots += $totals{$key}{snapshots};
   $size = &adjust_size($size);
 {
   $size = $totals{$key}{size};
   $total_size += $size;
   $total_snapshots += $totals{$key}{snapshots};
   $size = &adjust_size($size);
-  printf "%-20s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
+  printf "%-30s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
 }
 
 $total_size = &adjust_size($total_size);
 }
 
 $total_size = &adjust_size($total_size);
-printf "%-20s %-15s %-10s\n","--","--","--";
-printf "%-20s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;
+printf "%-30s %-15s %-10s\n","--","--","--";
+printf "%-30s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;