From patchwork Sat Sep 5 15:41:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 3432 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4BkJgC3Zb2z3x3K for ; Sat, 5 Sep 2020 15:41:27 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4BkJg847DMz10B; Sat, 5 Sep 2020 15:41:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4BkJg73v3wz30Wr; Sat, 5 Sep 2020 15:41:23 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4BkJg553Jfz2xq9 for ; Sat, 5 Sep 2020 15:41:21 +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 4BkJg53hVKzsr for ; Sat, 5 Sep 2020 15:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1599320481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VsIAHcGeBgq3N5FKw3QOO0yLpeETRJ4A3wuURkIekfQ=; b=cUTh0uL9Jp4WwiwYnSQHzUlQckCVq/IX+Jej8op2eJqbtDvaJ7dCuWlR+lkYldMxSf+S88 pPDJ2k2ftPHXt2OxeRIxz+htvJWUoOFQikfSpEnVeJOu5KPEbEeVf/ITjK9+g8mOhfB0D9 jEKJtC6ZcC4mKRKl7hQkAcN2iuLndTbAjJ3WQhMcfgPwynA7xuYUENGo7UfsxyIQR0tCqN Q9LNHV64xsZvasxZMc2tUFCkzh5JizL1QStZTrYU3lQrVoBh5fLZGvf/64FjCmsUOMDnBr yzmNLoeLJAYgwtO5wnpmGlKn8p3AMSwtA//e2A9nNVijcPW2nVE9oBqFgKJMNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1599320481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VsIAHcGeBgq3N5FKw3QOO0yLpeETRJ4A3wuURkIekfQ=; b=qxap+87sihy1Y4NkkD0MqaQ3wEX9zrGbWE79010XNivcFvGzhiHqwQTDobL83pQfc1EGGV T4gP+aYxsGrxMVDQ== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH 4/4] graphs.pl: Standardize temperature displays Date: Sat, 5 Sep 2020 17:41:13 +0200 Message-Id: <20200905154113.3555-4-matthias.fischer@ipfire.org> In-Reply-To: <20200905154113.3555-1-matthias.fischer@ipfire.org> References: <20200905154113.3555-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=matthias.fischer@ipfire.org 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: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Matthias Fischer --- config/cfgroot/graphs.pl | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 8473613a3..417da5cd7 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -810,15 +810,15 @@ sub updatehddgraph { "DEF:standby=".$mainsettings{'RRDLOG'}."/hddshutdown-$disk.rrd:standby:AVERAGE", "CDEF:st=standby,INF,*", "AREA:st".$color{"color20"}."A0:standby", - "LINE3:temperature".$color{"color11"}."A0:$Lang::tr{'hdd temperature in'} C\\j", + "LINE3:temperature".$color{"color11"}."A0:$Lang::tr{'hdd temperature in'} °C\\j", "COMMENT:$Lang::tr{'maximal'}", "COMMENT:$Lang::tr{'average'}", "COMMENT:$Lang::tr{'minimal'}", "COMMENT:$Lang::tr{'current'}\\j", - "GPRINT:temperature:MAX:%3.0lf Grad C", - "GPRINT:temperature:AVERAGE:%3.0lf Grad C", - "GPRINT:temperature:MIN:%3.0lf Grad C", - "GPRINT:temperature:LAST:%3.0lf Grad C\\j", + "GPRINT:temperature:MAX:%3.0lf °C", + "GPRINT:temperature:AVERAGE:%3.0lf °C", + "GPRINT:temperature:MIN:%3.0lf °C", + "GPRINT:temperature:LAST:%3.0lf °C\\j", ); $ERROR = RRDs::error; print "Error in RRD::graph for hdd-".$disk.": ".$ERROR."\n" if $ERROR; @@ -836,6 +836,7 @@ sub updatehwtempgraph { "-1".$period, "-r", "-t ".$Lang::tr{'mbmon temp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"}, + "-v Celsius", "--color=SHADEA".$color{"color19"}, "--color=SHADEB".$color{"color19"}, "--color=BACK".$color{"color21"}, @@ -862,7 +863,7 @@ sub updatehwtempgraph { $_ =~ /\/(.*)sensors-(.*)\/(.*)\.rrd/; my $label = $2.$3;$label=~ s/-//g; if ( $sensorsettings{'LINE-'.$label} eq "off" ){next;} - push(@command,"LINE3:".$sensorsettings{'LABEL-'.$label}.random_hex_color(6)."A0:".sprintf("%-25s",$sensorsettings{'LABEL-'.$label}),"GPRINT:".$sensorsettings{'LABEL-'.$label}.":MAX:%3.2lf C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":AVERAGE:%3.2lf C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":MIN:%3.2lf C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":LAST:%3.2lf C\\j",); + push(@command,"LINE3:".$sensorsettings{'LABEL-'.$label}.random_hex_color(6)."A0:".sprintf("%-25s",$sensorsettings{'LABEL-'.$label}),"GPRINT:".$sensorsettings{'LABEL-'.$label}.":MAX:%3.2lf °C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":AVERAGE:%3.2lf °C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":MIN:%3.2lf °C","GPRINT:".$sensorsettings{'LABEL-'.$label}.":LAST:%3.2lf °C\\j",); } } @@ -1089,7 +1090,7 @@ sub updatethermaltempgraph { "-1".$period, "-r", "-t ".$Lang::tr{'acpitemp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"}, - "-v Grad Celsius", + "-v Celsius", "--color=SHADEA".$color{"color19"}, "--color=SHADEB".$color{"color19"}, "--color=BACK".$color{"color21"}, @@ -1105,10 +1106,10 @@ sub updatethermaltempgraph { push(@command,"DEF:temp".$i."_=".$mainsettings{'RRDLOG'}."/collectd/localhost/thermal-thermal_zone".$i."/temperature-temperature.rrd:value:AVERAGE" ,"CDEF:temp".$i."=temp".$i."_,1,/" ,"LINE3:temp".$i.$color{"color1$j"}."A0:Temp ".$i." " - ,"GPRINT:temp".$i.":MAX:%3.0lf Grad C" - ,"GPRINT:temp".$i.":AVERAGE:%3.0lf Grad C" - ,"GPRINT:temp".$i.":MIN:%3.0lf Grad C" - ,"GPRINT:temp".$i.":LAST:%3.0lf Grad C\\j"); + ,"GPRINT:temp".$i.":MAX:%3.0lf °C" + ,"GPRINT:temp".$i.":AVERAGE:%3.0lf °C" + ,"GPRINT:temp".$i.":MIN:%3.0lf °C" + ,"GPRINT:temp".$i.":LAST:%3.0lf °C\\j"); } RRDs::graph (@command);