]> git.ipfire.org Git - oddments/collecty.git/commitdiff
graphs: Justify all legends
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 11:20:49 +0000 (11:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 11:20:49 +0000 (11:20 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
14 files changed:
src/collecty/constants.py
src/collecty/plugins/conntrack.py
src/collecty/plugins/contextswitches.py
src/collecty/plugins/cpufreq.py
src/collecty/plugins/df.py
src/collecty/plugins/disk.py
src/collecty/plugins/interface.py
src/collecty/plugins/interrupts.py
src/collecty/plugins/ipfrag.py
src/collecty/plugins/latency.py
src/collecty/plugins/loadavg.py
src/collecty/plugins/memory.py
src/collecty/plugins/processor.py
src/collecty/plugins/sensors.py

index dcfe2d8c113ca2d3b6e46e600073806de308e8e4..bb38435d90c834d60019527739dca3a54cbabaaf 100644 (file)
@@ -52,6 +52,9 @@ GRAPH_DEFAULT_ARGUMENTS = (
 
        # Brand all generated graphs.
        "--watermark", _("Created by collecty"),
+
+       # Justify all text
+       "TEXTALIGN:justified",
 )
 
 INTERVALS = {
index 8e4b058dfb2abec62ba57a5fe136b4daf6fb04aa..49bf0971872967a07e8c09f3280a2b2fe4065545 100644 (file)
@@ -348,7 +348,7 @@ class ConntrackProtocolWithStatesGraphTemplate(base.GraphTemplate):
                                "GPRINT:%(state)s_cur:%(legend_cur)s" % i,
                                "GPRINT:%(state)s_avg:%(legend_avg)s" % i,
                                "GPRINT:%(state)s_min:%(legend_min)s" % i,
-                               "GPRINT:%(state)s_max:%(legend_max)s\\n" % i,
+                               "GPRINT:%(state)s_max:%(legend_max)s" % i,
                        ]
 
                return args
index 0031a74778e79b80ee10cecabbd55779e5c985c7..821dcc8c2632b07cd55b7c2cb5643da80ce26f12 100644 (file)
@@ -39,7 +39,7 @@ class GraphTemplateContextSwitches(base.GraphTemplate):
                        ),
                        "GPRINT:ctxt_max:%12s\:" % _("Maximum") + " %6.2lf" ,
                        "GPRINT:ctxt_min:%12s\:" % _("Minimum") + " %6.2lf" ,
-                       "GPRINT:ctxt_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:ctxt_avg:%12s\:" % _("Average") + " %6.2lf",
                        "LINE1:ctxt%s" % PRIMARY,
                ]
 
index 7b126c62b05db8adc506e191bbeb174046fe5f05..638b6aa3363161c4b1874a8226f088308bffa695 100644 (file)
@@ -56,7 +56,7 @@ class GraphTemplateCPUFreq(base.GraphTemplate):
                for processor, colour in zip(self.objects, self.processor_colours):
                        rrd_graph += processor.make_rrd_defs(processor.id) + [
                                "LINE2:%s_current%s:%-10s" % (processor.id, colour, processor.name),
-                               "GPRINT:%s_current_avg:%%6.2lf %%sHz\l" % processor.id,
+                               "GPRINT:%s_current_avg:%%6.2lf %%sHz" % processor.id,
                        ]
 
                return rrd_graph
index ae6a27fe6451140147bac0224ec78ac708153c92..948aec6d46e095aaa358475cff7e923b1c8a47f6 100644 (file)
@@ -49,14 +49,14 @@ class GraphTemplateDiskUsage(base.GraphTemplate):
                        "GPRINT:percentage_used_now: (%6.2lf%%)",
                        "GPRINT:used_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:used_min:%12s\:" % _("Minimum") + " %9.2lf%s",
