pstree is useful tool, but it is not a default application when you setup CentOS. So you will need to install it by yum.


You will be able to use pstree after running below:

sudo yum -y install psmisc

Below is an exmple of pstree

# pstree
systemd-+-NetworkManager---2*[{NetworkManager}]
        |-agetty
        |-auditd---{auditd}
        |-automount---5*[{automount}]
        |-chronyd
        |-crond
        |-dbus-daemon
        |-httpd---11*[httpd]
        |-irqbalance
        |-java-+-java---67*[{java}]
        |      `-193*[{java}]
        |-java---157*[{java}]
        |-lvmetad
        |-master-+-anvil
        |        |-bounce
        |        |-cleanup
        |        |-pickup
        |        |-qmgr
        |        |-smtp
        |        `-trivial-rewrite
        |-memcached---5*[{memcached}]
        |-mysqld_safe---mysqld---120*[{mysqld}]
        |-polkitd---6*[{polkitd}]
        |-postgres---49*[postgres]
        |-redis-server---2*[{redis-server}]
        |-rsyslogd---2*[{rsyslogd}]
        |-sshd---sshd---sshd---bash---su---bash---pstree
        |-systemd-journal
        |-systemd-logind
        |-systemd-udevd
        `-tuned---4*[{tuned}]