modules/admin-full: filter localhost<->localhost connections live connection graph

This commit is contained in:
Jo-Philipp Wich 2012-11-27 14:16:42 +00:00
parent ce8a22d1b4
commit e689fa8900
2 changed files with 8 additions and 2 deletions

View file

@ -8,8 +8,6 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
$Id$
-%> -%>
<%+header%> <%+header%>
@ -161,6 +159,10 @@ $Id$
for (var i = 0; i < conn.length; i++) for (var i = 0; i < conn.length; i++)
{ {
var c = conn[i]; var c = conn[i];
if (c.src == '127.0.0.1' && c.dst == '127.0.0.1')
continue;
var tr = conn_table.rows[0].parentNode.insertRow(-1); var tr = conn_table.rows[0].parentNode.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2)); tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2));

View file

@ -536,6 +536,10 @@ static int run_daemon(void)
if (strstr(line, "TIME_WAIT")) if (strstr(line, "TIME_WAIT"))
continue; continue;
if (strstr(line, "src=127.0.0.1 ") &&
strstr(line, "dst=127.0.0.1 "))
continue;
if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname)) if (sscanf(line, "%*s %*d %s", ifname) || sscanf(line, "%s %*d", ifname))
{ {
if (!strcmp(ifname, "tcp")) if (!strcmp(ifname, "tcp"))