summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/statistics
diff options
context:
space:
mode:
authorfantom-x <fantom-x@users.noreply.github.com>2017-04-29 11:26:16 -0400
committerfantom-x <fantom-x@users.noreply.github.com>2017-04-29 12:38:23 -0400
commit5bf636732efab13fdd92dabfd746cafb156dd4f6 (patch)
tree919d8d3bbf8b37f268e1ff62ea4b89ae6284a9c0 /applications/luci-app-statistics/luasrc/statistics
parenta83f0edec21ddd562636e61fd8dcf2fee5b97632 (diff)
Support for collectd-mod-contextswitch
Signed-off-by: Marc Benoit marcb6218@gmail.com
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua
new file mode 100644
index 0000000000..6826e12adb
--- /dev/null
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua
@@ -0,0 +1,23 @@
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.statistics.rrdtool.definitions.contextswitch",package.seeall)
+
+function rrdargs( graph, plugin, plugin_instance, dtype )
+
+ return {
+ title = "%H: Context switches",
+ alt_autoscale = true,
+ vlabel = "Switches/s",
+ number_format = "%5.0lf",
+ data = {
+ types = { "contextswitch" },
+ sources = {
+ contextswitch = { "value" }
+ },
+ options = {
+ contextswitch = { color = "0000ff", title = "Context switches", noarea=true, overlay=true }
+ }
+ }
+ }
+end
+