因为找pstree工具找不到,查了一下aliyun上有,就查了一下 之后在centos8上装了一下,可以用,就是安装的包命要改动一下
[root@iz2ze6e74gz7l00leucekiz ~]# rpm -qf `which pstree`
psmisc-22.20-11.el7.x86_64
或者直接找库的包资源-推荐
[root@iz2ze6e74gz7l00leucekiz ~]# yum provides pstree
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
psmisc-22.20-16.el7.x86_64 : Utilities for managing processes on your system
Repo : baseOS
Matched from:
Filename : /usr/bin/pstree
[root@localhost named]# yum install psmisc.x86_64 -y
[root@localhost named]# pstree
systemd─┬─NetworkManager───2*[{NetworkManager}]
├─VGAuthService
├─auditd───{auditd}
├─chronyd
├─crond
├─dbus-daemon
├─gssproxy───5*[{gssproxy}]
├─login───bash
├─named───3*[{named}]
├─polkitd───8*[{polkitd}]
├─rngd───{rngd}
├─rpcbind
├─rsyslogd───2*[{rsyslogd}]
├─sshd─┬─sshd───sshd─┬─bash───sleep
│ │ └─bash───pstree
│ └─sshd───sshd───sftp-server
├─sssd─┬─sssd_be
│ └─sssd_nss
├─systemd───(sd-pam)
├─systemd-journal
├─systemd-logind
├─systemd-udevd
├─tuned───3*[{tuned}]
└─vmtoolsd───{vmtoolsd}