Open shirou opened 8 years ago
:+1: great to see that you are taking this on!
looking forward to this, thanks for your work @shirou!
OK. now I have implemented linux version at #169. The output is same as psutil, but more tests are required.
sysctl net.inet.tcp.pcblist
returnes xtcpcb
struct. But since it is complicated to parse to golang struct, time should be required.
To get NetConnections, proc_pidinfo()
is required and it seems to invoke by only CGO. I am thinking net
is also use CGO or not. Or, the net.inet.tcp.pcblist
is exists on Darwin also, the FreeBSD code may be used on Darwin, too. I will challenge after FreeBSD.
not yet...
It takes a time to implement, I think prioritize v2.
Is this dead in the water? I'm seeing flakiness with using lsof where the command never finishes.
@NullSoldier what platform do you want to replace lsof?
142 , #143 are related to using lsof to get Network connection info.
To replace lsof, we needs at least these functions. inet_ntop porting, sysctl decode functions, and so on are little bit heavy to implement. I will update this issue step by step.