Re: /proc/net/tcp not updated fast enough?
From: Henrik Christian Grove (grove_at_fsr.ku.dk)
Date: 10/27/04
- Previous message: Dorothy Saygin: "l'M REAI||Y SURPR1SED..."
- Maybe in reply to: Henrik Christian Grove: "/proc/net/tcp not updated fast enough?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: linux-kernel@vger.kernel.org Date: 27 Oct 2004 16:14:35 +0200
Herbert Xu <herbert@gondor.apana.org.au> writes:
> Henrik Christian Grove <grove@fsr.ku.dk> wrote:
>
> > I have it running on 11[1] machines and since midnight (it's 11:47 here
> > now) I have 2397 succesfull connections, but in 31 cases (that's 1,29%
> > of the connections - and thus not totally ignorable) I had to read
> > through /proc/net/tcp twice to find the uid. Does that sound plausible,
> > or more like I'm doing something wrong?
>
> /proc/net/tcp in 2.4 is inherently unreliable since it doesn't use
> the seqfile interface. Your best bet is to use the tcp_diag interface
> instead. You can either do that by using the ss command from the
> iproute2 suite, or you can query tcp_diag directly from C through
> netlink.
Thank you for the quick reply. Would you (or anyone else reading this)
happen to have any hints on what to do in Perl? (I know I can call ss,
but maybe there's a module with a nice interface?)
.Henrik
-- "Det er fundamentalt noget humanistisk vås, at der er noget, der hedder blød matematik." --- citat Henrik Jeppesen, dekan for det naturvidenskabelige fakultet - 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/
- Previous message: Dorothy Saygin: "l'M REAI||Y SURPR1SED..."
- Maybe in reply to: Henrik Christian Grove: "/proc/net/tcp not updated fast enough?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|