원문 : http://www.ischo.net -- 조인상 // 시스템 엔지니어

Writer : http://www.ischo.net -- ischo // System Engineer in Replubic Of Korea

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Writer : http://www.ischo.net -- ischo // System Engineer

+++++++++++++++++++++++++++++++++++++++++++++++++++++++


How to identify process ID which opened specific TCP port without install lsof 




1. Listing Listening port number.  ex) Show socket listening TCP 21 port.

[root :/]# netstat -anA | grep LISTEN
f1000d0001bed390 tcp        0      0  *.21               *.*                LISTEN
f1000d00002e3390 tcp4       0      0  *.22               *.*                LISTEN
f1000d0002a7ab90 tcp4       0      0  *.80               *.*                LISTEN
f1000d0000458390 tcp4       0      0  *.111              *.*                LISTEN
f1000d0002776390 tcp4       0      0  *.443              *.*                LISTEN

f1000d0001bed390 is socket address which listening TCP 21 port.

 


2. Retriving ProcessID from socket address.
[root :/]# rmsock f1000d0001bed390 tcpcb
The socket 0x1bed000 is being held by proccess 626780 (inetd).

 

rmsock command is used to remove socket.

If you try to delete the socket address that the process is holding, Show PID with message "The socket is being held by process"

Socket And the socket will not be terminated.


 

 

3. Identifying Process

[root :/]# ps -ef | grep 626780
    root  626780       1   0  9¿ù 28ÀÏ      -  0:00 /usr/sbin/inetd -d

 

Now we found the process.

 

 

 

 

No. Subject Author Date Views
Notice [공지] 게시자료 열람자유. 불펌금지입니다. 조인상 2010.12.07 119807
211 SAS RAID controller for AIX [1] file ischo 2017.02.04 21147
210 TCP dump in AIX environment [1] ischo 2014.12.05 34225
209 Change hostname in AIX ischo 2013.04.30 50033
208 SIGNAL NUMBERS in KILL command ischo 2013.02.16 33716
207 Maximum number of thread per process in AIX ischo 2013.02.06 40415
206 Install Apache webserver(source compile) in AIX 6.1 ischo 2013.02.01 53697
205 How to identify processor core in AIX ischo 2013.01.10 107114
204 Shell script : Check named alive & start that if it dead. [1] ischo 2012.12.26 33118
203 AIX Tuning point - CPU,MEM,VG + FAQ [1] ischo 2012.11.20 46849
» how to identify process ID which opened specific TCP port without install lsof ischo 2012.10.17 65983
201 p시리즈 장비 OP패널에서 강제 shutdown 방법 조인상 2012.10.13 32319
200 [IBM] x시리즈 M3,M4 블레이드센터 제원 조인상 2012.10.06 26695
199 IBM System x Sales Tech and Sales School 조인상 2012.08.09 31207
198 Power6 System Reference Code 조인상 2012.08.09 30911
197 IBM x3650 M3 Service Guide file 조인상 2012.08.04 31837
196 펌웨어 업그레이드 for old p5 series Servers(SF240-417) file ischo 2012.07.26 29306
195 디버그툴 dbx 사용법 file 조인상 2012.07.26 38638
194 IBM AIX Version 6.1 Differences Guide file 조인상 2012.07.26 48685
193 IBM AIX Version 7.1 Differences Guide file 조인상 2012.07.26 39368
192 p시리즈 펌웨어 업데이트 방법 조인상 2012.07.20 39885
Requesting to the server, please wait.