Giter Club home page Giter Club logo

gonetstat's People

Contributors

drael avatar ringtail avatar shahar481 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gonetstat's Issues

Support bug with process detection

Hello!

I'm using your library for checking case "is this port already listened by somebody".

I've following test code:

        tcp_listeners := GOnetstat.Tcp()

        for _, process := range tcp_listeners {
                file_logger.Printf("Port %d listened by %v", process.Port, process)
        }

I've following output from your code:

installlog: 2016/06/23 10:22:26 Port 2003 listened by {root Python2.7 16628 /usr/bin/python2.7 LISTEN 127.0.0.1 2003 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 179 listened by {root Gobgpd (Deleted) 1746 /opt/dps/libraries/gobgp_1_4_0_git/gobgpd (deleted) LISTEN 0.0.0.0 179 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 2004 listened by {root Python2.7 16628 /usr/bin/python2.7 LISTEN 127.0.0.1 2004 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 11551 /usr/sbin/sshd LISTEN 0.0.0.0 22 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 7002 listened by {root Python2.7 16628 /usr/bin/python2.7 LISTEN 127.0.0.1 7002 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 2812 listened by {root Nginx 15571 /usr/sbin/nginx LISTEN 0.0.0.0 2812 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 2813 listened by {root Monit 17957 /usr/bin/monit LISTEN 127.0.0.1 2813 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 9090 listened by {www-data Php5 17507 /usr/bin/php5 LISTEN 127.0.0.1 9090 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 8009 listened by {root Tera_tsdb 16744 /opt/dps/app/bin/tera_tsdb LISTEN 127.0.0.1 8009 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 27017 listened by {mongodb Mongod 16205 /usr/bin/mongod LISTEN 127.0.0.1 27017 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 8010 listened by {root Nginx 15571 /usr/sbin/nginx LISTEN 0.0.0.0 8010 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 6060 listened by {root Gobgpd (Deleted) 1746 /opt/dps/libraries/gobgp_1_4_0_git/gobgpd (deleted) LISTEN 127.0.0.1 6060 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 80 listened by {root Nginx 15571 /usr/sbin/nginx LISTEN 0.0.0.0 80 0.0.0.0 0}
installlog: 2016/06/23 10:22:26 Port 40768 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40768 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40962 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40962 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40845 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40845 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40937 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40937 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40984 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40984 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40777 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40777 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40928 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40928 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40821 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40821 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40799 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40799 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40851 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40851 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40912 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40912 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40778 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40778 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40913 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40913 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40983 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40983 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40802 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40802 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40789 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40789 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40875 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40875 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40841 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40841 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40924 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40924 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40843 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40843 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40884 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40884 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40814 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40814 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40906 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40906 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40825 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40825 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40829 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40829 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40826 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40826 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40981 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40981 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40896 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40896 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40865 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40865 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40809 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40809 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40786 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40786 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40939 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40939 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40891 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40891 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40867 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40867 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40856 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40856 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40922 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40922 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40929 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40929 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40832 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40832 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40820 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40820 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40824 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40824 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40819 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40819 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40942 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40942 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40798 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40798 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40816 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40816 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40899 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40899 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40953 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40953 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40803 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40803 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40828 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40828 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40793 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40793 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40970 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40970 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40985 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40985 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40964 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40964 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40973 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40973 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40958 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40958 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40968 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40968 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40934 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40934 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40866 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40866 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40975 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40975 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40914 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40914 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40794 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40794 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40888 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40888 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40783 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40783 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40916 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40916 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40881 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40881 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 18625 /usr/sbin/sshd ESTABLISHED 136.243.59.116 22 116.31.116.38 50739}
installlog: 2016/06/23 10:22:26 Port 40861 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40861 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40978 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40978 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40971 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40971 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40894 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40894 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40945 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40945 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40846 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40846 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 136.243.59.116 22 116.31.116.38 33947}
installlog: 2016/06/23 10:22:26 Port 40972 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40972 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40904 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40904 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40930 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40930 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40823 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40823 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40979 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40979 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40895 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40895 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40941 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40941 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40834 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40834 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40792 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40792 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40944 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40944 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40940 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40940 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40812 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40812 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40887 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40887 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40897 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40897 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40956 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40956 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40885 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40885 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40936 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40936 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40818 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40818 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40833 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40833 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40838 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40838 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40943 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40943 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40986 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40986 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40900 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40900 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40988 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40988 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40911 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40911 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40860 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40860 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40805 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40805 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40909 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40909 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40876 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40876 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40880 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40880 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 54458 listened by {root Installer 18631 /installer ESTABLISHED 136.243.59.116 54458 136.243.59.72 10777}
installlog: 2016/06/23 10:22:26 Port 40898 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40898 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40859 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40859 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40935 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40935 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40848 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40848 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40927 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40927 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40987 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40987 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40918 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40918 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40974 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40974 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40882 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40882 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40949 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40949 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40955 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40955 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40976 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40976 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40797 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40797 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40850 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40850 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40801 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40801 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40871 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40871 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 18627 /usr/sbin/sshd ESTABLISHED 136.243.59.116 22 116.31.116.38 64373}
installlog: 2016/06/23 10:22:26 Port 40863 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40863 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40902 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40902 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40879 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40879 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40813 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40813 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40989 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40989 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40790 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40790 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40780 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40780 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40926 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40926 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40905 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40905 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40781 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40781 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40827 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40827 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40982 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40982 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40862 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40862 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40951 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40951 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40782 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40782 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40806 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40806 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40769 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40769 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40772 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40772 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40853 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40853 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40810 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40810 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40893 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40893 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40870 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40870 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40771 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40771 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40773 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40773 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40872 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40872 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40969 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40969 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40948 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40948 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40776 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40776 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40836 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40836 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40877 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40877 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40967 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40967 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40890 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40890 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40837 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40837 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40889 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40889 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40952 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40952 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40770 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40770 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40767 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40767 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40779 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40779 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40919 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40919 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40961 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40961 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 136.243.59.116 22 116.31.116.38 61340}
installlog: 2016/06/23 10:22:26 Port 40901 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40901 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40965 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40965 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40963 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40963 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40925 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40925 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40959 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40959 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40811 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40811 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40791 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40791 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40857 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40857 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40931 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40931 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40774 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40774 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40847 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40847 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40830 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40830 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40932 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40932 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40933 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40933 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40852 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40852 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40947 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40947 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40795 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40795 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40915 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40915 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 14178 /usr/sbin/sshd ESTABLISHED 136.243.59.116 22 109.68.46.238 24786}
installlog: 2016/06/23 10:22:26 Port 40807 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40807 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40957 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40957 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40854 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40854 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 47069 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 47069 127.0.0.1 80}
installlog: 2016/06/23 10:22:26 Port 40878 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40878 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40858 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40858 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40796 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40796 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40788 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40788 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40868 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40868 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40921 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40921 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40886 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40886 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40784 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40784 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40804 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40804 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 14365 /usr/sbin/sshd ESTABLISHED 136.243.59.116 22 104.131.151.107 58704}
installlog: 2016/06/23 10:22:26 Port 40844 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40844 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40785 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40785 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40855 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40855 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40817 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40817 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40849 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40849 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40822 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40822 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40775 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40775 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 22 listened by {root Sshd 15068 /usr/sbin/sshd ESTABLISHED 136.243.59.116 22 104.131.151.107 58988}
installlog: 2016/06/23 10:22:26 Port 40839 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40839 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40960 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40960 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40954 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40954 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40874 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40874 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40923 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40923 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40980 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40980 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40950 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40950 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40840 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40840 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40831 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40831 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40938 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40938 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40808 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40808 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40873 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40873 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40815 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40815 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40842 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40842 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40864 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40864 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40903 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40903 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40910 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40910 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40869 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40869 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40883 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40883 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40920 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40920 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40907 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40907 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40917 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40917 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40892 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40892 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40946 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40946 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40835 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40835 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 48177 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 136.243.59.116 48177 136.243.59.72 80}
installlog: 2016/06/23 10:22:26 Port 40800 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40800 127.0.0.1 2003}
installlog: 2016/06/23 10:22:26 Port 40966 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40966 127.0.0.1 2003}

And please check netstat -apnt output in same time:

netstat -apnt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:2003          0.0.0.0:*               LISTEN      18876/python    
tcp        0      0 0.0.0.0:179             0.0.0.0:*               LISTEN      1746/gobgpd     
tcp        0      0 127.0.0.1:2004          0.0.0.0:*               LISTEN      18876/python    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      11551/sshd      
tcp        0      0 127.0.0.1:7002          0.0.0.0:*               LISTEN      18876/python    
tcp        0      0 0.0.0.0:2812            0.0.0.0:*               LISTEN      18715/nginx.conf
tcp        0      0 127.0.0.1:2813          0.0.0.0:*               LISTEN      17957/monit     
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      17507/php5      
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      18832/mongod    
tcp        0      0 127.0.0.1:8009          0.0.0.0:*               LISTEN      16744/tera_tsdb 
tcp        0      0 0.0.0.0:8010            0.0.0.0:*               LISTEN      18715/nginx.conf
tcp        0      0 127.0.0.1:6060          0.0.0.0:*               LISTEN      1746/gobgpd     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      18715/nginx.conf
tcp        0      0 127.0.0.1:42339         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42207         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42310         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42315         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42320         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42173         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42265         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42344         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42325         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42198         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42245         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42293         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42164         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42172         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42294         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42321         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42219         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42308         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42170         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42351         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42307         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42228         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42262         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42183         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42261         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42252         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42211         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42345         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42278         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42246         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42309         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42229         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42326         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42166         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:48537         127.0.0.1:80            TIME_WAIT   -               
tcp        0      0 127.0.0.1:42303         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42357         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42254         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42263         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42327         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42316         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42359         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42336         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42150         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42241         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42165         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42274         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42352         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42177         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42191         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42222         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42179         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42328         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42178         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42275         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42347         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42203         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42210         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42299         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42181         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42237         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42271         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42311         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42153         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42329         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42298         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42242         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42220         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42343         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42156         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42221         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42194         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42318         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42286         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42184         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42348         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42226         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42174         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42341         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42331         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42157         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42189         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42215         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42260         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42208         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42195         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42330         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42169         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42277         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42337         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42272         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42353         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42240         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42256         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42253         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42244         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42227         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42233         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42270         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42334         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42354         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42196         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42148         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42200         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42313         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42273         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42267         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42171         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42147         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42234         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42197         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42205         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42257         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42349         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42209         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42212         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42290         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42350         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42239         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42297         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42268         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42312         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42301         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42163         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42296         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42306         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42356         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42292         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42323         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42332         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42186         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42283         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42236         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42193         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42192         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42214         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42232         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42338         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42235         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42322         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42159         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42230         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42151         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42155         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42266         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42300         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42201         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42269         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42185         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42319         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42288         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42187         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42304         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42231         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42282         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42168         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42342         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42188         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42333         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42258         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42317         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42355         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42314         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42158         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42202         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42161         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42149         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42238         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42213         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42291         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42264         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42247         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42259         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 136.243.59.116:22       109.68.46.238:24786     ESTABLISHED 14178/0         
tcp        0      0 127.0.0.1:42284         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42167         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42216         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42199         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42217         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 136.243.59.116:22       104.131.151.107:58704   ESTABLISHED 14316/sshd: odintso
tcp        0      0 127.0.0.1:42190         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42218         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42324         127.0.0.1:2003          TIME_WAIT   -               
tcp        0  25728 136.243.59.116:22       104.131.151.107:58988   ESTABLISHED 15017/sshd: odintso
tcp        0      0 127.0.0.1:42162         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42251         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42358         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42249         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42276         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42225         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42160         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42175         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42285         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42223         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42280         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42180         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42335         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42154         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42204         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42287         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42224         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42243         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42206         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42346         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42302         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42176         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42295         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42248         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42152         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42279         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42289         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42250         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42305         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42281         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42340         127.0.0.1:2003          TIME_WAIT   -               
tcp        0      0 127.0.0.1:42182         127.0.0.1:2003          TIME_WAIT   -               
tcp6       0      0 :::179                  :::*                    LISTEN      1746/gobgpd     
tcp6       0      0 :::22                   :::*                    LISTEN      11551/sshd      
tcp6       0      0 :::50051                :::*                    LISTEN      1746/gobgpd     
tcp6       0      0 127.0.0.1:50052         :::*                    LISTEN      17554/dps       
tcp6       0      0 :::80                   :::*                    LISTEN      18715/nginx.conf

But in yout output we have "Acpid" as port owner:

installlog: 2016/06/23 10:22:26 Port 40937 listened by {root Acpid 903 /usr/sbin/acpid TIME_WAIT 127.0.0.1 40937 127.0.0.1 2003}

And it's actually incorrect. These connections are not listening any ports. So we need to use "" or something like "unknown" for their names.

What's your idea about it?

fatal error: unexpected signal during runtime execution

code:
d := GOnetstat.Tcp()
env: centos7 go version go1.8.3 linux/amd64

error:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7fcc4a9f0c13]

