From: Afi Gjermund <afigjermund@gmail.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: Re: nf_conntrack_count versus '/proc/net/nf_conntrack | wc -l' count
Date: Mon, 15 Feb 2010 11:45:33 -0800 [thread overview]
Message-ID: <48ceaa831002151145y5a22aa32qe08c0d3401c652c2@mail.gmail.com> (raw)
In-Reply-To: <48ceaa831002151130j3c96c72an40653869aac63814@mail.gmail.com>
On Mon, Feb 15, 2010 at 11:30 AM, Afi Gjermund <afigjermund@gmail.com> wrote:
> On Mon, Feb 15, 2010 at 11:00 AM, Jan Engelhardt <jengelh@medozas.de> wrote:
>>
>> On Monday 2010-02-15 19:04, Afi Gjermund wrote:
>>>>>>
>>>>>> I am running into an odd issue where the kernel begins to drop packets
>>>>>> because the connection tracking table is full. (I am running
>>>>>> 2.6.26.5).
>>>>>>
>>>>>> A 'cat /proc/sys/net/netfilter/nf_conntrack_count' says 4096. But if
>>>>>> I do a 'cat /proc/net/nf_conntrack | wc -l' then it says 4.
>>>>>
>>>>>Conntracks might exist and not be in the global table anymore,
>>>>>f.i. when referenced by a packet. The difference in your case
>>>>>seems pretty extreme, so I'd guess that packets are leaked
>>>>>somewhere.
>>>>
>>>> So, that would make for 4092 expected connections then?
>>>>
>>>> Afi, what would `conntrack -L expect` give?
>> (meant: conntrack -L expect | wc -l)
>>
>>>One thing to
>>>note is, I have stopped any traffic flowing through the device, and
>>>yet I am still receiving the kernel drop messages. Any change its
>>>connection tracking on the loopback? ( I use the loopback for IPC ).
>>
>> Yes. conntrack does not care about what interface packets
>> come in or go out on. Unless it's NOTRACKed, it's counted.
>>
> Okay, after some tinkering I was able to get the userspace application
> going. The results, however, do not seem that helpful.
>
> root@00:00:10:73:77:64 ~# ./conntrack -L expect | wc -l
> conntrack v0.9.14 (conntrack-tools): 0 expectations have been shown.
> 0
>
> root@titan ~# ./conntrack -L conntrack
> udp 17 179 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=89099
> bytes=12968758 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=110358
> bytes=17041625 [ASSURED] mark=0 use=1
> udp 17 179 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=87867
> bytes=12816098 src=0.0.0.0 dst=0.0.0.0 sport=0 dport=0 packets=107497
> bytes=16573614 [ASSURED] mark=0 use=1
> conntrack v0.9.14 (conntrack-tools): 2 flow entries have been shown.
>
> root@titan ~# cat /proc/sys/net/netfilter/nf_conntrack_count
> 4096
>
> root@titan ~# ./conntrack -S
> entries 4096
> searched 2525930
> found 418064263
> new 295548
> invalid 1509
> ignore 233351
> delete 291452
> delete_list 280256
> insert 280258
> insert_failed 0
> drop 69960
> early_drop 173185
> icmp_error 45
> expect_new 0
> expect_create 0
> expect_delete 0
>
Oops..wrong machine...
root@titan ~# ./conntrack -L expect | wc -l
conntrack v0.9.14 (conntrack-tools): 0 expectations have been shown.
0
next prev parent reply other threads:[~2010-02-15 19:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 17:27 nf_conntrack_count versus '/proc/net/nf_conntrack | wc -l' count Afi Gjermund
2010-02-15 17:29 ` Patrick McHardy
2010-02-15 17:46 ` Jan Engelhardt
2010-02-15 18:04 ` Afi Gjermund
2010-02-15 19:00 ` Jan Engelhardt
2010-02-15 19:30 ` Afi Gjermund
2010-02-15 19:45 ` Afi Gjermund [this message]
2010-02-15 20:04 ` Eric Dumazet
2010-02-15 20:33 ` Jan Engelhardt
2010-02-15 21:08 ` Afi Gjermund
2010-02-15 21:52 ` Eric Dumazet
2010-02-15 22:00 ` Afi Gjermund
2010-02-15 22:02 ` Eric Dumazet
2010-02-15 22:10 ` Afi Gjermund
2010-02-18 17:40 ` Afi Gjermund
2010-02-18 17:51 ` Eric Dumazet
2010-02-18 17:55 ` Afi Gjermund
2010-02-18 18:07 ` Eric Dumazet
2010-02-18 18:13 ` Afi Gjermund
2010-02-18 18:19 ` Patrick McHardy
2010-02-18 19:39 ` Afi Gjermund
2010-02-19 0:53 ` Afi Gjermund
2010-02-19 14:12 ` Eric Dumazet
2010-02-19 14:29 ` Patrick McHardy
2010-02-18 18:12 ` Douglas Diniz
2010-02-18 18:22 ` Patrick McHardy
2010-02-18 18:35 ` Douglas Diniz
2010-02-15 21:17 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48ceaa831002151145y5a22aa32qe08c0d3401c652c2@mail.gmail.com \
--to=afigjermund@gmail.com \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).