diff options
author | Peter Palfrader <peter@palfrader.org> | 2007-04-26 13:38:54 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2007-04-26 13:38:54 +0000 |
commit | 3aaf45092736602df5aff5ead37237ed79febbdc (patch) | |
tree | a688d00028a374007e269ea8b40ff0d7f0654de1 /munin/snmp__supplies | |
parent | 16cfae996e5dc3b763e3f6c9d537799340a92ca8 (diff) |
Handle estudio
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@266 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'munin/snmp__supplies')
-rwxr-xr-x | munin/snmp__supplies | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/munin/snmp__supplies b/munin/snmp__supplies index 9bfab87..f1976d7 100755 --- a/munin/snmp__supplies +++ b/munin/snmp__supplies @@ -104,8 +104,10 @@ if(defined $ARGV[0] and $ARGV[0] eq "config") { # Values if (keys(%supplies) > 0) { foreach my $supply (keys(%supplies)) { - printf "supply%s.value %.2f\n",$supply, - ($supplies{$supply}{level}/$supplies{$supply}{max})*100; + my $v = ($supplies{$supply}{max} == -2) ? + $supplies{$supply}{level} : # TOSHIBA e-STUDIO3510c + ($supplies{$supply}{level}/$supplies{$supply}{max})*100; # HP 3800 + printf "supply%s.value %.2f\n",$supply, $v; } } |