From: Maniacikarus Date: Sun, 28 Sep 2008 10:48:26 +0000 (+0200) Subject: Fixed CPU Graph should now work fine X-Git-Tag: v2.3-beta4~14^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ed623d0ad30e7dbe4b61021613c46665f01736a;p=people%2Fstevee%2Fipfire-2.x.git Fixed CPU Graph should now work fine --- diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 15965e3630..1df8d45e55 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -162,16 +162,20 @@ sub updatecpugraph { $addstring .= "+,"; } - $addstring .= "+"; - - push(@command,$nice.$addstring - ,$interrupt.$addstring - ,$steal.$addstring - ,$user.$addstring - ,$system.$addstring - ,$idle.$addstring - ,$iowait.$addstring - ,$irq.$addstring); + if ( $cpucount > 1){ + $addstring .= "+"; + push(@command,$nice.$addstring + ,$interrupt.$addstring + ,$steal.$addstring + ,$user.$addstring + ,$system.$addstring + ,$idle.$addstring + ,$iowait.$addstring + ,$irq.$addstring); + }else{ + chop($nice),chop($interrupt),chop($steal),chop($user),chop($system),chop($idle),chop($iowait),chop($irq); + push(@command,$nice,$interrupt,$steal,$user,$system,$idle,$iowait,$irq); + } push(@command,"CDEF:total=user,system,idle,iowait,irq,nice,interrupt,steal,+,+,+,+,+,+,+" ,"CDEF:userpct=100,user,total,/,*"