#!/usr/bin/perl use LAM::LAM qw(displaySource displayPage); # Lexicon Abstact Map use CGI qw(:all); # Perl Common Gateway Interface package use strict; # Force me to use strict variable syntax. use warnings; # Enable all warnings. LAM::displaySource(); # Display source, rlog, etc. if requested. my $hostName = qx(uname -n | cut --delimiter=. --fields=1); # Report Host Name my $dfCommand = '/bin/df -Th -x supermount'; my $tmpfs = 0 ; if (defined param('tmpfs')) { $tmpfs = param('tmpfs') } if (($tmpfs == 0)) # Use tmpfs=1 to include temp file systems in report {$dfCommand .= ' --exclude-type=tmpfs --exclude-type=devtmpfs'} my $result = qx($dfCommand); # Get results: file system disk space usage report my @lines = split /^/, $result; # Split result into individual lines my $line_number = 0; # Set line number and table header my $table_text = "
Filesystem | Type | Size" . " | \nUsed | Available | Use% | Mounted on | " . "
$column | "; } else { $table_text .= "$column | "; } } $table_text .= "