Show
Ignore:
Timestamp:
11/23/07 21:27:27 (6 years ago)
Author:
p_lindheimer
Message:

#2469 fix division my zero in cpu usage

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/dashboard/phpsysinfo/class.Linux.inc.php

    r4523 r5271  
    133133  $load2 = $ab + $ac + $ad; 
    134134  $total2 = $ab + $ac + $ad + $ae; 
    135   $results['cpupercent'] = (100*($load2 - $load)) / ($total2 - $total)
     135  $results['cpupercent'] = ($total2 != $total)?((100*($load2 - $load)) / ($total2 - $total)):0
    136136      } 
    137137    }