-                       "GPRINT:used_max:%12s\:" % _("Maximum") + " %9.2lf%s\\n",
+                       "GPRINT:used_max:%12s\:" % _("Maximum") + " %9.2lf%s",
 
                        # Stacked area of unused space
                        "AREA:free%s:%s:STACK" % (lighten(LIGHT_GREEN, .66), _("Free")),
                        "GPRINT:percentage_left_now: (%6.2lf%%)",
                        "GPRINT:free_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:free_min:%12s\:" % _("Minimum") + " %9.2lf%s",
-                       "GPRINT:free_max:%12s\:" % _("Maximum") + " %9.2lf%s\\n",
+                       "GPRINT:free_max:%12s\:" % _("Maximum") + " %9.2lf%s",
 
                        # Add contour lines for the areas
                        "LINE:used%s" % LIGHT_RED,
@@ -94,14 +94,14 @@ class GraphTemplateInodeUsage(base.GraphTemplate):
                        "GPRINT:percentage_used_now: (%6.2lf%%)",
                        "GPRINT:inodes_used_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:inodes_used_min:%12s\:" % _("Minimum") + " %9.2lf%s",
-                       "GPRINT:inodes_used_max:%12s\:" % _("Maximum") + " %9.2lf%s\\n",
+                       "GPRINT:inodes_used_max:%12s\:" % _("Maximum") + " %9.2lf%s",
 
                        # Stacked area of unused inodes
                        "AREA:inodes_free%s:%s:STACK" % (lighten(LIGHT_GREEN, .66), _("Free")),
                        "GPRINT:percentage_left_now: (%6.2lf%%)",
                        "GPRINT:inodes_free_cur:%12s\:" % _("Current") + " %9.2lf%s",
                        "GPRINT:inodes_free_min:%12s\:" % _("Minimum") + " %9.2lf%s",
-                       "GPRINT:inodes_free_max:%12s\:" % _("Maximum") + " %9.2lf%s\\n",
+                       "GPRINT:inodes_free_max:%12s\:" % _("Maximum") + " %9.2lf%s",
 
                        # Add contour lines for the areas
                        "LINE:inodes_used%s" % LIGHT_RED,
index 79083ee5b4352cb7e92028e40eb2ca256b79178c..3afd7e1151957b7fd4d8272acf2b5e93f4d7212d 100644 (file)
@@ -37,7 +37,7 @@ class GraphTemplateDiskBadSectors(base.GraphTemplate):
                return [
                        "AREA:bad_sectors%s:%s" % (COLOUR_CRITICAL,_("Bad Sectors")),
                        "GPRINT:bad_sectors_cur:%12s\:" % _("Current") + " %9.2lf",
-                       "GPRINT:bad_sectors_max:%12s\:" % _("Maximum") + " %9.2lf\\n",
+                       "GPRINT:bad_sectors_max:%12s\:" % _("Maximum") + " %9.2lf",
                ]
 
        @property
@@ -66,13 +66,13 @@ class GraphTemplateDiskBytes(base.GraphTemplate):
                        "GPRINT:read_bytes_cur:%12s\:" % _("Current") + " %9.2lf",
                        "GPRINT:read_bytes_max:%12s\:" % _("Maximum") + " %9.2lf",
                        "GPRINT:read_bytes_min:%12s\:" % _("Minimum") + " %9.2lf",
-                       "GPRINT:read_bytes_avg:%12s\:" % _("Average") + " %9.2lf\\n",
+                       "GPRINT:read_bytes_avg:%12s\:" % _("Average") + " %9.2lf",
 
                        "LINE1:write_bytes%s:%-15s" % (COLOUR_WRITE, _("Written")),
                        "GPRINT:write_bytes_cur:%12s\:" % _("Current") + " %9.2lf",
                        "GPRINT:write_bytes_max:%12s\:" % _("Maximum") + " %9.2lf",
                        "GPRINT:write_bytes_min:%12s\:" % _("Minimum") + " %9.2lf",
-                       "GPRINT:write_bytes_avg:%12s\:" % _("Average") + " %9.2lf\\n",
+                       "GPRINT:write_bytes_avg:%12s\:" % _("Average") + " %9.2lf",
                ]
 
                return rrd_graph
