Re: /proc/net/ip_conntrack problems

From: Keith Owens (kaos@ocs.com.au)
Date: Sun Oct 28 2001 - 23:27:52 EST


On Sun, 28 Oct 2001 22:08:54 -0600,
Taral <taral@taral.net> wrote:
>% dd if=/proc/net/ip_conntrack bs=128 | wc -l
>0+0 records in
>0+0 records out
> 0
>% dd if=/proc/net/ip_conntrack bs=256 | wc -l
>0+3 records in
>0+3 records out
> 3
>Can anyone explain this? (2.4.13-ac3) It's wreaking havoc with my
>program.

Some /proc output is blocked, it will only return complete lines. If
your buffer is not big enough to hold the next line then you don't get
anything at all. Try cat /proc/net/ip_conntrack | wc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 31 2001 - 21:00:36 EST