From patchwork Fri Sep 18 07:44:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3471 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Bt5T902JWz3x3W for ; Fri, 18 Sep 2020 07:44:44 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Bt5T73FFKz11S; Fri, 18 Sep 2020 07:44:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Bt5T66VZ4z2yVP; Fri, 18 Sep 2020 07:44:42 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Bt5T56Tpqz2xd1 for ; Fri, 18 Sep 2020 07:44:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Bt5T44RFbzlr; Fri, 18 Sep 2020 07:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1600415080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qoi5xykCe8CgVyubBIHKiK72w4u3L/gfGXnDTNLxxN0=; b=PbYoLUHHU9kHu1gDOgkh3poh/sY7LudsCUjkzHrVWDQaDEYpf+FxOyibDekFowErJBtaBs /CMg2A0IHYUzSC6l9J3EgHILydfzr31mcnD5tuPMWMsttnFeGNJ9LqD7c5cw7Y/Q1+oqWH DUu6aa1TOnEJ9lNJ4DmnYFUEh7fnsPyI+vPvZ/ip5rCQkZQIQALDkQFAUlpLnlTJ1DFhDm dOR/Z1l+TDYBkO0E7je64fHe0SnWZRBHxYOvlgdkQEtBf942SWCRiT403CCAaVZYrpfnPG /ThrvSDDMW68TJ+Zj22BUTbLlnKpJKotOsfGHnlxSLk2yjE3x2ZBOKD73GQvrA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1600415080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qoi5xykCe8CgVyubBIHKiK72w4u3L/gfGXnDTNLxxN0=; b=yfezp0pcEolvV4qySDYYvApg6/zRgxsFmsMPeCo2lfO3GPN0pyspXoAsOhtpzLpuJY0NO1 5+jUoChn+FtSRZAw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] graphs: Fix rendering CPU graphs after number of cores decreased Date: Fri, 18 Sep 2020 07:44:37 +0000 Message-Id: <20200918074437.5237-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Fixes: #12193 - cpu graphs cannot created if smt is disabled Signed-off-by: Michael Tremer --- config/cfgroot/graphs.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index a7b82fed3..f6e6e25a3 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,/,*"