go-netstat
go-netstat copied to clipboard
A netstat implementation written in Go
Hey all 👋 I forked this library over at git.mills.io/prologic/go-netstat ```#!go import "git.mills.io/prologic/go-netstat" ``` I've merged all outstanding PRs here so far. Hope to maintain this library and improve it....
We need to calculate socket count in listen state and it takes lots of resources to calculate: time ./sbin/zabbix_agent2 -t net.tcp.socket.count[,,,,listen] net.tcp.socket.count[,,,,listen] [s|38983] user 0m32.999s sys 0m0.470s However if we...
编译报错
netstat/netstat.go:42:9: undefined: skStates netstat/netstat.go:55:9: undefined: osTCPSocks netstat/netstat.go:61:9: undefined: osTCP6Socks /netstat/netstat.go:67:9: undefined: osUDPSocks /netstat/netstat.go:73:9: undefined: osUDP6Socks
Fix #12 The process detailed is fetch before executing the function to filter
The following code will throw panic: "tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool { return s.Process.Pid == 6720 })" or "tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool { return s.Process.Pname == "chrome"...
Is there any reason that only windows 64 bit is supported? https://github.com/cakturk/go-netstat/blob/master/netstat/netstat_windows.go#L1
Gracefully close open descriptors