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 Checking Each Process Information in "/proc/<PID>/"
First, if you look up the process for <Motion> program, there is PID "9223" process as below. The CMD entry for the process shows "/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 |
Now, when you check "/proc/9223" to see the PID details, you can see that there is a lot of data inside.
Figure 19‑6 Information in "/proc/<PID>/" folder
If you look at the contents of "/proc/9223/cmdline", you can see that the command that executed the <Motion> program is stored as follows. You can see that this is the same thing you see in the "ps" command above.
pi@raspberrypi ~ $ cat /proc/9223/cmdline |
/usr/bin/motion |