Used $hpuxtime and $linuxtime where it wasn't already.

This commit is contained in:
hjp 2005-09-29 10:56:03 +00:00
parent 9b7a8ad925
commit 71c3303e51
2 changed files with 6 additions and 3 deletions

View File

@ -112,7 +112,7 @@ sub parseline($$) {
} elsif (/(\w+) \s+ -\+ \s* } elsif (/(\w+) \s+ -\+ \s*
(\d+)\s+(\d+)\s+(\d+)\s+ (\d+)\s+(\d+)\s+(\d+)\s+
(\d+)\s+(\d+)\s+(\d+)\s+(NOT\sSTARTED|EXPIRED|\d+\.\d+\ ?(?:days|hours)) (\d+)\s+(\d+)\s+(\d+)\s+($hpuxtime|$linuxtime)
/x) { /x) {
print "file limit: $1: $5 > ($6 $7) $8\n"; print "file limit: $1: $5 > ($6 $7) $8\n";
$user = $1; $user = $1;

View File

@ -22,6 +22,9 @@ $/ = $fs;
$df =~ s/\n[ \t]+/ /mg; $df =~ s/\n[ \t]+/ /mg;
@df = split(/\n/, $df); @df = split(/\n/, $df);
my $hpuxtime = '(?:NOT\sSTARTED|EXPIRED|\d+\.\d+\ (?:days|hours))';
my $linuxtime = '(?:none|\d+\:\d+|\d+days)';
open (STAT, ">>/usr/local/dfstat/quota.stat.$yearmon") or die "cannot append to quota.stat.$yearmon"; open (STAT, ">>/usr/local/dfstat/quota.stat.$yearmon") or die "cannot append to quota.stat.$yearmon";
for $ln (@df) { for $ln (@df) {
($fs, $total, $used, $free, $pct, $mount) = split(/\s+/, $ln); ($fs, $total, $used, $free, $pct, $mount) = split(/\s+/, $ln);
@ -32,8 +35,8 @@ for $ln (@df) {
if (!/\b\d+\b/) { if (!/\b\d+\b/) {
#print "header: $_"; #print "header: $_";
} elsif (/(\w+) \s+ [-+][-+] \s* } elsif (/(\w+) \s+ [-+][-+] \s*
(\d+)\s+(\d+)\s+(\d+)\s+(|NOT\sSTARTED|EXPIRED|\d+(?:\.\d+)?\ ?(?:days|hours)|\d+:\d+)\s+ (\d+)\s+(\d+)\s+(\d+)\s+(|$hpuxtime|$linuxtime)\s+
(\d+)\s+(\d+)\s+(\d+)\s+(|NOT\sSTARTED|EXPIRED|\d+(?:\.\d+)?\ ?(?:days|hours)|\d+:\d+) (\d+)\s+(\d+)\s+(\d+)\s+(|$hpuxtime|$linuxtime)
/x) { /x) {
print STAT "$datetime\t$mount\t$1\t$2\t$3\t$4\t$6\t$7\t$8\n"; print STAT "$datetime\t$mount\t$1\t$2\t$3\t$4\t$6\t$7\t$8\n";
} else { } else {