return [
"AREA:ctxt%s:%-15s" % (
- util.lighten(PRIMARY, AREA_OPACITY),
+ lighten(PRIMARY, AREA_OPACITY),
_("Context Switches"),
),
"GPRINT:ctxt_max:%12s\:" % _("Maximum") + " %6.2lf" ,
import os
from ..constants import *
-from .. import util
+from ..colours import *
from . import base
from ..i18n import _
"VDEF:percentage_left_now=percentage_left,LAST",
# Area for the used space
- "AREA:used%s:%s" % (util.lighten(LIGHT_RED, .66), _("Used")),
+ "AREA:used%s:%s" % (lighten(LIGHT_RED, .66), _("Used")),
"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",
# Stacked area of unused space
- "AREA:free%s:%s:STACK" % (util.lighten(LIGHT_GREEN, .66), _("Free")),
+ "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",
"CDEF:percentage_left=100,percentage_used,-",
# Area for the used inodes
- "AREA:inodes_used%s:%s" % (util.lighten(LIGHT_RED, .66), _("Used")),
+ "AREA:inodes_used%s:%s" % (lighten(LIGHT_RED, .66), _("Used")),
"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",
# Stacked area of unused inodes
- "AREA:inodes_free%s:%s:STACK" % (util.lighten(LIGHT_GREEN, .66), _("Free")),
+ "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",
"VDEF:bits_tx_95p=bits_tx,95,PERCENT",
# Draw the received area.
- "AREA:bits_rx%s:%-15s" % (util.lighten(COLOUR_RX, AREA_OPACITY), _("Received")),
+ "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",
# Draw the transmitted area.
- "AREA:bits_tx%s:%-15s" % (util.lighten(COLOUR_TX, AREA_OPACITY), _("Transmitted")),
+ "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",
return [
# Draw the received area.
"AREA:packets_rx%s:%-15s" % (
- util.lighten(COLOUR_RX, AREA_OPACITY), _("Received"),
+ lighten(COLOUR_RX, AREA_OPACITY), _("Received"),
),
"GPRINT:packets_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:packets_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
# Draw the transmitted area.
"AREA:packets_tx%s:%-15s" % (
- util.lighten(COLOUR_TX, AREA_OPACITY), _("Transmitted"),
+ lighten(COLOUR_TX, AREA_OPACITY), _("Transmitted"),
),
"GPRINT:packets_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:packets_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
# Draw the receive errors.
"AREA:errors_rx%s:%-15s" % (
- util.lighten(COLOUR_RX, AREA_OPACITY), _("Receive errors"),
+ lighten(COLOUR_RX, AREA_OPACITY), _("Receive errors"),
),
"GPRINT:errors_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:errors_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
# Draw the transmit errors.
"AREA:errors_tx_inv%s:%-15s" % (
- util.lighten(COLOUR_TX, AREA_OPACITY), _("Transmit errors"),
+ lighten(COLOUR_TX, AREA_OPACITY), _("Transmit errors"),
),
"GPRINT:errors_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:errors_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
# Draw the receive drops.
"LINE2:dropped_rx%s:%-15s" % (
- util.lighten(AMBER, AREA_OPACITY), _("Receive drops"),
+ lighten(AMBER, AREA_OPACITY), _("Receive drops"),
),
"GPRINT:dropped_rx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:dropped_rx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
# Draw the transmit drops.
"LINE2:dropped_tx%s:%-15s" % (
- util.lighten(TEAL, AREA_OPACITY), _("Transmit drops"),
+ lighten(TEAL, AREA_OPACITY), _("Transmit drops"),
),
"GPRINT:dropped_tx_max:%12s\: " % _("Maximum") + _("%8.0lf %spps"),
"GPRINT:dropped_tx_min:%12s\: " % _("Minimum") + _("%8.0lf %spps"),
return [
"AREA:intr%s:%-15s" % (
- util.lighten(PRIMARY, AREA_OPACITY), _("System Interrupts"),
+ lighten(PRIMARY, AREA_OPACITY), _("System Interrupts"),
),
"GPRINT:intr_max:%12s\:" % _("Maximum") + " %6.2lf" ,
"GPRINT:intr_min:%12s\:" % _("Minimum") + " %6.2lf" ,
# Reassembly
"AREA:ip6_reasm_real_fails%s:%-24s" % \
- (util.lighten(COLOUR_ERROR), _("Failed Reassemblies")),
+ (lighten(COLOUR_ERROR), _("Failed Reassemblies")),
"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"),
"AREA:ip6_reasm_timeout%s:%-24s:STACK" % \
- (util.lighten(COLOUR_WARN), _("Reassembly Timeouts")),
+ (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"),
# Reassembly
"AREA:ip4_reasm_real_fails%s:%-24s" % \
- (util.lighten(COLOUR_ERROR), _("Failed Reassemblies")),
+ (lighten(COLOUR_ERROR), _("Failed Reassemblies")),
"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"),
"AREA:ip4_reasm_timeout%s:%-24s:STACK" % \
- (util.lighten(COLOUR_WARN), _("Reassembly Timeouts")),
+ (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"),
from . import base
from ..i18n import _
-from .. import util
from ..colours import *
class GraphTemplateMemory(base.GraphTemplate):
_ = self.locale.translate
return [
- "AREA:used%s:%-15s" % (util.lighten(MEMORY_USED, AREA_OPACITY), _("Used memory")),
+ "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",
- "STACK:buffered%s:%-15s" % (util.lighten(MEMORY_BUFFERED, AREA_OPACITY), _("Buffered data")),
+ "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",
- "STACK:cached%s:%-15s" % (util.lighten(MEMORY_CACHED, AREA_OPACITY), _("Cached data")),
+ "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",