diff --git a/html/includes/graphs/device_toner.inc.php b/html/includes/graphs/device_toner.inc.php new file mode 100644 index 000000000..affb7b8fa --- /dev/null +++ b/html/includes/graphs/device_toner.inc.php @@ -0,0 +1,55 @@ + diff --git a/html/pages/device.php b/html/pages/device.php index 7a2007bd0..2db2c1edf 100644 --- a/html/pages/device.php +++ b/html/pages/device.php @@ -160,7 +160,7 @@ if(mysql_result(mysql_query("select count(service_id) from services WHERE device if(@mysql_result(mysql_query("select count(toner_id) from toner WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { echo('
  • - Toner + Toner
  • '); } diff --git a/html/pages/device/toner.inc.php b/html/pages/device/toner.inc.php new file mode 100644 index 000000000..b8f83de26 --- /dev/null +++ b/html/pages/device/toner.inc.php @@ -0,0 +1,8 @@ + + diff --git a/includes/discovery/toner.inc.php b/includes/discovery/toner.inc.php index 4f499389e..226f6fcd3 100644 --- a/includes/discovery/toner.inc.php +++ b/includes/discovery/toner.inc.php @@ -32,6 +32,7 @@ if ($device['os'] == "dell-laser") $descr = str_replace('"','',snmp_get($device, $descr_oid, "-Oqv")); $current = snmp_get($device, $toner_oid, "-Oqv"); $capacity = snmp_get($device, $capacity_oid, "-Oqv"); + $current = $current / $capacity * 100; $type = "dell-laser"; echo discover_toner($device, $toner_oid, $index, $type, $descr, $capacity, $current); $toner_exists[$type][$index] = 1; diff --git a/includes/polling/toner.inc.php b/includes/polling/toner.inc.php index ab403dad6..6ada03c9e 100755 --- a/includes/polling/toner.inc.php +++ b/includes/polling/toner.inc.php @@ -1,6 +1,6 @@