4 ms·
I wonder what the parent PID of these processes is.
by josephcsible 4y ago
I wonder what the parent PID of these processes is.
- cmeacham98 4y agoinit has a ppid of 0, which effectively is a special value that means the kernel. These processes probably also do the same thing (and thus, ppid=0 is a good way to detect kernel-started processes).
- sounds 4y agoThat's what the "kthreadd" kernel process is for. Try this command: ps axo pid,ppid,comm | less The kernel-created processes will all have "kthreadd" as their Parent Process ID (PPID). Typically init and kthreadd are the only processes with a PPID of 0.
- CameronNemo 4y agoYep, and aiui kthreadd on Linux always has a PID of 2. If you are ever trying to filter out kernel processes from ps output (and usermode helpers, apparently), you can check if the pid is 2 or ppid is 2.