Blame contrib/diskmon/showdisk.pl
|
Packit |
667938 |
#!/usr/bin/perl
|
|
Packit |
667938 |
# Displays disk info to the hosts that connect to it.
|
|
Packit |
667938 |
#
|
|
Packit |
667938 |
# No command line options, just put it in /etc/inetd.conf as shown in
|
|
Packit |
667938 |
# the README file.
|
|
Packit |
667938 |
#
|
|
Packit |
667938 |
# By Steven Micallef <smic@wire.net.au> on the 24/4/1999.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
foreach $_ (`df -k | grep -v "Filesystem"`)
|
|
Packit |
667938 |
{
|
|
Packit |
667938 |
($device, $size, $used, $free, $percent, $mount) = split(/\s+/);
|
|
Packit |
667938 |
chop($percent);
|
|
Packit |
667938 |
print "$percent\n";
|
|
Packit |
667938 |
}
|