runtime stack:
runtime.throw(0x894a30, 0x2a)
        /usr/lib/golang/src/runtime/panic.go:596 +0x95
runtime.sigpanic()
        /usr/lib/golang/src/runtime/signal_unix.go:274 +0x2db

goroutine 18 [syscall, locked to thread]:
runtime.cgocall(0x6dafe0, 0xc4200457f8, 0x400001)
        /usr/lib/golang/src/runtime/cgocall.go:131 +0xe2 fp=0xc4200457b0 sp=0xc420045770
os/user._Cfunc_mygetpwuid_r(0x0, 0xc4203b2e40, 0x7fcc5c000b20, 0x400, 0xc4202a6200, 0x0)
        os/user/_obj/_cgo_gotypes.go:178 +0x4d fp=0xc4200457f8 sp=0xc4200457b0
os/user.lookupUnixUid.func1.1(0x0, 0xc4203b2e40, 0x7fcc5c000b20, 0x400, 0xc4202a6200, 0xc4200458a0)
        /usr/lib/golang/src/os/user/lookup_unix.go:100 +0x175 fp=0xc420045850 sp=0xc4200457f8
os/user.lookupUnixUid.func1(0x10)
        /usr/lib/golang/src/os/user/lookup_unix.go:104 +0x50 fp=0xc420045890 sp=0xc420045850