@@ -102,13 +102,13 @@ class GraphTemplateDiskIoOps(base.GraphTemplate):
                        "GPRINT:read_ios_cur:%12s\:" % _("Current") + " %6.2lf",
                        "GPRINT:read_ios_max:%12s\:" % _("Maximum") + " %6.2lf",
                        "GPRINT:read_ios_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:read_ios_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:read_ios_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        "LINE1:write_ios%s:%-15s" % (COLOUR_WRITE, _("Written")),
                        "GPRINT:write_ios_cur:%12s\:" % _("Current") + " %6.2lf",
                        "GPRINT:write_ios_max:%12s\:" % _("Maximum") + " %6.2lf",
                        "GPRINT:write_ios_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:write_ios_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:write_ios_avg:%12s\:" % _("Average") + " %6.2lf",
                ]
 
                return rrd_graph
@@ -144,7 +144,7 @@ class GraphTemplateDiskTemperature(base.GraphTemplate):
                        "GPRINT:temp_cur:%12s\:" % _("Current") + " %3.2lf",
                        "GPRINT:temp_max:%12s\:" % _("Maximum") + " %3.2lf",
                        "GPRINT:temp_min:%12s\:" % _("Minimum") + " %3.2lf",
-                       "GPRINT:temp_avg:%12s\:" % _("Average") + " %3.2lf\\n",
+                       "GPRINT:temp_avg:%12s\:" % _("Average") + " %3.2lf",
                ]
 
                return rrd_graph
index 4b4ecab6ee1a5f5f1772ff04717f86a8c9e29a26..cc501854059e536ac3d4153675347edbaeb3cca8 100644 (file)
@@ -52,24 +52,24 @@ class GraphTemplateInterfaceBits(GraphTemplateInterfaceBase):
                        "AREA:bits_rx%s:%-15s" % (lighten(COLOUR_RX, AREA_OPACITY), _("Received")),
                        "GPRINT:bits_rx_max:%12s\: " % _("Maximum") + _("%8.2lf %sbps"),
                        "GPRINT:bits_rx_min:%12s\: " % _("Minimum") + _("%8.2lf %sbps"),
-                       "GPRINT:bits_rx_avg:%12s\: " % _("Average") + _("%8.2lf %sbps") + "\\n",
+                       "GPRINT:bits_rx_avg:%12s\: " % _("Average") + _("%8.2lf %sbps"),
 
                        # Draw the transmitted area.
                        "AREA:bits_tx%s:%-15s" % (lighten(COLOUR_TX, AREA_OPACITY), _("Transmitted")),
                        "GPRINT:bits_tx_max:%12s\: " % _("Maximum") + _("%8.2lf %sbps"),
                        "GPRINT:bits_tx_min:%12s\: " % _("Minimum") + _("%8.2lf %sbps"),
-                       "GPRINT:bits_tx_avg:%12s\: " % _("Average") + _("%8.2lf %sbps") + "\\n",
+                       "GPRINT:bits_tx_avg:%12s\: " % _("Average") + _("%8.2lf %sbps"),
 
                        # Draw outlines.
                        "LINE1:bits_rx%s" % COLOUR_RX,
                        "LINE1:bits_tx%s" % COLOUR_TX,
 
                        # Draw the 95% lines.
-                       "COMMENT:--- %s ---\\n" % _("95th percentile"),
+                       "COMMENT:--- %s ---" % _("95th percentile"),
                        "LINE2:bits_rx_95p%s:%-15s" % (COLOUR_RX, _("Received")),
-                       "GPRINT:bits_rx_95p:%s" % _("%8.2lf %sbps") + "\\n",
+                       "GPRINT:bits_rx_95p:%s" % _("%8.2lf %sbps"),
                        "LINE2:bits_tx_95p%s:%-15s" % (COLOUR_TX, _("Transmitted")),
-                       "GPRINT:bits_tx_95p:%s" % _("%8.2lf %sbps") + "\\n",
+                       "GPRINT:bits_tx_95p:%s" % _("%8.2lf %sbps"),
                ]
 
        @property
