]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
graphs: Fix rendering CPU graphs after number of cores decreased
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Sep 2020 07:44:37 +0000 (07:44 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 19 Sep 2020 19:05:46 +0000 (19:05 +0000)
Fixes: #12193 - cpu graphs cannot created if smt is disabled
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/cfgroot/graphs.pl

index a7b82fed3f4f6c60c17a12a09044c898b17642da..f6e6e25a35bd4b139ca58f7633a1873251251131 100644 (file)
@@ -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,/,*"