From 82576755a77e5581c4fedd3e1ee0bad45cadc064 Mon Sep 17 00:00:00 2001 From: mgunther68 Date: Fri, 29 Jan 2016 20:19:46 +0000 Subject: [PATCH] Update make-collectd-graphs.sh Standardise graph image sizes and center all legends --- build/portal/graphs/make-collectd-graphs.sh | 69 ++++++++++++--------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/build/portal/graphs/make-collectd-graphs.sh b/build/portal/graphs/make-collectd-graphs.sh index f10576f..21adb99 100755 --- a/build/portal/graphs/make-collectd-graphs.sh +++ b/build/portal/graphs/make-collectd-graphs.sh @@ -52,8 +52,8 @@ aircraft_message_rate_graph() { "CDEF:rate=messages,all,/" \ "VDEF:avgrate=rate,AVERAGE" \ "VDEF:maxrate=rate,MAXIMUM" \ - "GPRINT:avgrate:Average\:%3.0lf " \ - "GPRINT:maxrate:Maximum\:%3.0lf " \ + "GPRINT:avgrate:Average Rate\:%3.0lf " \ + "GPRINT:maxrate:Maximum Rate\:%3.0lf \c" \ "LINE1:all#990000:A/C" \ "LINE1:rate#0000FF:Rate" \ "LINE1:maxrate#FF0000:Max Rate" \ @@ -81,7 +81,8 @@ cpu_graph_dump1090() { "CDEF:backgroundp=background,10,/" \ "AREA:readerp#008000:USB" \ "AREA:backgroundp#00C000:other:STACK" \ - "AREA:demodp#00FF00:demodulator:STACK" \ + "AREA:demodp#00FF00:demodulator\c:STACK" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -101,7 +102,8 @@ tracks_graph() { "CDEF:hall=all,3600,*" \ "CDEF:hsingle=single,3600,*" \ "AREA:hsingle#FF0000:tracks with single message" \ - "AREA:hall#00FF00:unique tracks:STACK" \ + "AREA:hall#00FF00:unique tracks\c:STACK" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -111,7 +113,7 @@ cpu_graph() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 1110 \ + --width 1010 \ --height 200 \ --step "$5" \ --title "Overall CPU Utilization" \ @@ -142,7 +144,7 @@ cpu_graph() { "AREA:pwait#C00000:io:STACK" \ "AREA:psystem#FF0000:sys:STACK" \ "AREA:puser#40FF40:user:STACK" \ - "AREA:pnice#008000:nice:STACK" \ + "AREA:pnice#008000:nice\c:STACK" \ --watermark "Drawn: $nowlit"; } @@ -150,7 +152,7 @@ df_root_graph() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 480 \ + --width 496 \ --height 200 \ --step "$5" \ --title "Disk Usage (/)" \ @@ -162,7 +164,8 @@ df_root_graph() { "DEF:free=$2/df_complex-free.rrd:value:AVERAGE" \ "CDEF:totalused=used,reserved,+" \ "AREA:totalused#4169E1:used:STACK" \ - "AREA:free#32C734:free:STACK" \ + "AREA:free#32C734:free\c:STACK" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -190,7 +193,6 @@ disk_io_iops_graph() { "GPRINT:write:MAX:Max\:%4.1lf iops" \ "GPRINT:write:AVERAGE:Avg\:%4.1lf iops" \ "GPRINT:write:LAST:Current\:%4.1lf iops\c" \ - "HRULE:0#000000" \ --watermark "Drawn: $nowlit"; } @@ -218,7 +220,6 @@ disk_io_octets_graph() { "GPRINT:write:MAX:Max\: %4.1lf %sB/sec" \ "GPRINT:write:AVERAGE:Avg\: %4.1lf %SB/sec" \ "GPRINT:write:LAST:Current\: %4.1lf %SB/sec\c" \ - "HRULE:0#000000" \ --watermark "Drawn: $nowlit"; } @@ -239,13 +240,12 @@ eth0_graph() { "LINE1:rx#336600" \ "GPRINT:rx:MAX:Max\:%8.1lf %s" \ "GPRINT:rx:AVERAGE:Avg\:%8.1lf %S" \ - "GPRINT:rx:LAST:Current\:%8.1lf %Sbytes/sec\n" \ + "GPRINT:rx:LAST:Current\:%8.1lf %Sbytes/sec\c" \ "AREA:tx_neg#4169E1:Outgoing" \ "LINE1:tx_neg#0033CC" \ "GPRINT:tx:MAX:Max\:%8.1lf %S" \ "GPRINT:tx:AVERAGE:Avg\:%8.1lf %S" \ - "GPRINT:tx:LAST:Current\:%8.1lf %Sbytes/sec\n" \ - "HRULE:0#000000" \ + "GPRINT:tx:LAST:Current\:%8.1lf %Sbytes/sec\c" \ --watermark "Drawn: $nowlit"; } @@ -253,7 +253,7 @@ memory_graph() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 480 \ + --width 496 \ --height 200 \ --step "$5" \ --title "Memory Utilization" \ @@ -266,7 +266,8 @@ memory_graph() { "AREA:used#4169E1:used:STACK" \ "AREA:buffered#32C734:buffered:STACK" \ "AREA:cached#00FF00:cached:STACK" \ - "AREA:free#FFFFFF:free:STACK" \ + "AREA:free#FFFFFF:free\c:STACK" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -288,6 +289,8 @@ temp_graph_imperial() { "CDEF:ttb=tta,1.8,*" \ "CDEF:ttc=ttb,32,+" \ "AREA:ttc#ffcc00" \ + "COMMENT: \n" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -307,6 +310,8 @@ temp_graph_metric() { "DEF:traw=$2/gauge-cpu_temp.rrd:value:MAX" \ "CDEF:tfin=traw,1000,/" \ "AREA:tfin#ffcc00" \ + "COMMENT: \n" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -327,13 +332,12 @@ wlan0_graph() { "LINE1:rx#336600" \ "GPRINT:rx:MAX:Max\:%8.1lf %s" \ "GPRINT:rx:AVERAGE:Avg\:%8.1lf %S" \ - "GPRINT:rx:LAST:Current\:%8.1lf %Sbytes/sec\n" \ + "GPRINT:rx:LAST:Current\:%8.1lf %Sbytes/sec\c" \ "AREA:tx_neg#4169E1:Outgoing" \ "LINE1:tx_neg#0033CC" \ "GPRINT:tx:MAX:Max\:%8.1lf %S" \ "GPRINT:tx:AVERAGE:Avg\:%8.1lf %S" \ - "GPRINT:tx:LAST:Current\:%8.1lf %Sbytes/sec\n" \ - "HRULE:0#000000" \ + "GPRINT:tx:LAST:Current\:%8.1lf %Sbytes/sec\c" \ --watermark "Drawn: $nowlit"; } @@ -343,7 +347,7 @@ local_rate_graph() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 480 \ + --width 429 \ --height 200 \ --step "$5" \ --title "$3 Message Rate" \ @@ -358,7 +362,8 @@ local_rate_graph() { "CDEF:y2positions=positions,10,*" \ "LINE1:messages#0000FF:messages received" \ "AREA:y2strong#FF0000:messages >-3dBFS / hr (RHS)" \ - "LINE1:y2positions#00c0FF:positions / hr (RHS)" \ + "LINE1:y2positions#00c0FF:positions / hr (RHS)\c" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -366,8 +371,8 @@ local_trailing_rate_graph() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 1010 \ - --height 217 \ + --width 959 \ + --height 200 \ --step "$5" \ --title "$3 Message Rate" \ --vertical-label "Messages/Second" \ @@ -463,7 +468,7 @@ local_trailing_rate_graph() { "LINE1:7dayaverage#00FF00:7 Day Average" \ "AREA:y2strong#FF0000:messages >-3dBFS/Hr (RHS)" \ "LINE1:y2positions#00c0FF:Positions/Hr (RHS)" \ - "LINE1:messages#0000FF:Messages Received" \ + "LINE1:messages#0000FF:Messages Received\c" \ --watermark "Drawn: $nowlit"; } @@ -471,7 +476,7 @@ range_graph_imperial(){ rrdtool graph \ "$1" \ --start end-$4 \ - --width 480 \ + --width 428 \ --height 200 \ --step "$5" \ --title "$3 Max Range" \ @@ -488,7 +493,8 @@ range_graph_imperial(){ "VDEF:peakrange=rangenm,MAXIMUM" \ "GPRINT:avgrange:%1.1lf NM" \ "LINE1:peakrange#FF0000:Peak Range\\:" \ - "GPRINT:peakrange:%1.1lf NM" \ + "GPRINT:peakrange:%1.1lf NM\c" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -496,7 +502,7 @@ range_graph_metric() { rrdtool graph \ "$1" \ --start end-$4 \ - --width 480 \ + --width 428 \ --height 200 \ --step "$5" \ --title "$3 Max Range" \ @@ -513,7 +519,8 @@ range_graph_metric() { "GPRINT:avgrange:%1.1lf km" \ "LINE1:peakrange#FF0000:Peak Range\\:" \ "GPRINT:peakrange:%1.1lf km" \ - "LINE1:463#000000:250 NM" \ + "LINE1:463#000000:250 NM\c" \ + "COMMENT: \n" \ --watermark "Drawn: $nowlit"; } @@ -522,7 +529,7 @@ signal_graph() { "$1" \ --start end-$4 \ --width 480 \ - --height 200 \ + --height 186 \ --step "$5" \ --title "$3 Signal Level" \ --vertical-label "dBFS" \ @@ -539,13 +546,13 @@ signal_graph() { "AREA:us#FFFFFF" \ "GPRINT:signal:AVERAGE:%4.1lf" \ "LINE1:peak#0000FF:Peak Level\:" \ - "GPRINT:peak:MAX:%4.1lf\n" \ + "GPRINT:peak:MAX:%4.1lf\c" \ "LINE:noise#7F00FF:Noise" \ "GPRINT:noise:MAX:Max\: %4.1lf" \ "GPRINT:noise:MIN:Min\: %4.1lf" \ - "GPRINT:noise:AVERAGE:Avg\: %4.1lf\n" \ + "GPRINT:noise:AVERAGE:Avg\: %4.1lf\c" \ "LINE1:0#000000:Zero dBFS" \ - "LINE1:-3#FF0000:-3 dBFS\n" \ + "LINE1:-3#FF0000:-3 dBFS\c" \ --watermark "Drawn: $nowlit"; }