showdisk.pl
Upload User: shbosideng
Upload Date: 2013-05-04
Package Size: 1555k
Code Size: 0k
Category:

SNMP

Development Platform:

C/C++

  1. #!/usr/bin/perl
  2. # Displays disk info to the hosts that connect to it.
  3. #
  4. # No command line options, just put it in /etc/inetd.conf as shown in
  5. # the README file.
  6. #
  7. # By Steven Micallef <smic@wire.net.au> on the 24/4/1999.
  8. foreach $_ (`df -k | grep -v "Filesystem"`)
  9. {
  10.   ($device, $size, $used, $free, $percent, $mount) = split(/s+/);
  11.   chop($percent);
  12.   print "$percentn";
  13. }