]> git.ipfire.org Git - collecty.git/blobdiff - src/collecty/plugins/memory.py
Add some magic to collecty that makes the graph templates smaller
[collecty.git] / src / collecty / plugins / memory.py
index 4db09f1d37ed068baca1c2e890400716eb804240..6569a80b18c0a7a34f1a5ac87b3a3103b727121c 100644 (file)
@@ -34,51 +34,30 @@ class GraphTemplateMemory(base.GraphTemplate):
                _ = self.locale.translate
 
                return [
-                       "DEF:used=%(file)s:used:AVERAGE",
-                       "DEF:cached=%(file)s:cached:AVERAGE",
-                       "DEF:buffered=%(file)s:buffered:AVERAGE",
-                       "DEF:free=%(file)s:free:AVERAGE",
-                       "DEF:swap=%(file)s:swap:AVERAGE",
-
                        "AREA:used#90EE90:%-15s" % _("Used memory"),
-                       "VDEF:usedmin=used,MINIMUM",
-                       "VDEF:usedmax=used,MAXIMUM",
-                       "VDEF:usedavg=used,AVERAGE",
-                       "GPRINT:usedmax:%12s\:" % _("Maximum") + " %6.2lf" ,
-                       "GPRINT:usedmin:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:usedavg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:used_max:%12s\:" % _("Maximum") + " %6.2lf" ,
+                       "GPRINT:used_min:%12s\:" % _("Minimum") + " %6.2lf",
+                       "GPRINT:used_avg:%12s\:" % _("Average") + " %6.2lf\\n",
 
                        "STACK:buffered#4169E1:%-15s" % _("Buffered data"),
-                       "VDEF:bufferedmin=buffered,MINIMUM",
-                       "VDEF:bufferedmax=buffered,MAXIMUM",
-                       "VDEF:bufferedavg=buffered,AVERAGE",
-                       "GPRINT:bufferedmax:%12s\:" % _("Maximum") + " %6.2lf" ,
-                       "GPRINT:bufferedmin:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:bufferedavg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:buffered_max:%12s\:" % _("Maximum") + " %6.2lf" ,
+                       "GPRINT:buffered_min:%12s\:" % _("Minimum") + " %6.2lf",
+                       "GPRINT:buffered_avg:%12s\:" % _("Average") + " %6.2lf\\n",
 
                        "STACK:cached#FFD700:%-15s" % _("Cached data"),
-                       "VDEF:cachedmin=cached,MINIMUM",
-                       "VDEF:cachedmax=cached,MAXIMUM",
-                       "VDEF:cachedavg=cached,AVERAGE",
-                       "GPRINT:cachedmax:%12s\:" % _("Maximum") + " %6.2lf" ,
-                       "GPRINT:cachedmin:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:cachedavg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:cached_max:%12s\:" % _("Maximum") + " %6.2lf" ,
+                       "GPRINT:cached_min:%12s\:" % _("Minimum") + " %6.2lf",
+                       "GPRINT:cached_avg:%12s\:" % _("Average") + " %6.2lf\\n",
 
 #                      "STACK:free#7799ff:%-15s" % _("Free memory"),
-#                      "VDEF:freemin=free,MINIMUM",
-#                      "VDEF:freemax=free,MAXIMUM",
-#                      "VDEF:freeavg=free,AVERAGE",
-#                      "GPRINT:freemax:%12s\:" % _("Maximum") + " %6.2lf" ,
-#                      "GPRINT:freemin:%12s\:" % _("Minimum") + " %6.2lf",
-#                      "GPRINT:freeavg:%12s\:" % _("Average") + " %6.2lf\\n",
+#                      "GPRINT:free_max:%12s\:" % _("Maximum") + " %6.2lf" ,
+#                      "GPRINT:free_min:%12s\:" % _("Minimum") + " %6.2lf",
+#                      "GPRINT:free_avg:%12s\:" % _("Average") + " %6.2lf\\n",
 
                        "LINE3:swap#ff0000:%-15s" % _("Used Swap space"),
-                       "VDEF:swapmin=swap,MINIMUM",
-                       "VDEF:swapmax=swap,MAXIMUM",
-                       "VDEF:swapavg=swap,AVERAGE",
-                       "GPRINT:swapmax:%12s\:" % _("Maximum") + " %6.2lf" ,
-                       "GPRINT:swapmin:%12s\:" % _("Minimum") + " %6.2lf",
-                       "GPRINT:swapavg:%12s\:" % _("Average") + " %6.2lf\\n",
+                       "GPRINT:swap_max:%12s\:" % _("Maximum") + " %6.2lf" ,
+                       "GPRINT:swap_min:%12s\:" % _("Minimum") + " %6.2lf",
+                       "GPRINT:swap_avg:%12s\:" % _("Average") + " %6.2lf\\n",
                ]
 
        @property