* Querry about contrack
@ 2003-01-30 19:48 Dhirendra Pal Singh
2003-01-30 20:59 ` Athan
0 siblings, 1 reply; 2+ messages in thread
From: Dhirendra Pal Singh @ 2003-01-30 19:48 UTC (permalink / raw)
To: netfilter
Hi All,
Is it possible to find
A) number of packets recived and send,
B) no of connections existing
on the basis of port no. ???
Does contrack keeps a track of it.. or something else...
I think somwehere in /proc contrack keeps a list of the active
connections.. but I need the info to analyse it in my piece of c code.
Any ideas how can I do that..
Thanks in Advance
Dp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Querry about contrack
2003-01-30 19:48 Querry about contrack Dhirendra Pal Singh
@ 2003-01-30 20:59 ` Athan
0 siblings, 0 replies; 2+ messages in thread
From: Athan @ 2003-01-30 20:59 UTC (permalink / raw)
To: Dhirendra Pal Singh; +Cc: netfilter
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
On Thu, Jan 30, 2003 at 11:48:47AM -0800, Dhirendra Pal Singh wrote:
> Is it possible to find
>
> A) number of packets recived and send,
> B) no of connections existing
> on the basis of port no. ???
>
> Does contrack keeps a track of it.. or something else...
> I think somwehere in /proc contrack keeps a list of the active
> connections.. but I need the info to analyse it in my piece of c code.
A simple "cat /proc/net/ip_conntrack | wc -l" will tell you how many
connections are currently being tracked. This does include possibly
failed connections as well though ([UNREPLIED]), so some use of grep or
perl on the output is probably a good idea.
As for the packets received/sent, you'd have to either set up
accounting targets per port (ick), or simply LOG every such packet and
then count the matching lines in the syslog file(s). Ugh.
Maybe ULOG or similar can be of help with this.
-Ath
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-30 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30 19:48 Querry about contrack Dhirendra Pal Singh
2003-01-30 20:59 ` Athan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.