Used $hpuxtime and $linuxtime where it wasn't already.
This commit is contained in:
parent
9b7a8ad925
commit
71c3303e51
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue