원문 : 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 190885
211 SAS RAID controller for AIX [1] file ischo 2017.02.04 39623
210 TCP dump in AIX environment [1] ischo 2014.12.05 51191
209 Change hostname in AIX ischo 2013.04.30 65402
208 SIGNAL NUMBERS in KILL command ischo 2013.02.16 50028
207 Maximum number of thread per process in AIX ischo 2013.02.06 58189
206 Install Apache webserver(source compile) in AIX 6.1 ischo 2013.02.01 69484
205 How to identify processor core in AIX ischo 2013.01.10 122756
204 Shell script : Check named alive & start that if it dead. [1] ischo 2012.12.26 49942
203 AIX Tuning point - CPU,MEM,VG + FAQ [1] ischo 2012.11.20 63381
» how to identify process ID which opened specific TCP port without install lsof ischo 2012.10.17 81696
201 p시리즈 장비 OP패널에서 강제 shutdown 방법 조인상 2012.10.13 43126
200 [IBM] x시리즈 M3,M4 블레이드센터 제원 조인상 2012.10.06 38762
199 IBM System x Sales Tech and Sales School 조인상 2012.08.09 48986
198 Power6 System Reference Code 조인상 2012.08.09 48579
197 IBM x3650 M3 Service Guide file 조인상 2012.08.04 48378
196 펌웨어 업그레이드 for old p5 series Servers(SF240-417) file ischo 2012.07.26 46193
195 디버그툴 dbx 사용법 file 조인상 2012.07.26 51420
194 IBM AIX Version 6.1 Differences Guide file 조인상 2012.07.26 66665
193 IBM AIX Version 7.1 Differences Guide file 조인상 2012.07.26 56300
192 p시리즈 펌웨어 업데이트 방법 조인상 2012.07.20 52526
Requesting to the server, please wait.