서버 네트워크 연결 보기

$ netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 0.0.0.0:640                 0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:8001                0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:612                 0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:3333                0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:873                 0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:682                 0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:54927               0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
tcp        0      0 10.18.105.11:60920          10.18.105.11:3306           ESTABLISHED 
tcp        0      0 127.0.0.1:80                127.0.0.1:39949             TIME_WAIT   
tcp        0      0 10.18.105.11:22             10.18.105.228:53750         ESTABLISHED 
tcp        0      0 10.18.105.11:22             10.18.105.228:61598         ESTABLISHED 
tcp        0      0 10.18.105.11:3306           10.18.105.11:60920          ESTABLISHED 
tcp        0      0 10.18.105.11:22             10.18.105.228:50195         ESTABLISHED 
tcp        0      0 10.18.105.11:22             10.18.105.67:52151          ESTABLISHED 
$ netstat -ant |awk '/^tcp/ {++state[$6]} END {for(key in state) printf("%-10s\t%d
",key,state[key])}' TIME_WAIT 1 ESTABLISHED 6 LISTEN     15

좋은 웹페이지 즐겨찾기