Diff for scripts/perl/filesystem/disk-usage.pl between version 1.3 and 1.4
| version 1.3, 2006/03/15 08:34:32 |
version 1.4, 2006/08/31 06:48:24 |
|
|
| # perl disk-usage.pl [/dev/hda1] [/dev/md3] |
# perl disk-usage.pl [/dev/hda1] [/dev/md3] |
| # |
# |
| |
|
| # $Platon: scripts/perl/filesystem/disk-usage.pl,v 1.2 2005/09/28 22:24:09 rajo Exp $ |
# $Platon: scripts/perl/filesystem/disk-usage.pl,v 1.3 2006-03-15 08:34:32 rajo Exp $ |
| |
|
| use strict; |
use strict; |
| use Data::Dumper; |
use Data::Dumper; |
|
|
| foreach my $user (sort keys %$user_stat) { |
foreach my $user (sort keys %$user_stat) { |
| print "\n$user\t| "; |
print "\n$user\t| "; |
| foreach my $filesystem (@fs_list) { |
foreach my $filesystem (@fs_list) { |
| printf("%04.2f\t", 100 * $user_stat->{$user}->{$filesystem}->{blocks} / $glob_stat->{$filesystem}->{blocks}); |
printf("%04.2f\t", |
| #printf("%04.2f\t|\t", 100 * $user_stat->{$user}->{$filesystem}->{files} / $glob_stat->{$filesystem}->{files}); |
($glob_stat->{$filesystem}->{blocks} == 0 |
| |
? 00.00 |
| |
: 100 * $user_stat->{$user}->{$filesystem}->{blocks} / $glob_stat->{$filesystem}->{blocks}) |
| |
); |
| } |
} |
| } |
} |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|