diff --git a/quotacheck/quotacheck.pl b/quotacheck/quotacheck.pl index 020f1a7..cc36d6d 100644 --- a/quotacheck/quotacheck.pl +++ b/quotacheck/quotacheck.pl @@ -112,7 +112,7 @@ sub parseline($$) { } elsif (/(\w+) \s+ -\+ \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) { print "file limit: $1: $5 > ($6 $7) $8\n"; $user = $1; diff --git a/quotacheck/quotastat.pl b/quotacheck/quotastat.pl index 4941688..5a02bca 100644 --- a/quotacheck/quotastat.pl +++ b/quotacheck/quotastat.pl @@ -22,6 +22,9 @@ $/ = $fs; $df =~ s/\n[ \t]+/ /mg; @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"; for $ln (@df) { ($fs, $total, $used, $free, $pct, $mount) = split(/\s+/, $ln); @@ -32,8 +35,8 @@ for $ln (@df) { if (!/\b\d+\b/) { #print "header: $_"; } 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+(|NOT\sSTARTED|EXPIRED|\d+(?:\.\d+)?\ ?(?:days|hours)|\d+:\d+) + (\d+)\s+(\d+)\s+(\d+)\s+(|$hpuxtime|$linuxtime)\s+ + (\d+)\s+(\d+)\s+(\d+)\s+(|$hpuxtime|$linuxtime) /x) { print STAT "$datetime\t$mount\t$1\t$2\t$3\t$4\t$6\t$7\t$8\n"; } else {