From: Chris Friesen <cfriesen@nortelnetworks.com>
To: linux-kernel@vger.kernel.org
Subject: want to add per-socket stats, what is best way to extract data?
Date: Wed, 05 Jun 2002 15:07:09 -0400 [thread overview]
Message-ID: <3CFE615D.ECBCCF91@nortelnetworks.com> (raw)
I'm considering adding per-socket statistics, starting with number of skbuffs
received and number of skbuffs dropped due to no memory.
The actual accounting is fairly straightforward (just add entries to struct sock
and increment as appropriate in sock_queue_rcv_skb() and sock_queue_err_skb()),
but I'm trying to figure out the best way to make the stats available.
I had considered two possibilities, and it may make sense to use both.
The first would be to expand sock_ioctl() to first check for generic socket
commands before calling the protocol specific ioctl() routines. This allows for
easy usage from within userspace binaries. The second would be to have socket
statistics shown under /proc/<pid>/fd/<fd number>. This would allow for easy
script/human access.
Does anyone have any comments about either of these, or about the desirability
of this in general?
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
reply other threads:[~2002-06-05 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3CFE615D.ECBCCF91@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--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