Como obter o número do pid que conecta ao ip externo?

1

Algum programa foi conectado do meu ip local 111.111.111.111 com 130.239.18.176:80, como obter o número pid?

 netstat  -np
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 111.111.111.111:46243    52.89.80.240:443        TIME_WAIT   -               
tcp        0      1 111.111.111.111:36553    173.239.79.210:443      SYN_SENT    2630/firefox-esr
tcp        0      0 111.111.111.111:48470    130.239.18.176:80       ESTABLISHED -               
tcp        0      1 111.111.111.111:36552    173.239.79.210:443      SYN_SENT    2630/firefox-esr
tcp        0      1 111.111.111.111:34202    74.125.204.101:80       SYN_SENT    2630/firefox-esr
tcp        0      0 111.111.111.111:52243    203.208.48.79:443       ESTABLISHED 2630/firefox-esr
tcp        0      1 111.111.111.111:46521    74.125.203.93:443       SYN_SENT    2630/firefox-esr
tcp        0      1 111.111.111.111:34200    74.125.204.101:80       SYN_SENT    2630/firefox-esr
tcp        0      0 111.111.111.111:48424    130.239.18.176:80       ESTABLISHED -               
tcp        0      0 111.111.111.111:46238    52.89.80.240:443        TIME_WAIT   -               
tcp        0      1 111.111.111.111:46523    74.125.203.93:443       SYN_SENT    2630/firefox-esr
tcp        0      0 111.111.111.111:34204    74.125.204.101:80       TIME_WAIT   -               
tcp        0      0 111.111.111.111:33700    104.24.98.177:443       ESTABLISHED 2630/firefox-esr
tcp        0      1 111.111.111.111:34206    74.125.204.101:80       SYN_SENT    2630/firefox-esr
tcp        0      0 127.0.0.1:49941         127.0.0.1:80            ESTABLISHED 2630/firefox-esr
    
por it_is_a_literature 28.02.2017 / 11:47

1 resposta

1

A saída netstat explica isso bastante bem:

(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)

Basta executá-lo como root (por exemplo, sudo netstat -np )

    
por 28.02.2017 / 17:18

Tags