linux pstree命令
pstree命令可以使进程以tree的形式显示
 pstree -s
systemd─┬─UVPHostd───6*[{UVPHostd}]
        ├─acpid
        ├─2*[agetty]
        ├─crond
        ├─dbus-daemon
        ├─dhclient
        ├─getosstat─┬─iostat
        │           ├─pidstat
        │           ├─sar───sadc
        │           └─sleep
        ├─haveged
        ├─hirmd───3*[{hirmd}]
        ├─irqbalance───{irqbalance}
        ├─libvirtd───15*[{libvirtd}]
        ├─mcelog
        ├─ovs-vswitchd
        ├─ovsdb-server
        ├─python───{python}
        ├─rsyslogd───3*[{rsyslogd}]
        ├─smartd
        ├─sshd─┬─3*[sshd───sftp-server]
        │      ├─sshd───bash───su───bash
        │      └─sshd───bash───pstree
        ├─sysalarm───3*[{sysalarm}]
        ├─sysmonitor─┬─coredump_monito
        │            ├─hotpatch_alarm.
        │            ├─ipmi_monitor.py
        │            ├─ovsdb_flows_bac
        │            ├─3*[process_monitor]
        │            ├─6*[python]
        │            ├─sched_delay_mon
        │            ├─systemd_monitor
        │            ├─unetwork_alarm.───15*[{unetwork_alarm.}]
        │            ├─vm_io_monitor.p
        │            ├─vm_reboot_monit───{vm_reboot_monit}
        │            └─18*[{sysmonitor}]
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-udevd
        ├─tuned───4*[{tuned}]
        ├─vBMC_agentd
        └─virtlogd───{virtlogd}
-a, --arguments show command line arguments
  -A, --ascii         use ASCII line drawing characters
  -c, --compact       don't compact identical subtrees
  -h, --highlight-all highlight current process and its ancestors
  -H PID,
  --highlight-pid=PID highlight this process and its ancestors
  -g, --show-pgids    show process group ids; implies -c
  -G, --vt100         use VT100 line drawing characters
  -l, --long          don't truncate long lines
  -n, --numeric-sort  sort output by PID
  -N type,
  --ns-sort=type      sort by namespace type (ipc, mnt, net, pid, user, uts)
  -p, --show-pids     show PIDs; implies -c
  -s, --show-parents  show parents of the selected process
  -S, --ns-changes    show namespace transitions
  -u, --uid-changes   show uid transitions
  -U, --unicode       use UTF-8 (Unicode) line drawing characters
  -V, --version       display version information
  -Z,
  --security-context   show SELinux security contexts
  PID    start at this PID; default is 1 (init)
  USER   show only trees rooted at processes of this user
 
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号