summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: db2d925)
raw | patch | inline | side by side (parent: db2d925)
author | Marek Becka <marek.becka@superhosting.cz> | |
Fri, 22 Nov 2013 14:57:10 +0000 (15:57 +0100) | ||
committer | Marek Becka <marek.becka@superhosting.cz> | |
Fri, 22 Nov 2013 14:57:10 +0000 (15:57 +0100) |
src/tcpconns.c | patch | blob | history |
diff --git a/src/tcpconns.c b/src/tcpconns.c
index 3f96345dac8ac1c9142d3cbba2f560d230682724..8fbc1a48a676de89a30715f4c7bd1742b8180948 100644 (file)
--- a/src/tcpconns.c
+++ b/src/tcpconns.c
{
"ListeningPorts",
"LocalPort",
- "RemotePort"
+ "RemotePort",
+ "AllPortsSummary"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
static int port_collect_listening = 0;
-static int port_collect_total = 1;
+static int port_collect_total = 0;
static port_entry_t *port_list_head = NULL;
static uint32_t count_total[TCP_STATE_MAX + 1];
} linux_source = SRC_DUNNO;
#endif
-static void connt_prepare_vl (value_list_t *vl, value_t *values)
+static void conn_prepare_vl (value_list_t *vl, value_t *values)
{
vl->values = values;
vl->values_len = 1;
value_list_t vl = VALUE_LIST_INIT;
int i;
- connt_prepare_vl (&vl, values);
+ conn_prepare_vl (&vl, values);
if (((port_collect_listening != 0) && (pe->flags & PORT_IS_LISTENING))
|| (pe->flags & PORT_COLLECT_LOCAL))
value_list_t vl = VALUE_LIST_INIT;
int i;
- connt_prepare_vl (&vl, values);
+ conn_prepare_vl (&vl, values);
- sstrncpy (vl.plugin, "all", sizeof (vl.plugin));
+ sstrncpy (vl.plugin_instance, "all", sizeof (vl.plugin_instance));
for (i = 1; i <= TCP_STATE_MAX; i++)
{
else
pe->flags |= PORT_COLLECT_REMOTE;
}
+ else if (strcasecmp (key, "AllPortsSummary") == 0)
+ {
+ if (IS_TRUE (value))
+ port_collect_total = 1;
+ else
+ port_collect_total = 0;
+ }
else
{
return (-1);