Closed GoogleCodeExporter closed 9 years ago
Not the same as direct system calls as we'd be doing in psutil, but there is a
Python netstat parser module out there that supports various platforms:
http://code.activestate.com/pypm/pynetstat/
Original comment by jlo...@gmail.com
on 31 May 2013 at 2:59
I think this is basically what I was looking for too. Right now I'm running
lsof in a subprocess to find processes listening on specific ports ("lsof -i")
or using specific sockets ("lsof -U"), and then using psutil to query some info
on those processes, but it would be great if I could just do
psutil.get_connections(kind=KIND) with KIND being "inet" or "socket" and being
able to filter those myself. The advantage being that this would be more cross
platform then my lsof subprocess commands.
Original comment by mroo...@gmail.com
on 24 Jul 2013 at 3:25
Note(s) to self as I stopped working on this for a while and need to figure out
where I left.
Linux: revision eea7b8cf93cc
Windows: revision 563f08ae6892
FreeBSD: revision 6e91124e047c
SunOS: revision 77972d06c769
What appears to be missing is the OSX implementation.
Most updated code currently lives in "netstat2" HG branch.
All implementations are previous to 2.0 version so they need some namings
readaptation.
Original comment by g.rodola
on 11 Mar 2014 at 2:54
netstat source code for OSX:
http://opensource.apple.com/source/network_cmds/network_cmds-329.2.1/netstat.tpr
oj/inet.c
Original comment by g.rodola
on 12 Mar 2014 at 11:57
[deleted comment]
OK, this is done and all implementations were merged into master.
Original comment by g.rodola
on 8 Apr 2014 at 12:07
Original comment by g.rodola
on 8 Apr 2014 at 10:13
Original issue reported on code.google.com by
g.rodola
on 31 May 2013 at 2:14