diff --git a/includes/polling/toner.inc.php b/includes/polling/toner.inc.php index 28bda4618..c39d38072 100755 --- a/includes/polling/toner.inc.php +++ b/includes/polling/toner.inc.php @@ -8,10 +8,10 @@ if ($config['enable_printers']) { echo("Checking toner " . $toner['toner_descr'] . "... "); - # FIXME poll capacity maybe also here, when toner is replaced capacity can change, leading to "154% of toner" - $tonerperc = round(snmp_get($device, $toner['toner_oid'], "-OUqnv") / $toner['toner_capacity'] * 100); + if ($tonerperc > 100) { $tonerperc = 100; } + $old_tonerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("toner-" . $toner['toner_descr'] . ".rrd"); $tonerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("toner-" . $toner['toner_index'] . ".rrd");