From d35a620e9f5665a94967f4bd02c93581a1dd7e00 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 27 May 2008 12:23:39 +0000 Subject: commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e Author: Felix Fietkau Date: Tue May 27 13:56:12 2008 +0200 rename src/ to luasrc/ --- .../definitions/tcpconns/tcp_connections.lua | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 applications/luci-statistics/luasrc/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua (limited to 'applications/luci-statistics/luasrc/statistics/rrdtool/definitions/tcpconns') diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua new file mode 100644 index 0000000000..0493574948 --- /dev/null +++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua @@ -0,0 +1,27 @@ +module("luci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall) + +function rrdargs( graph, host, plugin, plugin_instance, dtype ) + + dtype_instances = { + "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED", "LAST_ACK", "TIME_WAIT", + "CLOSING", "CLOSE_WAIT", "CLOSED", "FIN_WAIT1", "FIN_WAIT2" + } + + opts = { } + opts.sources = { } + opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype ) + opts.title = host .. ": TCP-Verbindungen - Port " .. plugin_instance + opts.rrd = { "-v", "Anzahl" } + opts.colors = { + + } + + for i, inst in ipairs(dtype_instances) do + opts.sources[i] = { + name = inst, + rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst ) + } + end + + return opts +end -- cgit v1.2.3