From: Michael Tremer Date: Fri, 18 Sep 2020 07:41:59 +0000 (+0200) Subject: graphs: Fix rendering CPU graphs after number of cores decreased X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c87dcc1554b9a4c0f138904d17e2434d087545b2;p=people%2Fms%2Fipfire-2.x.git graphs: Fix rendering CPU graphs after number of cores decreased Fixes: #12193 - cpu graphs cannot created if smt is disabled Signed-off-by: Michael Tremer --- diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index a7b82fed3f..f6e6e25a35 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -172,7 +172,7 @@ sub updatecpugraph { } for(my $i = 2; $i < $cpucount; $i++) { - $addstring .= "+,"; + $addstring .= "ADDNAN,"; } if ( $cpucount > 1){ @@ -190,7 +190,7 @@ sub updatecpugraph { push(@command,$nice,$interrupt,$steal,$user,$system,$idle,$iowait,$irq); } - push(@command,"CDEF:total=user,system,idle,iowait,irq,nice,interrupt,steal,+,+,+,+,+,+,+" + push(@command,"CDEF:total=user,system,idle,iowait,irq,nice,interrupt,steal,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN,ADDNAN" ,"CDEF:userpct=100,user,total,/,*" ,"CDEF:nicepct=100,nice,total,/,*" ,"CDEF:interruptpct=100,interrupt,total,/,*"