From: Ivan S. <is...@im...> - 2005-04-30 08:40:57
|
On Friday 29 April 2005 15:44, Vlad Yasevich wrote: > Thing is, the current info available in /proc/net/sctp is not > really enough to satisfy netstat. That made me investigate the details of netstat. 'active connections' can be read from /proc/net/sctp/assocs 'listening sockets' can be read from /proc/net/sctp/eps Statistics can be read from /proc/net/sctp/snmp But then I discovered the -p option, which lists which programs are using the sockets. There is no way for netstat to get that information because it cannot map an inode number to assocs/eps. For tcp/udp/raw sockets netstat traverses /proc/*/fd/* and matches that to the inode number reported in /proc/net/{udp,udp6,tcp,tpc6,raw,raw6}. For SCTP a proc interface for mapping inode number to assocs/eps is needed. Putting the inode number directly into assocs/eps should be enough. The uid of the socket also needs to be available. Sridhar: I retract my previous comment that the proc interface looked complete. There is stuff missing. > I had add a new interface (a kernel patch) and then the patch > the netstat was fairly simple. I am looking forward to it. /isj |