@@ -97,7 +97,7 @@ class GraphTemplateInterfacePackets(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:packets_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:packets_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:packets_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:packets_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
 
                        # Draw the transmitted area.
                        "AREA:packets_tx%s:%-15s" % (
@@ -105,7 +105,7 @@ class GraphTemplateInterfacePackets(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:packets_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:packets_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:packets_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:packets_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
 
                        # Draw outlines of the areas on top.
                        "LINE1:packets_rx%s" % COLOUR_RX,
@@ -141,7 +141,7 @@ class GraphTemplateInterfaceErrors(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:errors_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:errors_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:errors_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:errors_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
                        "LINE1:errors_rx%s" % COLOUR_RX,
 
                        # Draw the transmit errors.
@@ -150,7 +150,7 @@ class GraphTemplateInterfaceErrors(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:errors_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:errors_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:errors_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:errors_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
                        "LINE1:errors_tx_inv%s" % COLOUR_TX,
 
                        # Draw the receive drops.
@@ -159,7 +159,7 @@ class GraphTemplateInterfaceErrors(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:dropped_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:dropped_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:dropped_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:dropped_rx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
                        "LINE1:dropped_rx#228B22",
 
                        # Draw the transmit drops.
@@ -168,7 +168,7 @@ class GraphTemplateInterfaceErrors(GraphTemplateInterfaceBase):
                        ),
                        "GPRINT:dropped_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
                        "GPRINT:dropped_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
-                       "GPRINT:dropped_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps") + "\\n",
+                       "GPRINT:dropped_tx_avg:%12s\: " % _("Average") + _("%8.2lf %spps"),
                        "LINE1:dropped_tx%s" % TEAL,
 
                        # Draw the collisions as a line.
index 80eb0212191f5caf504becbdfd44cb31a8e23401..754a38e33e9ed7c7577049eec70b38d0c16fcb22 100644 (file)
@@ -37,9 +37,9 @@ class GraphTemplateInterrupts(base.GraphTemplate):
                        "AREA:intr%s:%-15s" % (
                                lighten(PRIMARY, AREA_OPACITY), _("Interrupts"),
                        ),
-                       "GPRINT:intr_max:%12s\:" % _("Maximum") + " %6.2lf" ,
-                       "GPRINT:intr_min:%12s\:" % _("Minimum") + " %6.2lf" ,
-                       "GPRINT:intr_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:intr_max:%12s\:" % _("Maximum") + " %6.2lf",
+                       "GPRINT:intr_min:%12s\:" % _("Minimum") + " %6.2lf",
+                       "GPRINT:intr_avg:%12s\:" % _("Average") + " %6.2lf",
                        "LINE1:intr%s" % PRIMARY,
                ]
 
index 6d605711da0643e7b2524dad519c2b2374bbd190..af6bc13cba6484018c1a11f9370f8d5259a003df 100644 (file)
@@ -43,20 +43,20 @@ class GraphTemplateIPv6Fragmentation(base.GraphTemplate):
                        "GPRINT:ip6_reasm_fails_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip6_reasm_fails_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip6_reasm_fails_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip6_reasm_fails_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip6_reasm_fails_min:%s %%5.0lf%%s" % _("Min"),
 
                        "AREA:ip6_reasm_timeout%s:%-24s:STACK" % \
                                (lighten(COLOUR_WARN), _("Reassembly Timeouts")),
                        "GPRINT:ip6_reasm_timeout_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip6_reasm_timeout_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip6_reasm_timeout_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip6_reasm_timeout_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip6_reasm_timeout_min:%s %%5.0lf%%s" % _("Min"),
 
                        "LINE2:ip6_reasm_oks%s:%-24s" % (BLACK, _("Successful Reassemblies")),
                        "GPRINT:ip6_reasm_oks_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip6_reasm_oks_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip6_reasm_oks_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip6_reasm_oks_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip6_reasm_oks_min:%s %%5.0lf%%s" % _("Min"),
 
                        "COMMENT: \\n", # empty line
 
@@ -65,13 +65,13 @@ class GraphTemplateIPv6Fragmentation(base.GraphTemplate):
                        "GPRINT:ip6_frags_fails_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip6_frags_fails_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip6_frags_fails_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip6_frags_fails_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip6_frags_fails_min:%s %%5.0lf%%s" % _("Min"),
 
                        "LINE2:ip6_frags_oks%s:%-24s" % (COLOUR_OK, _("Fragmented Packets")),
                        "GPRINT:ip6_frags_oks_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip6_frags_oks_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip6_frags_oks_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip6_frags_oks_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip6_frags_oks_min:%s %%5.0lf%%s" % _("Min"),
                ]
 
        @property
@@ -112,20 +112,20 @@ class GraphTemplateIPv4Fragmentation(base.GraphTemplate):
                        "GPRINT:ip4_reasm_fails_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip4_reasm_fails_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip4_reasm_fails_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip4_reasm_fails_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip4_reasm_fails_min:%s %%5.0lf%%s" % _("Min"),
 
                        "AREA:ip4_reasm_timeout%s:%-24s:STACK" % \
                                (lighten(COLOUR_WARN), _("Reassembly Timeouts")),
                        "GPRINT:ip4_reasm_timeout_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip4_reasm_timeout_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip4_reasm_timeout_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip4_reasm_timeout_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip4_reasm_timeout_min:%s %%5.0lf%%s" % _("Min"),
 
                        "LINE2:ip4_reasm_oks%s:%-24s" % (BLACK, _("Successful Reassemblies")),
                        "GPRINT:ip4_reasm_oks_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip4_reasm_oks_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip4_reasm_oks_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip4_reasm_oks_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip4_reasm_oks_min:%s %%5.0lf%%s" % _("Min"),
 
                        "COMMENT: \\n", # empty line
 
@@ -134,13 +134,13 @@ class GraphTemplateIPv4Fragmentation(base.GraphTemplate):
                        "GPRINT:ip4_frags_fails_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip4_frags_fails_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip4_frags_fails_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip4_frags_fails_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip4_frags_fails_min:%s %%5.0lf%%s" % _("Min"),
 
                        "LINE2:ip4_frags_oks%s:%-24s" % (COLOUR_OK, _("Fragmented Packets")),
                        "GPRINT:ip4_frags_oks_cur:%s %%5.0lf%%s" % _("Now"),
                        "GPRINT:ip4_frags_oks_avg:%s %%5.0lf%%s" % _("Avg"),
                        "GPRINT:ip4_frags_oks_max:%s %%5.0lf%%s" % _("Max"),
-                       "GPRINT:ip4_frags_oks_min:%s %%5.0lf%%s\\j" % _("Min"),
+                       "GPRINT:ip4_frags_oks_min:%s %%5.0lf%%s" % _("Min"),
                ]
 
        @property
index 2b7d8d0748f35ce17b1a1d3faebe23c9dd0a89b9..aa5fe8f4a18d281d473ae650b1d86dbda63a3ca9 100644 (file)
@@ -93,14 +93,14 @@ class GraphTemplateLatency(base.GraphTemplate):
                        "LINE2:latency4%s:%s" % (COLOUR_IPV4, _("Latency (IPv4)")),
                        "GPRINT:latency4_max:%12s\:" % _("Maximum") + " %6.2lf",
                        "GPRINT:latency4_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:latency4_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:latency4_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        "AREA:spacer6",
                        "AREA:stddevarea6%s:STACK" % lighten(COLOUR_IPV6, STDDEV_OPACITY),
                        "LINE2:latency6%s:%s" % (COLOUR_IPV6, _("Latency (IPv6)")),
                        "GPRINT:latency6_max:%12s\:" % _("Maximum") + " %6.2lf",
                        "GPRINT:latency6_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:latency6_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:latency6_avg:%12s\:" % _("Average") + " %6.2lf",
                ]
 
        @property
index 7e9aee25907f8e35c3c55d493acdbeae6e9602f9..98ccfe7c7421cb81b2e0cd7cb192064e44d37721 100644 (file)
@@ -40,7 +40,7 @@ class GraphTemplateLoadAvg(base.GraphTemplate):
                                "LINE2:%s%s:%-24s" % (id, colour, _("Load Average %s") % when),
                                "GPRINT:%s_max:%12s\: %%6.2lf" % (id, _("Maximum")),
                                "GPRINT:%s_min:%12s\: %%6.2lf" % (id, _("Minimum")),
-                               "GPRINT:%s_avg:%12s\: %%6.2lf\l" % (id, _("Average")),
+                               "GPRINT:%s_avg:%12s\: %%6.2lf" % (id, _("Average")),
                        ] + rrd_graph
 
                return rrd_graph
index 82791f6e65f661d395b80db2722290f2f613daf0..0828b67e62bde909b80cd9ad76848666ad1e4158 100644 (file)
@@ -37,27 +37,27 @@ class GraphTemplateMemory(base.GraphTemplate):
                        "AREA:used%s:%-15s" % (lighten(MEMORY_USED, AREA_OPACITY), _("Used memory")),
                        "GPRINT:used_max:%12s\:" % _("Maximum") + " %6.2lf" ,
                        "GPRINT:used_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:used_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:used_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        "STACK:buffered%s:%-15s" % (lighten(MEMORY_BUFFERED, AREA_OPACITY), _("Buffered data")),
                        "GPRINT:buffered_max:%12s\:" % _("Maximum") + " %6.2lf" ,
                        "GPRINT:buffered_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:buffered_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:buffered_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        "STACK:cached%s:%-15s" % (lighten(MEMORY_CACHED, AREA_OPACITY), _("Cached data")),
                        "GPRINT:cached_max:%12s\:" % _("Maximum") + " %6.2lf" ,
                        "GPRINT:cached_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:cached_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:cached_avg:%12s\:" % _("Average") + " %6.2lf",
 
 #                      "STACK:free#7799ff:%-15s" % _("Free memory"),
 #                      "GPRINT:free_max:%12s\:" % _("Maximum") + " %6.2lf" ,
 #                      "GPRINT:free_min:%12s\:" % _("Minimum") + " %6.2lf",
