Determining number of active connections
Hi all,
I'd like to be able to monitor (trend) the number of tracked connections in iptables; however, doing something like "cat /proc/net/ip_conntrack | wc -l" eats up too much CPU to run with regularity (we track somewhere in the realm of 200,000 connections).
Is there a way to just pull the total number? It'd be nice to know that we aren't even getting close to the number of connections set in the sysctl.
Thanks!
--
Jason Faulkner
Linux Systems Engineer
Mailtrust, a division of Rackspace
Quoted 10 lines · On Tuesday 10 March 2009, [email protected] wrote:
Hi all,
I'd like to be able to monitor (trend) the number of tracked connections in iptables; however, doing something like "cat
/proc/net/ip_conntrack| wc -l" eats up too much CPU to run with regularity (we track somewhere in the realm of 200,000 connections).Is there a way to just pull the total number? It'd be nice to know that we aren't even getting close to the number of connections set in the sysctl.
Hi,
check out the following files:
/proc/sys/net/ipv4/netfilter/{ip_conntrack_count,ip_conntrack_max}
Signature · 1 line
So long... Fuzz
-----Original Message-----
From: "Erik Wasser" <[email protected]>
Sent: Tuesday, March 10, 2009 11:22am
To: [email protected]
Cc: [email protected]
Subject: Re: Determining number of active connections
Quoted 3 lines
check out the following files:
/proc/sys/net/ipv4/netfilter/{ip_conntrack_count,ip_conntrack_max}
Thanks for this information :) This is awesome for my new firewalls.
However, I have a few old 2.4 kernel firewalls (RHEL3), and they don't seem to have an ip_conntrack_count anywhere. Is there something for those?
--
Jason Faulkner
Linux Systems Engineer
Mailtrust, a division of Rackspace
Quoted 5 lines · [email protected] wrote:
Hi all,
I'd like to be able to monitor (trend) the number of tracked connections in iptables; however, doing something like "cat
/proc/net/ip_conntrack| wc -l" eats up too much CPU to run with regularity (we track somewhere in the realm of 200,000 connections).Is there a way to just pull the total number? It'd be nice to know that we aren't even getting close to the number of connections set in the sysctl.
$ cat /proc/sys/net/netfilter/nf_conntrack_count
or with the conntrack-tools-0.9.11
# conntrack -C
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers