Changeset 17547 for trunk/Nebulous/bin/neb-df
- Timestamp:
- May 6, 2008, 2:33:18 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/bin/neb-df (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/bin/neb-df
r17454 r17547 3 3 # Copyright (C) 2007 Joshua Hoblitt 4 4 # 5 # $Id: neb-df,v 1. 5 2008-04-18 03:12:25jhoblitt Exp $5 # $Id: neb-df,v 1.6 2008-05-07 00:33:18 jhoblitt Exp $ 6 6 7 7 use strict; … … 42 42 print "Filesystem 1K-blocks Used Available Use% Mounted on\n"; 43 43 44 my $total_total = 0; 45 my $total_used = 0; 44 46 foreach my $row (@$stats) { 45 47 my %vol; … … 49 51 my $path = $vol{path}; 50 52 my $total = $vol{total}; 53 $total_total += $total; 51 54 my $used = $vol{used}; 55 $total_used += $used; 52 56 my $available = $total - $used; 53 57 my $usedper = ($used / $total) * 100; … … 80 84 } 81 85 86 my $total_available = $total_total - $total_used; 87 my $total_usedper = ($total_used / $total_total) * 100; 88 89 # summary 90 printf ("%s\n%20s", "/summmary_of_all_volumes", ""); 91 printf(" %*s %*s %*s %*.0f%% %s\n", 92 9, 93 $total_total, 94 9, 95 $total_used, 96 9, 97 $total_available, 98 3, 99 $total_usedper, 100 "/total", 101 ); 102 82 103 __END__ 83 104
Note:
See TracChangeset
for help on using the changeset viewer.