-#                      "GPRINT:free_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+#                      "GPRINT:free_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        "LINE3:swap%s:%-15s" % (MEMORY_SWAP, _("Used Swap space")),
                        "GPRINT:swap_max:%12s\:" % _("Maximum") + " %6.2lf" ,
                        "GPRINT:swap_min:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:swap_avg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:swap_avg:%12s\:" % _("Average") + " %6.2lf",
 
                        # Draw the outlines of the areas
                        "LINE1:used%s" % MEMORY_USED,
index 5eeb93c0f1207abc35d78c17a9bb78b9f28ed6bd..26d6dc8d0c8417561d777dca704fa1b064e1c3b0 100644 (file)
@@ -43,67 +43,67 @@ class GraphTemplateProcessor(base.GraphTemplate):
                        "AREA:user_p%s:%-15s" % (CPU_USER, _("User")),
                        "GPRINT:user_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:user_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:user_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:user_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:nice_p=100,nice,*,total,/",
                        "STACK:nice_p%s:%-15s" % (CPU_NICE, _("Nice")),
                        "GPRINT:nice_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:nice_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:nice_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:nice_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:sys_p=100,sys,*,total,/",
                        "STACK:sys_p%s:%-15s" % (CPU_SYS, _("System")),
                        "GPRINT:sys_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:sys_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:sys_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:sys_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:wait_p=100,wait,*,total,/",
                        "STACK:wait_p%s:%-15s" % (CPU_WAIT, _("Wait")),
                        "GPRINT:wait_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:wait_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:wait_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:wait_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:irq_p=100,irq,*,total,/",
                        "STACK:irq_p%s:%-15s" % (CPU_IRQ, _("Interrupt")),
                        "GPRINT:irq_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:irq_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:irq_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:irq_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:sirq_p=100,sirq,*,total,/",
                        "STACK:sirq_p%s:%-15s" % (CPU_SIRQ, _("Soft Interrupt")),
                        "GPRINT:sirq_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:sirq_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:sirq_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:sirq_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:steal_p=100,steal,*,total,/",
                        "STACK:steal_p%s:%-15s" % (CPU_STEAL, _("Steal")),
                        "GPRINT:steal_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:steal_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:steal_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:steal_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:guest_p=100,guest,*,total,/",
                        "STACK:guest_p%s:%-15s" % (CPU_GUEST, _("Guest")),
                        "GPRINT:guest_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:guest_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:guest_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:guest_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:guest_nice_p=100,guest_nice,*,total,/",
                        "STACK:guest_nice_p%s:%-15s" % (CPU_GUEST_NICE, _("Guest Nice")),
                        "GPRINT:guest_nice_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:guest_nice_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:guest_nice_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:guest_nice_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:usage_p=100,usage,*,total,/",
                        "COMMENT:  %-15s" % _("Usage"),
                        "GPRINT:usage_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:usage_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:usage_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:usage_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
 
                        "CDEF:idle_p=100,idle,*,total,/",
                        "STACK:idle_p%s:%-15s" % (CPU_IDLE, _("Idle")),
                        "GPRINT:idle_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",
                        "GPRINT:idle_p_min:%12s\:" % _("Minimum") + " %6.2lf%%",
