updates additions

git-svn-id: http://www.observium.org/svn/observer/trunk@505 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-09 15:52:04 +00:00
parent f263850092
commit 1ab6f3cded
22 changed files with 268 additions and 1557 deletions
+2 -2
View File
@@ -2,14 +2,14 @@
function snmp_cache_cip($oid, $device, $array, $mib = 0) {
global $config;
$cmd = $config['snmpbulkwalk'] . " -O snq -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$cmd = $config['snmpbulkwalk'] . " -O snQ -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
if($mib) { $cmd .= "-m $mib "; }
$cmd .= $oid;
$data = trim(shell_exec($cmd));
$device_id = $device['device_id'];
#echo("Caching: $oid\n");
foreach(explode("\n", $data) as $entry) {
list ($this_oid, $this_value) = split(" ", $entry);
list ($this_oid, $this_value) = split("=", $entry);
$this_oid = trim($this_oid);
$this_value = trim($this_value);
$this_oid = substr($this_oid, 30);