Get rid of some more execs

git-svn-id: http://www.observium.org/svn/observer/trunk@1814 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-10 15:51:56 +00:00
parent a199070100
commit 3c10ede092
10 changed files with 27 additions and 26 deletions
+1
View File
@@ -9,6 +9,7 @@ if ($config['enable_printers'])
{
echo("Checking toner " . $toner['toner_descr'] . "... ");
# FIXME needs snmp_get
$toner_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " " . $toner['toner_oid'] . "|grep -v \"No Such Instance\"";
$tonerperc = trim(str_replace("\"", "", shell_exec($toner_cmd)));
$tonerperc = $tonerperc / $toner['toner_capacity'] * 100;