summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ef309d)
raw | patch | inline | side by side (parent: 5ef309d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Jun 2005 11:50:58 +0000 (11:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Jun 2005 11:50:58 +0000 (11:50 +0000) |
plugins/admin/systems/class_terminalInfo.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc
index ab32135f8dd27370177f1964d2db3a6672087ca0..724b985d2c94bb3037414ddf35a6c7c665d9ed31 100644 (file)
/* Prevent undefined variable .... */
- $smarty->assign("load", progressbar(0,100,15));
- $smarty->assign("mem", progressbar(0,100,15));
- $smarty->assign("swap", progressbar(0,100,15));
+ $smarty->assign("load", progressbar(0,100,15,true));
+ $smarty->assign("mem", progressbar(0,100,15,true));
+ $smarty->assign("swap", progressbar(0,100,15,true));
/* Check if terminal is online */
$query= "fping -q -r 1 -t 500 ".$this->cn;
$MemTotal= @snmpget($host, $community, "UCD-SNMP-MIB::memory.memTotalReal.0");
$MemTotal= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $MemTotal);
if ($MemTotal != 0){
- $smarty->assign("mem", (int)(($MemTotal - $MemFree)*100/$MemTotal));
+ $smarty->assign("mem",progressbar( (int)(($MemTotal - $MemFree)*100/$MemTotal),100,15,true));
+ ;
}
$SwapFree= @snmpget($host, $community, "UCD-SNMP-MIB::memory.memAvailSwap.0");
$SwapFree= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $SwapFree);
$SwapTotal= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $SwapTotal);
if ($SwapTotal != 0){
#$smarty->assign("swap", (int)(($SwapTotal - $SwapFree)*100/$SwapTotal));
- $smarty->assign("swap", 0);
+ $smarty->assign("swap", porgressbar(0,100,15,true));
}
/* Get system uptime */
$sysload= @snmpget($host, $community, "UCD-SNMP-MIB::laLoad.2");
$sysload= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $sysload);
- $smarty->assign("load", progressbar($sysload*100,100,20));
+ $smarty->assign("load", progressbar($sysload*100,100,20,true));
/* Get status for key processes */
$processes= @snmpwalk($host, $community, "UCD-SNMP-MIB::prNames");
$device= preg_replace('/^STRING: */', '', $device);
$usage= @snmpget($host, $community, "UCD-SNMP-MIB::dskPercent.$n");
$usage= preg_replace('/^INTEGER: */', '', $usage);
- $partitions.= "<tr><td><b>$device</b></td><td>".progressbar($usage,100;16,true)."</td></tr>\n";
+ $partitions.= "<tr><td><b>$device</b></td><td>".progressbar($usage,100,16,true)."</td></tr>\n";
}
$smarty->assign("partitions", $partitions);
} else {