mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
lots of cleanups to various things
git-svn-id: http://www.observium.org/svn/observer/trunk@1463 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,8 +7,8 @@ if($device['os_group'] == "unix" && $count == "0")
|
||||
echo("UCD Old: ");
|
||||
|
||||
$system = snmp_get($device, "ssCpuSystem.0", "-OvQ", "UCD-SNMP-MIB");
|
||||
$user = snmp_get($device, "ssCpuUser.0", "-OvQ", "UCD-SNMP-MIB");
|
||||
$idle = snmp_get($device, "ssCpuIdle.0", "-OvQ", "UCD-SNMP-MIB");
|
||||
$user = snmp_get($device, "ssCpuUser.0", "-OvQ", "UCD-SNMP-MIB");
|
||||
$idle = snmp_get($device, "ssCpuIdle.0", "-OvQ", "UCD-SNMP-MIB");
|
||||
|
||||
$percent = $system + $user + $idle;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ if ($device['os_group'] == "unix" || $device['os'] == "windows" || $device['os']
|
||||
{
|
||||
echo("hrDevice ");
|
||||
$hrDevice_oids = array('hrDevice','hrProcessorLoad');
|
||||
unset($hrDevice_array);
|
||||
foreach ($hrDevice_oids as $oid) { $hrDevice_array = snmpwalk_cache_oid($device, $oid, $hrDevice_array, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES"); }
|
||||
foreach($hrDevice_array[$device['device_id']] as $index => $entry)
|
||||
{
|
||||
@@ -40,9 +41,13 @@ if ($device['os_group'] == "unix" || $device['os'] == "windows" || $device['os']
|
||||
{
|
||||
discover_processor($valid_processor, $device, $usage_oid, $index, "hr", $descr, "1", $usage, NULL, $hrDeviceIndex);
|
||||
}
|
||||
unset($old_rrd,$new_rrd,$descr,$entry,$usage_oid,$index,$usage,$hrDeviceIndex,$descr_array);
|
||||
}
|
||||
unset($entry);
|
||||
}
|
||||
unset($hrDevice_oids, $hrDevice_array, $oid);
|
||||
}
|
||||
|
||||
## End hrDevice Processors
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,10 +14,10 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
||||
{
|
||||
$entPhysicalIndex = $entry['cpmCPUTotalPhysicalIndex'];
|
||||
|
||||
if($entry['cpmCPUTotal5minRev']) {
|
||||
if(isset($entry['cpmCPUTotal5minRev'])) {
|
||||
$usage_oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.8." . $index;
|
||||
$usage = $entry['cpmCPUTotal5minRev'];
|
||||
} elseif($entry['cpmCPUTotal5min']) {
|
||||
} elseif(isset($entry['cpmCPUTotal5min'])) {
|
||||
$usage_oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5." . $index;
|
||||
$usage = $entry['cpmCPUTotal5min'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user