os/user.retryWithBuffer(0xc42031c9f0, 0xc420045988, 0xc42031c9f0, 0xc42002a800)
        /usr/lib/golang/src/os/user/lookup_unix.go:253 +0x2b fp=0xc4200458f8 sp=0xc420045890
os/user.lookupUnixUid(0x0, 0x0, 0x0, 0x0)
        /usr/lib/golang/src/os/user/lookup_unix.go:105 +0x161 fp=0xc4200459c0 sp=0xc4200458f8
os/user.lookupUserId(0xc4202ba17c, 0x1, 0x876345, 0xc4202ba14e, 0x2)
        /usr/lib/golang/src/os/user/lookup_unix.go:86 +0x73 fp=0xc4200459f8 sp=0xc4200459c0
os/user.LookupId(0xc4202ba17c, 0x1, 0x0, 0xc4200a8b40, 0x2)
        /usr/lib/golang/src/os/user/lookup.go:21 +0x35 fp=0xc420045a30 sp=0xc4200459f8
github.com/drael/GOnetstat.getUser(0xc4202ba17c, 0x1, 0xc4202ba14e, 0x2)
        /home/hxn/go/src/github.com/drael/GOnetstat/gonetstat.go:184 +0x35 fp=0xc420045a68 sp=0xc420045a30
