페이지

2012년 2월 10일 금요일

맥에서 프로세스별 네트워크 상태 알아내기

맥의 netstat 에서는 프로세스가 나오지 않아 어떤게 어떤 포트를 열고 있는지 알아내기가 어렵다.
그러나 다음의 명령으로 알아낼 수가 있다.

$ lsof -i -n -P

결과
COMMAND     PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ubd         583 oldpiano   27u  IPv4 0xffffff80142c6880      0t0  TCP *:49329 (LISTEN)
ubd         583 oldpiano   28u  IPv6 0xffffff80142c2700      0t0  TCP *:49329 (LISTEN)
ubd         583 oldpiano   38u  IPv4 0xffffff801b50dc20      0t0  TCP 192.168.1.76:50429->23.3.100.224:443 (CLOSE_WAIT)
ubd         583 oldpiano   39u  IPv4 0xffffff801823ca40      0t0  TCP 192.168.1.76:57528->23.3.100.224:443 (CLOSE_WAIT)
ubd         583 oldpiano   40u  IPv4 0xffffff802950f4e0      0t0  TCP 192.168.1.76:60564->23.3.100.224:443 (CLOSE_WAIT)
Mail        589 oldpiano   25u  IPv4 0xffffff801b50c6c0      0t0  TCP 192.168.1.76:49344->219.101.189.73:993 (ESTABLISHED)
Mail        589 oldpiano   36u  IPv4 0xffffff80294ee4e0      0t0  TCP 192.168.1.76:55611->219.101.189.73:993 (ESTABLISHED)
Mail        589 oldpiano   37u  IPv4 0xffffff801b6b86c0      0t0  TCP 192.168.1.76:49355->219.101.189.73:993 (ESTABLISHED)
Mail        589 oldpiano   39u  IPv4 0xffffff801b6b7880      0t0  TCP 192.168.1.76:49363->17.158.28.53:443 (CLOSE_WAIT)
Mail        589 oldpiano   42u  IPv4 0xffffff801b6b7160      0t0  TCP 192.168.1.76:49366->17.158.28.53:443 (CLOSE_WAIT)
Mail        589 oldpiano   53u  IPv4 0xffffff802502fde0      0t0  TCP 192.168.1.76:55632->219.101.189.73:993 (ESTABLISHED)
SystemUIS   604 oldpiano    6u  IPv4 0xffffff8013ef7ac0      0t0  UDP *:*
Adobe\x20  4444 oldpiano   80u  IPv6 0xffffff80142c1080      0t0  TCP *:8765 (LISTEN)
Adobe\x20  4444 oldpiano  127u  IPv6 0xffffff80142c1800      0t0  TCP *:10137 (LISTEN)
Adobe\x20  4444 oldpiano  128u  IPv6 0xffffff80142c1f80      0t0  TCP [::1]:49453->[::1]:49452 (TIME_WAIT)
Adobe\x20  4444 oldpiano  129u  IPv6 0xffffff80142c1440      0t0  TCP *:20080 (LISTEN)
Adobe\x20  4444 oldpiano  137u  IPv6 0xffffff80142c0cc0      0t0  TCP 192.168.1.76:51354->192.168.1.151:22 (ESTABLISHED)
Adobe\x20  4444 oldpiano  141u  IPv6 0xffffff80142c1bc0      0t0  TCP [::192.168.1.76]:51336->[::192.168.1.151]:22 (CLOSED)
Adobe\x20  4444 oldpiano  169u  IPv6 0xffffff80142c2340      0t0  TCP 192.168.1.76:62885->219.101.189.39:22 (ESTABLISHED)
ssh        8660 oldpiano    3u  IPv4 0xffffff8025063880      0t0  TCP 192.168.1.76:60248->219.103.181.212:1975 (ESTABLISHED)
SecureCRT 39172 oldpiano   21u  IPv4 0xffffff80291654e0      0t0  TCP 192.168.1.76:64377->192.168.1.151:22 (ESTABLISHED)
Finder    43325 oldpiano   13u  IPv4 0xffffff8013ef7658      0t0  UDP *:*

댓글 없음:

댓글 쓰기