mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
more cleanups and reindents, still a lot to come
git-svn-id: http://www.observium.org/svn/observer/trunk@1836 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -2,19 +2,20 @@
|
||||
|
||||
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM processors WHERE device_id = '".$device['device_id']."' AND processor_type != 'ucd-old'"),0);
|
||||
|
||||
if($device['os_group'] == "unix" && $count == "0")
|
||||
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;
|
||||
|
||||
if(is_numeric($percent)) {
|
||||
if (is_numeric($percent))
|
||||
{
|
||||
discover_processor($valid_processor, $device, 0, 0, "ucd-old", "CPU", "1", $system+$user, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user