-                       "GPRINT:idle_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n",
+                       "GPRINT:idle_p_avg:%12s\:" % _("Average") + " %6.2lf%%",
                ]
 
        upper_limit = 100
index e0d4d7eef98dd1589dfa36ac6866726b4748f3b1..684a03fffaaca6b23e499bd60ed1afe30e8bc492 100644 (file)
@@ -54,9 +54,9 @@ class GraphTemplateSensorsTemperature(base.GraphTemplate):
 
                        # Draw the legend
                        "GPRINT:value_c_cur:%10.2lf °C\l",
-                       "GPRINT:value_c_avg:  %-15s %%6.2lf °C\l" % _("Average"),
-                       "GPRINT:value_c_max:  %-15s %%6.2lf °C\l" % _("Maximum"),
-                       "GPRINT:value_c_min:  %-15s %%6.2lf °C\l" % _("Minimum"),
+                       "GPRINT:value_c_avg:  %-15s %%6.2lf °C" % _("Average"),
+                       "GPRINT:value_c_max:  %-15s %%6.2lf °C" % _("Maximum"),
+                       "GPRINT:value_c_min:  %-15s %%6.2lf °C" % _("Minimum"),
 
                        # Empty line
                        "COMMENT: \\n",
@@ -144,11 +144,11 @@ class GraphTemplateSensorsProcessorTemperature(base.GraphTemplate):
                        "CDEF:all_value_c_normal=all_value_c,all_high_c,GT,UNKN,all_value_c,IF",
 
                        "LINE2:all_value_c_high#FF0000",
-                       "LINE2:all_value_c_normal#000000:%-15s\l" % _("Temperature"),
+                       "LINE2:all_value_c_normal#000000:%-15s" % _("Temperature"),
 
-                       "GPRINT:all_value_c_avg:    %-15s %%6.2lf °C\l" % _("Average"),
-                       "GPRINT:all_value_c_max:    %-15s %%6.2lf °C\l" % _("Maximum"),
-                       "GPRINT:all_value_c_min:    %-15s %%6.2lf °C\l" % _("Minimum"),
+                       "GPRINT:all_value_c_avg:    %-15s %%6.2lf °C" % _("Average"),
+                       "GPRINT:all_value_c_max:    %-15s %%6.2lf °C" % _("Maximum"),
+                       "GPRINT:all_value_c_min:    %-15s %%6.2lf °C" % _("Minimum"),
                ]
 
                for id, core, colour in zip(ids, self.objects, self.core_colours):