projects
/
zfs-nexenta
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
db34581
)
Increased width of zfs filesystem column. Output sorted by filesystem now.
author
Alan J. Pippin
<ajp@pippins.net>
Sun, 2 Mar 2008 15:17:38 +0000
(08:17 -0700)
committer
Alan J. Pippin
<ajp@pippins.net>
Sun, 2 Mar 2008 15:17:38 +0000
(08:17 -0700)
zfs-snapshot-totals
patch
|
blob
|
history
diff --git
a/zfs-snapshot-totals
b/zfs-snapshot-totals
index 53bcd7b20029a3f4050b85a0000a97b81ba4e86d..09abb7457660aa3f4e4b967bad9afea27fcb78a2 100755
(executable)
--- a/
zfs-snapshot-totals
+++ b/
zfs-snapshot-totals
@@
-29,18
+29,18
@@
foreach $snapshot (@snapshots)
}
}
}
}
-printf "%-
2
0s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
-printf "%-
2
0s %-15s %-10s\n","--","--","--";
-foreach $key (keys %totals)
+printf "%-
3
0s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
+printf "%-
3
0s %-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 "%-
2
0s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
+ printf "%-
3
0s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
}
$total_size = &adjust_size($total_size);
}
$total_size = &adjust_size($total_size);
-printf "%-
2
0s %-15s %-10s\n","--","--","--";
-printf "%-
2
0s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;
+printf "%-
3
0s %-15s %-10s\n","--","--","--";
+printf "%-
3
0s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;