mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrik Christian Grove <grove@fsr.ku.dk>
To: linux-kernel@vger.kernel.org
Subject: Re: /proc/net/tcp not updated fast enough?
Date: 27 Oct 2004 16:14:35 +0200	[thread overview]
Message-ID: <7g7jpcp7sk.fsf@serena.fsr.ku.dk> (raw)
In-Reply-To: <2TV6i-i1-5@gated-at.bofh.it>

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

       reply	other threads:[~2004-10-27 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2TTnT-7q3-31@gated-at.bofh.it>
     [not found] ` <2TV6i-i1-5@gated-at.bofh.it>
2004-10-27 14:14   ` Henrik Christian Grove [this message]
2004-10-27 10:21 Henrik Christian Grove
2004-10-27 12:15 ` Herbert Xu

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=7g7jpcp7sk.fsf@serena.fsr.ku.dk \
    --to=grove@fsr.ku.dk \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®