* want to add per-socket stats, what is best way to extract data?
@ 2002-06-05 19:07 Chris Friesen
0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2002-06-05 19:07 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-05 19:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-05 19:07 want to add per-socket stats, what is best way to extract data? Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox