

RSS (Resident Set Size) is the portion of RAM (Physical Memory) that a process is using. VSZ is used to show the amount of virtual memory used by process.

The processes with PIDs 62 don’t have any child processes. We can continue inspection in the same manner: $ ls /proc/6246/taskĪs we see from the output of the execution of the above commands, the process with PID 6246 has only one child.

The PIDs of the child processes of the parent process with PID 6245 is in the /proc/6245/task/6245/children file, namely 62. There is only one directory, /proc/6245/task/6245, since our process is not multi-threaded. We have the directory /proc/6245 for the process obtained by running the parent.sh script. Keeping in mind the explanations so far, let’s investigate the directory structure in our example: $ ls /proc/6245/task The subdirectory corresponding to the main thread is the same as the PID of the process. Hence, we called the name of this subdirectory as (thread id). There is one subdirectory in the /proc//task directory for each thread of the process. The name of each subdirectory is the PID of the corresponding process. The /proc directory contains one subdirectory for each running process. Let’s explain the directory structure a little bit. We can find the PIDs of the child processes of a parent process in the children files located in the /proc//task/ directories. It contains information about the kernel, system, and processes. In fact, this isn’t a directory but a virtual file system mounted at /proc automatically by the system. We can also find the child processes of a parent process using the /proc directory.
