whost

whost

网站建设和主机推荐

What to do if the pstree command cannot be found in CentOS system.

As the basic operational unit of an operating system, each process has a unique process ID. To view the running status of each program, the pstree command is used.

By default, the CentOS 7 system with minimal installation does not have the pstree command.

When directly entering the command, an error message will be displayed stating that pstree command is not found: -bash: pstree: command not found. In this case, the pstree command needs to be installed separately.

We can enter the following code to install pstree:

yum -y install psmisc

It is important to note that after "install", it is not followed by pstree, but by the software psmisc.

pstree.png

psmisc is a process management software package suite that contains many small tools for managing Linux system processes, with pstree being just one of them:

fuser - identifies processes using files or sockets
killall - terminates processes with a given name
prtstat - outputs statistical information of processes
pslog - outputs process log paths
pstree - displays the currently running processes in a tree-like form
peekfd - displays data transmitted through file descriptors

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.