From ebcda0a6eb45edb4b0ab2d727d9f8fb6005cce76 Mon Sep 17 00:00:00 2001 From: Andreas Bachlechner <62039342+bachandi@users.noreply.github.com> Date: Fri, 4 Feb 2022 18:04:50 +0100 Subject: [PATCH] Introduce a new graph_size "large" for modules with only one plot. intelrapl now uses this new graph_size. --- lib/intelrapl.pm | 8 +++----- man/man5/monitorix.conf.5 | 4 +++- monitorix.conf | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/intelrapl.pm b/lib/intelrapl.pm index 053e653..ba149fc 100644 --- a/lib/intelrapl.pm +++ b/lib/intelrapl.pm @@ -684,19 +684,17 @@ sub intelrapl_cgi { push(@tmpz, "AREA:wrongdata#$colors->{gap}:"); push(@CDEF, "CDEF:wrongdata=allvalues,UN,INF,UNKN,IF"); } - ($width, $height) = split('x', $config->{graph_size}->{'main'}); + my $graph_size_name = "large"; + ($width, $height) = split('x', $config->{graph_size}->{$graph_size_name}); if($silent =~ /imagetag/) { ($width, $height) = split('x', $config->{graph_size}->{remote}) if $silent eq "imagetag"; - ($width, $height) = split('x', $config->{graph_size}->{main}) if $silent eq "imagetagbig"; + ($width, $height) = split('x', $config->{graph_size}->{$graph_size_name}) if $silent eq "imagetagbig"; @tmp = @tmpz; push(@tmp, "COMMENT: \\n"); push(@tmp, "COMMENT: \\n"); push(@tmp, "COMMENT: \\n"); } - $height *= 1.2; - $width += 300; - my @def_sensor_average; my $cdef_sensor_allvalues = "CDEF:allvalues="; my $sum_of_cores = 0; diff --git a/man/man5/monitorix.conf.5 b/man/man5/monitorix.conf.5 index 07a7b45..5ca8b2e 100644 --- a/man/man5/monitorix.conf.5 +++ b/man/man5/monitorix.conf.5 @@ -644,6 +644,8 @@ This option sets the size of all processors graphs. .P The possible values are: .RS +\fIlarge\fP for 750x180 graphs. +.br \fImain\fP for 450x150 graphs. .br \fImedium\fP for 325x150 graphs. @@ -3074,7 +3076,7 @@ Default value: \fI3\fP .P .BI size .RS -This is the size of the graphs of the ports. It currently accepts up to 8 different size names: \fImain\fP, \fImedium\fP, \fImedium2\fP, \fIsmall\fP, \fImini\fP, \fItiny\fP, \fIzoom\fP and \fIremote\fP. You can check the resolution of each size in the configuration file, inside the list named \fBgraph_size\fP. +This is the size of the graphs of the ports. It currently accepts up to 8 different size names: \fIlarge\fP, \fImain\fP, \fImedium\fP, \fImedium2\fP, \fIsmall\fP, \fImini\fP, \fItiny\fP, \fIzoom\fP and \fIremote\fP. You can check the resolution of each size in the configuration file, inside the list named \fBgraph_size\fP. .P Default value: \fImini\fP .RE diff --git a/monitorix.conf b/monitorix.conf index 4e5e950..aabdaef 100644 --- a/monitorix.conf +++ b/monitorix.conf @@ -1113,6 +1113,7 @@ logo_bottom = logo_bot.png + large = 750x180 main = 450x150 medium = 325x150 medium2 = 325x70