본문 바로가기
IT/TIL

process id를 확인할 수 없을 때

by Better Me 2022. 4. 2.

특정 포트를 사용 중인 process를 확인하기 위해

netstat -tulp | grep 포트번호
netstat -ano | grep 포트번호

를 통해 확인하곤 한다.

 

그런데 이번에 ec2에서 작업 중 위 명령어를 쳤으나 pid를 return받지 못했다.

- 혹은 off라고 return 받은 모습

구글링을 통해 권한 문제인 것을 확인했다.

https://unix.stackexchange.com/questions/97752/how-to-identify-a-process-which-has-no-pid

 

How to identify a process which has no pid?

I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid : netstat -antlp | grep 45136 tcp 0 0 ...

unix.stackexchange.com

간단히 sudo 명령어를 통해 해결하였다. 

sudo를 통해 해결!

'IT > TIL' 카테고리의 다른 글

[Django] WSL2, Ubuntu 20.04 - mysqlclient 설치 오류  (0) 2022.04.01
[Django] Swagger 문서 자동화(drf-yasg)  (0) 2022.03.29

댓글