From: Quanah Gibson-Mount Date: Sat, 13 Dec 2003 00:29:08 +0000 (+0000) Subject: Print out percentages instead X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2a063db7a481b55aeaa936d85191dcc0c56859f6;p=packages%2Fa%2Fafs-monitor.git Print out percentages instead --- diff --git a/check_afsspace b/check_afsspace index 5fbd123..0b7bfa8 100755 --- a/check_afsspace +++ b/check_afsspace @@ -46,6 +46,8 @@ foreach $l (@infos) { elsif ($percent >= $WARNINGS) { push (@warnings, "$h: $part $percent% full, free $free\n"); } + push (@final, "$part$percent%"); + } if (@critical) { @@ -56,10 +58,8 @@ if (@warning) { print @warning; exit 1; } -foreach $l (@infos) { +foreach $l (@final) { chomp($l); - $l =~ s/Free space on partition //; - $l =~ s/ K blocks out of total /\//; print "$l "; } print "\n";