From: Michael Tremer Date: Mon, 21 Sep 2020 09:58:02 +0000 (+0000) Subject: processors: Plot steal and guest usage in graphs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c789c929be78e7e3a989aa3531247a445c4a5b6e;p=collecty.git processors: Plot steal and guest usage in graphs Signed-off-by: Michael Tremer --- diff --git a/src/collecty/colours.py b/src/collecty/colours.py index f0eb7da..c17710d 100644 --- a/src/collecty/colours.py +++ b/src/collecty/colours.py @@ -131,6 +131,8 @@ CPU_SYS = RED CPU_WAIT = DEEP_PURPLE CPU_IRQ = ORANGE CPU_SIRQ = YELLOW +CPU_STEAL = LIGHT_BLUE +CPU_GUEST = PINK CPU_IDLE = LIGHT_GREY # Memory diff --git a/src/collecty/plugins/processor.py b/src/collecty/plugins/processor.py index 4629743..68d144a 100644 --- a/src/collecty/plugins/processor.py +++ b/src/collecty/plugins/processor.py @@ -33,7 +33,7 @@ class GraphTemplateProcessor(base.GraphTemplate): _ = self.locale.translate return [ - "CDEF:total=user,nice,+,sys,+,wait,+,irq,+,sirq,+,idle,+", + "CDEF:total=user,nice,+,sys,+,wait,+,irq,+,sirq,+,steal,+,guest,+,idle,+", "CDEF:user_p=100,user,*,total,/", "AREA:user_p%s:%-15s" % (CPU_USER, _("User")), @@ -71,6 +71,18 @@ class GraphTemplateProcessor(base.GraphTemplate): "GPRINT:sirq_p_min:%12s\:" % _("Minimum") + " %6.2lf%%", "GPRINT:sirq_p_avg:%12s\:" % _("Average") + " %6.2lf%%\\n", + "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", + + "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", + "CDEF:idle_p=100,idle,*,total,/", "STACK:idle_p%s:%-15s" % (CPU_IDLE, _("Idle")), "GPRINT:idle_p_max:%12s\:" % _("Maximum") + " %6.2lf%%",