Re: [Ganglia-general] tcpconn.py and netstat

2012-02-28 Thread Carlo Marcelo Arenas Belon
On Mon, Feb 27, 2012 at 11:12:39AM -0500, Chris Burroughs wrote:
 Currently tcpconn.py uses netstat to get it's socket stats.  This gives
 lots of detail but is far too slow for much production use (running
 netstat can take many minutes).

tcpconn.py was originally written as an advanced python module example 
as it shows how to do multithreaded modules and how to poll metric 
information from an external source. 

it was found useful enough and some people enabled it, if it made
sense for their environments (definitely not in HPC, or high traffic) 
but since it is a module it can be replaced for something that fits 
better on your environment like the proposal you had.

 /proc/net/sockstat gives less
 information but has no performance problems.  There was a suggestion
 previously to use the ss command, but (1) it's less common (at least not
 part of the default on RHEL5) and (2) it also lacks the high fidelity
 details.
 
 Is there any other reason to prefer ss over cat?  Should this replace
 tcpconn, or be a new module?

most likely (for the reasons explained above) would be a new module 
and if you are concerned about performance, mos likely in C

Carlo  

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general


[Ganglia-general] tcpconn.py and netstat

2012-02-27 Thread Chris Burroughs
Currently tcpconn.py uses netstat to get it's socket stats.  This gives
lots of detail but is far too slow for much production use (running
netstat can take many minutes). /proc/net/sockstat gives less
information but has no performance problems.  There was a suggestion
previously to use the ss command, but (1) it's less common (at least not
part of the default on RHEL5) and (2) it also lacks the high fidelity
details.

Is there any other reason to prefer ss over cat?  Should this replace
tcpconn, or be a new module?

Example output:

$  cat /proc/net/sockstat
sockets: used 292
TCP: inuse 1103 orphan 974 tw 701725 alloc 1104 mem 1096
UDP: inuse 6 mem 1
UDPLITE: inuse 0
RAW: inuse 0
FRAG: inuse 0 memory 0

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general