As the basic operating unit of the operating system, each process has a unique process ID. To view the running status of each program, use the pstree command.
By default, the CentOS 7 system installed with minimal installation does not have the pstree command.
Directly typing the command will display an error message saying pstree command not found: -bash: pstree: command not found. In this case, you need to install the pstree command separately.
You can enter the following code to install pstree:
yum -y install psmisc
Note that after install, it is not pstree, but psmisc software.
psmisc is a process management software package that contains many small tools for managing Linux system processes, and pstree is just one of them:
fuser - identify processes using files or sockets
killall - terminate processes with a given name
prtstat - output statistical information of processes
pslog - output process log path
pstree - display currently running processes in a tree-like structure
peekfd - display data transmitted through file descriptors