github.com/drael/GOnetstat.netstat(0x87692f, 0x3, 0x0, 0x7fcc63146e10, 0x0)
        /home/hxn/go/src/github.com/drael/GOnetstat/gonetstat.go:223 +0x329 fp=0xc420045c10 sp=0xc420045a68
github.com/drael/GOnetstat.Tcp(0x80c640, 0x0, 0xc420200510)
        /home/hxn/go/src/github.com/drael/GOnetstat/gonetstat.go:240 +0x36 fp=0xc420045c48 sp=0xc420045c10
main.getProcessPortMap(0xc4201c8f40)

findPid cant not get pid when readlink from a non-auth file.

func findPid(inode string) string {
    // Loop through all fd dirs of process on /proc to compare the inode and
    // get the pid.

    pid := "-"

    d, err := filepath.Glob("/proc/[0-9]*/fd/[0-9]*")
    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }

    re := regexp.MustCompile(inode)
    for _, item := range(d) {
        path, _ := os.Readlink(item)
        out := re.FindString(path)
        if len(out) != 0 {
            pid = strings.Split(item, "/")[2]
        }
    }
    return pid
}

I think path, _ := os.Readlink(item) this error should be more obviously to users.

License question

Hi! I notice that there is no license for this work. Is that intentional or just an oversight? I would be great to clarify that.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.