mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
parent
e7eb28869c
commit
2b66ed321e
@ -171,8 +171,12 @@ while (($key, $value) = each %dom)
|
||||
|
||||
# Calc a percentage based on the _total_ available CPU time
|
||||
$tmp = 0;
|
||||
$tmp = ( $dom{$key}->{'diff'} / $tcpuavail ) * 100;
|
||||
$dom{$key}->{'pc_tcpu'} = sprintf("%.2f", $tmp);
|
||||
if ($tcpuavail != 0) {
|
||||
$tmp = ( $dom{$key}->{'diff'} / $tcpuavail ) * 100;
|
||||
$dom{$key}->{'pc_tcpu'} = sprintf("%.2f", $tmp);
|
||||
} else {
|
||||
$dom{$key}->{'pc_tcpu'} = "U";
|
||||
}
|
||||
|
||||
if ( $debug )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user