quarta-feira, 2 de abril de 2014

Descobrindo quais programas usam a internet em segundo plano

Para descobrir quais programas usam a internet em segundo plano, rode o comando lsof com os flags -P -i

$ lsof -P  -i  
COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
CopyAgent  1824 nando   24u  IPv4  11997      0t0  TCP *:8445 (LISTEN)
CopyAgent  1824 nando   25u  IPv4  11999      0t0  UDP *:8445 
CopyAgent  1824 nando   26u  IPv4 260834      0t0  TCP 192.168.1.101:34784->64.235.151.8:443 (ESTABLISHED)
firefox    2091 nando   54u  IPv4 273910      0t0  TCP 192.168.1.101:37783->gru06s11-in-f24.1e100.net:443 (ESTABLISHED)
firefox    2091 nando   60u  IPv4 275182      0t0  TCP 192.168.1.101:49123->gru06s11-in-f15.1e100.net:443 (ESTABLISHED)
firefox    2091 nando   65u  IPv4 273923      0t0  TCP 192.168.1.101:49126->gru06s11-in-f15.1e100.net:443 (ESTABLISHED)
firefox    2091 nando   66u  IPv4 275206      0t0  TCP 192.168.1.101:45148->gru06s11-in-f0.1e100.net:443 (ESTABLISHED)
firefox    2091 nando   68u  IPv4 275207      0t0  TCP 192.168.1.101:60943->gru06s11-in-f6.1e100.net:80 (ESTABLISHED)
firefox    2091 nando   69u  IPv4 273937      0t0  TCP 192.168.1.101:54530->a23-52-155-27.deploy.static.akamaitechnologies.com:80 (ESTABLISHED)
chrome    18935 nando   72u  IPv4 269319      0t0  TCP 192.168.1.101:49100->gru06s11-in-f15.1e100.net:443 (ESTABLISHED)
chrome    18935 nando  110u  IPv4 269351      0t0  TCP 192.168.1.101:57907->yv-in-f191.1e100.net:443 (ESTABLISHED)
chrome    18935 nando  125u  IPv4 269125      0t0  TCP 192.168.1.101:40359->yv-in-f95.1e100.net:443 (ESTABLISHED)
chrome    18935 nando  127u  IPv4 269818      0t0  TCP 192.168.1.101:35678->lhr08s02-in-f15.1e100.net:443 (ESTABLISHED)
chrome    18935 nando  139u  IPv4 273175      0t0  TCP 192.168.1.101:57322->gru06s11-in-f3.1e100.net:443 (ESTABLISHED)

Usando um filtro

$ lsof -P  -i  | cut -f 1 -d " " | uniq 
COMMAND
CopyAgent
firefox
chrome

Note que temos o agente CopyAgent (armazenamento nas nuvens) rodando em segundo plano e os navegadores firefox e google-chrome (chrome) acessando a internet).


Nenhum comentário:

Postar um comentário