Raspberry Pi_Kor_19.3.3 “/proc/PID/”의 개별 process 정보 확인


Published Book on Amazon


All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1

All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)

최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


19.3.3  "/proc/<PID>/"의 개별 process 정보 확인

 

먼저 <Motion> 프로그램에 대한 process를 조회해 보면 아래와 같이 PID "9223" process가 있다. 해당 process에 대한 CMD 항목을 보면 "/usr/bin/motion"라는 내용이 표시되어 있다.

 

pi@raspberrypi ~ $ ps -C motion -f

UID        PID  PPID  C STIME TTY          TIME CMD

motion    9223     1  2 10:42 ?        00:00:01 /usr/bin/motion

 

이제 PID 세부정보를 확인하기 위해 "/proc/9223" 확인하면 내부에 많은 자료가 있는 것을 알 수 있다.


그림 19‑6 "/proc/<PID>/" 폴더의 정보

 

"/proc/9223/cmdline"의 내용을 보면 다음과 같이 <Motion> 프로그램을 실행한 command가 저장되어 있는 것을 알 수 있다. 위의 ps 명령에서 확인한 것과 동일한 내용임을 알 수 있다.

 

pi@raspberrypi ~ $ cat /proc/9223/cmdline

/usr/bin/motion


 

 

 

 

 

 

 

 

 

 

This Page is Left Intentionally Blank

 

Leave a Reply