OS_Linux&Unix

[Unix/Linux] 포트 프로세스 확인

최선을 다하자! 2022. 10. 6. 11:01

1. netstat 명령어로 해당 port의 ID 알아내기

 

netstat -Aan | grep [PORT]

# netstat -Aan | grep 7000

 

 

Example

 

# netstat -Aan | grep 7000
f100100012387000 udp4       0      0  *.*                   *.*                  
f100100001a07000 udp4       0      0  127.0.0.1.51196       *.*                  
f10010000c3f7000 udp4       0      0  169.254.172.xx.51470  *.*                  
f100100000cf7000 udp4       0      0  169.254.172.xx.51481  *.*                  
f10010000b2d7000 udp4       0      0  169.254.172.xxx51786  *.*                  
f100100008287000 udp4       0      0  169.254.172.xx.54243  *.*                  
f1001000086f7000 udp4       0      0  169.254.172.xxx.33181  *.*                  
f1001000113b7000 udp4       0      0  127.0.0.1.5xx90       *.*                  
f10010000c3c7000 udp4       0      0  127.0.0.1.3xx75       *.*                  
f1001000027d7000 udp4       0      0  127.0.0.1.xx995       *.*                  
f10010000b787000 udp4       0      0  127.0.0.1.xxx70       *.*                  
f100100001347000 udp4       0      0  169.254.172.xx.6xx77  *.*                  
f100100001537000 udp4       0      0  169.254.172.xxx.39xx0  *.*                  
f10010000f7b7000 udp4       0      0  127.0.0.1.39xx5       *.*                  
f1001000029c7000 udp4       0      0  169.254.172.xx.644xx  *.*                  
f100100016bc7000 udp4       0      0  127.0.0.1.xxx       *.*

 

 

 

 

 

2. ps -ef 명령어를 이용하여 프로세스 확인 

 

# ps -ef | grep [PORT]

# ps -ef | grep 6000

 

 

Example

 

# ps -ef | grep 6000
  jwchoi 22872724 51577558   0 10:55:24  pts/0  0:00 grep 6000
  jwchoi 30474792        1   0 10:41:48  pts/6  0:00 WSL -C dom=simpapp -g 1 -i 2000 -u node1 -U /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/simpapp/ULOG -m 0 -A -- -n //211.110.82.xxx:6000 -p 6001 -P 6099 -w WSH -t 15 -m 3 -M 10 -x 10