Bootstrap

linux查看进程树

使用命令ps axjf

[root@localhost 桌面]# ps axjf
   PPID     PID    PGID     SID TTY        TPGID STAT   UID   TIME COMMAND
      0       2       0       0 ?             -1 S        0   0:00 [kthreadd]
      2       3       0       0 ?             -1 I<       0   0:00  \_ [rcu_gp]
      2       4       0       0 ?             -1 I<       0   0:00  \_ [rcu_par_gp]
      2       6       0       0 ?             -1 I<       0   0:00  \_ [kworker/0:0H-kblockd]
      2       8       0       0 ?             -1 I<       0   0:00  \_ [mm_percpu_wq]
      2       9       0       0 ?             -1 S        0   0:00  \_ [ksoftirqd/0]
      2      10       0       0 ?             -1 I        0   0:08  \_ [rcu_sched]
      2      11       0       0 ?             -1 I        0   0:00  \_ [rcu_bh]
      2      12       0       0 ?             -1 S        0   0:00  \_ [migration/0]
      2      13       0       0 ?             -1 S        0   0:00  \_ [cpuhp/0]
      2      14       0       0 ?             -1 S        0   0:00  \_ [cpuhp/1]
      2      15       0       0 ?             -1 S        0   0:00  \_ [migration/1]
      2      16       0       0 ?             -1 S        0   0:00  \_ [ksoftirqd/1]
      2      18       0       0 ?             -1 I<       0   0:00  \_ [kworker/1:0H-kblockd]
      2      20       0       0 ?             -1 S        0   0:00  \_ [kdevtmpfs]
      2      21       0       0 ?             -1 I<       0   0:00  \_ [netns]
      2      22       0       0 ?             -1 S        0   0:00  \_ [kauditd]
      2      25       0       0 ?             -1 S        0   0:00  \_ [khungtaskd]
      2      26       0       0 ?             -1 S        0   0:00  \_ [oom_reaper]
      2      27       0       0 ?             -1 I<       0   0:00  \_ [writeback]
      2      28       0       0 ?             -1 S        0   0:00  \_ [kcompactd0]
      2      29       0       0 ?             -1 SN       0   0:00  \_ [ksmd]
      2      30       0       0 ?             -1 SN       0   0:02  \_ [khugepaged]
      2      31       0       0 ?             -1 I<       0   0:00  \_ [crypto]
      2      32       0       0 ?             -1 I<       0   0:00  \_ [kintegrityd]
      2      33       0       0 ?             -1 I<       0   0:00  \_ [kblockd]
      2      34       0       0 ?             -1 I<       0   0:00  \_ [md]
      2      35       0       0 ?             -1 I<       0   0:00  \_ [edac-poller]
      2      36       0       0 ?             -1 S        0   0:00  \_ [watchdogd]
      2      48       0       0 ?             -1 S        0   0:04  \_ [kswapd0]
      2      49       0       0 ?             -1 S        0   0:00  \_ [ecryptfs-kthrea]
      2     100       0       0 ?             -1 I<       0   0:00  \_ [kthrotld]
      2     101       0       0 ?             -1 S        0   0:00  \_ [irq/24-pciehp]
      2     102       0       0 ?             -1 S        0   0:00  \_ [irq/25-pciehp]
      2     103       0       0 ?             -1 S        0   0:00  \_ [irq/26-pciehp]
      2     104       0       0 ?             -1 S        0   0:00  \_ [irq/27-pciehp]
      2     105       0       0 ?             -1 S        0   0:00  \_ [irq/28-pciehp]
      2     106       0       0 ?             -1 S        0   0:00  \_ [irq/29-pciehp]
      2     107       0       0 ?             -1 S        0   0:00  \_ [irq/30-pciehp]
      2     108       0       0 ?             -1 S        0   0:00  \_ [irq/31-pciehp]
      2     109       0       0 ?             -1 S        0   0:00  \_ [irq/32-pciehp]
      2     110       0       0 ?             -1 S        0   0:00  \_ [irq/33-pciehp]
      2     111       0       0 ?             -1 S        0   0:00  \_ [irq/34-pciehp]
      2     112       0       0 ?             -1 S        0   0:00  \_ [irq/35-pciehp]
      2     113       0       0 ?             -1 S        0   0:00  \_ [irq/36-pciehp]
      2     114       0       0 ?             -1 S        0   0:00  \_ [irq/37-pciehp]
      2     115       0       0 ?             -1 S        0   0:00  \_ [irq/38-pciehp]
      2     116       0       0 ?             -1 S        0   0:00  \_ [irq/39-pciehp]
      2     117       0       0 ?             -1 S        0   0:00  \_ [irq/40-pciehp]
      2     118       0       0 ?             -1 S        0   0:00  \_ [irq/41-pciehp]
      2     119       0       0 ?             -1 S        0   0:00  \_ [irq/42-pciehp]
      2     120       0       0 ?             -1 S        0   0:00  \_ [irq/43-pciehp]
      2     121       0       0 ?             -1 S        0   0:00  \_ [irq/44-pciehp]
      2     122       0       0 ?             -1 S        0   0:00  \_ [irq/45-pciehp]
      2     123       0       0 ?             -1 S        0   0:00  \_ [irq/46-pciehp]
      2     124       0       0 ?             -1 S        0   0:00  \_ [irq/47-pciehp]
      2     125       0       0 ?             -1 S        0   0:00  \_ [irq/48-pciehp]
      2     126       0       0 ?             -1 S        0   0:00  \_ [irq/49-pciehp]
      2     127       0       0 ?             -1 S        0   0:00  \_ [irq/50-pciehp]
      2     128       0       0 ?             -1 S        0   0:00  \_ [irq/51-pciehp]
      2     129       0       0 ?             -1 S        0   0:00  \_ [irq/52-pciehp]
      2     130       0       0 ?             -1 S        0   0:00  \_ [irq/53-pciehp]
      2     131       0       0 ?             -1 S        0   0:00  \_ [irq/54-pciehp]
      2     132       0       0 ?             -1 S        0   0:00  \_ [irq/55-pciehp]
      2     133       0       0 ?             -1 I<       0   0:00  \_ [acpi_thermal_pm]
      2     134       0       0 ?             -1 I<       0   0:00  \_ [kmpath_rdacd]
      2     135       0       0 ?             -1 I<       0   0:00  \_ [kaluad]
      2     136       0       0 ?             -1 I<       0   0:00  \_ [ipv6_addrconf]
      2     137       0       0 ?             -1 I<       0   0:00  \_ [kstrp]
      2     395       0       0 ?             -1 I<       0   0:00  \_ [ata_sff]
      2     396       0       0 ?             -1 S        0   0:00  \_ [scsi_eh_0]
      2     397       0       0 ?             -1 I<       0   0:00  \_ [mpt_poll_0]
      2     398       0       0 ?             -1 I<       0   0:00  \_ [scsi_tmf_0]
      2     399       0       0 ?             -1 S        0   0:00  \_ [scsi_eh_1]
      2     400       0       0 ?             -1 I<       0   0:00  \_ [mpt/0]
      2     401       0       0 ?             -1 I<       0   0:00  \_ [scsi_tmf_1]
      2     403       0       0 ?             -1 I<       0   0:00  \_ [ttm_swap]
      2     404       0       0 ?             -1 S        0   0:00  \_ [irq/16-vmwgfx]
      2     416       0       0 ?             -1 I<       0   0:01  \_ [kworker/0:1H-kblockd]
      2     417       0       0 ?             -1 S        0   0:00  \_ [scsi_eh_2]
      2     418       0       0 ?             -1 I<       0   0:00  \_ [scsi_tmf_2]
      2     423       0       0 ?             -1 I<       0   0:01  \_ [kworker/1:1H-kblockd]
      2     476       0       0 ?             -1 I<       0   0:00  \_ [kdmflush]
      2     483       0       0 ?             -1 I<       0   0:00  \_ [kdmflush]
      2     504       0       0 ?             -1 I<       0   0:00  \_ [xfsalloc]
      2     505       0       0 ?             -1 I<       0   0:00  \_ [xfs_mru_cache]
      2     506       0       0 ?             -1 I<       0   0:00  \_ [xfs-buf/dm-0]
      2     507       0       0 ?             -1 I<       0   0:00  \_ [xfs-data/dm-0]
      2     508       0       0 ?             -1 I<       0   0:00  \_ [xfs-conv/dm-0]
      2     509       0       0 ?             -1 I<       0   0:00  \_ [xfs-cil/dm-0]
      2     510       0       0 ?             -1 I<       0   0:00  \_ [xfs-reclaim/dm-]
      2     511       0       0 ?             -1 I<       0   0:00  \_ [xfs-log/dm-0]
      2     512       0       0 ?             -1 I<       0   0:00  \_ [xfs-eofblocks/d]
      2     513       0       0 ?             -1 S        0   0:04  \_ [xfsaild/dm-0]
      2    1658       0       0 ?             -1 I<       0   0:00  \_ [xfs-buf/sda1]
      2    1659       0       0 ?             -1 I<       0   0:00  \_ [xfs-data/sda1]
      2    1660       0       0 ?             -1 I<       0   0:00  \_ [xfs-conv/sda1]
      2    1661       0       0 ?             -1 I<       0   0:00  \_ [xfs-cil/sda1]
      2    1662       0       0 ?             -1 I<       0   0:00  \_ [xfs-reclaim/sda]
      2    1665       0       0 ?             -1 I<       0   0:00  \_ [xfs-log/sda1]
      2    1666       0       0 ?             -1 I<       0   0:00  \_ [xfs-eofblocks/s]
      2    1667       0       0 ?             -1 S        0   0:00  \_ [xfsaild/sda1]
      2    1711       0       0 ?             -1 I<       0   0:00  \_ [rpciod]
      2    1712       0       0 ?             -1 I<       0   0:00  \_ [kworker/u257:0]
      2    1713       0       0 ?             -1 I<       0   0:00  \_ [xprtiod]
      2   26529       0       0 ?             -1 I        0   0:00  \_ [kworker/u256:1-events_unbound]
      2   28014       0       0 ?             -1 I        0   0:00  \_ [kworker/1:2-events]
      2   28026       0       0 ?             -1 I        0   0:01  \_ [kworker/0:0-events_power_efficient]
      2   28054       0       0 ?             -1 I        0   0:00  \_ [kworker/1:3-ata_sff]
      2   28210       0       0 ?             -1 I        0   0:00  \_ [kworker/0:1-events_power_efficient]
      2   28212       0       0 ?             -1 I        0   0:00  \_ [kworker/u256:2-events_unbound]
      2   28236       0       0 ?             -1 I        0   0:00  \_ [kworker/1:0-ata_sff]
      0       1       1       1 ?             -1 Ss       0   0:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
      1     663     663     663 ?             -1 Ss       0   0:01 /usr/lib/systemd/systemd-journald
      1     687     687     687 ?             -1 Ss       0   0:01 /usr/lib/systemd/systemd-udevd
      1    1708    1708    1708 ?             -1 Ss       0   0:00 /sbin/mdadm --monitor --scan --syslog -f --pid-file=/run/mdadm/mdadm.pid
      1    1710    1710    1710 ?             -1 Ss      32   0:00 /usr/bin/rpcbind -w -f
      1    1716    1716    1716 ?             -1 S<sl     0   0:00 /sbin/auditd
   1716    1719    1716    1716 ?             -1 S<       0   0:00  \_ /usr/sbin/sedispatch
      1    1796    1796    1796 ?             -1 Ss     976   0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
      1    1804    1804    1804 ?             -1 Ss     994   0:00 /usr/bin/lsmd -d
      1    1807    1807    1807 ?             -1 Ss       0   0:00 /usr/sbin/mcelog --ignorenodev --daemon --foreground
      1    1809    1809    1809 ?             -1 Ss       0   0:00 /usr/sbin/rasdaemon -f -r
      1    1811    1811    1811 ?             -1 Ss       0   0:02 /sbin/rngd -f
      1    1812    1812    1812 ?             -1 Ssl      0   0:02 /usr/sbin/rsyslogd -n -iNONE
      1    1813    1813    1813 ?             -1 SNsl   172   0:00 /usr/libexec/rtkit-daemon
      1    1817    1817    1817 ?             -1 Ss       0   0:00 /usr/sbin/smartd -n -q never
      1    1818    1818    1818 ?             -1 Ss       0   0:00 /usr/sbin/sssd -i --logger=files
   1818    2151    2151    1818 ?             -1 S        0   0:00  \_ /usr/libexec/sssd/sssd_be --domain implicit_files --uid 0 --gid 0 --logger=files
   1818    2167    2167    1818 ?             -1 S        0   0:01  \_ /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
      1    1822    1822    1822 ?             -1 Ssl      0   0:00 /usr/libexec/udisks2/udisksd
      1    1829    1829    1829 ?             -1 Ssl      0   0:00 /usr/sbin/gssproxy -D
      1    2002    2001    2001 ?             -1 S      992   0:00 /usr/sbin/chronyd
      1    2050    2050    2050 ?             -1 Ssl      0   0:06 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
      1    2154    2154    2154 ?             -1 Ssl      0   0:03 /usr/bin/python3 /usr/sbin/lvmdbusd
      1    2165    2165    2165 ?             -1 Ssl    996   0:00 /usr/lib/polkit-1/polkitd --no-debug
      1    2196    2196    2196 ?             -1 Ssl      0   0:01 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid
      1    2346    2346    2346 ?             -1 Ssl      0   0:01 /usr/libexec/accounts-daemon
      1    2445    2445    2445 ?             -1 Ssl      0   0:01 /usr/sbin/NetworkManager --no-daemon
   2445   27522   27522    2445 ?             -1 S        0   0:00  \_ /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-ens33.pid -lf /var/lib/NetworkManager/dhclient-3e19ae75-3cfe-4717-aa64-94c540316015-ens33.lease -cf /var/lib/NetworkManager/dhclient-ens33.conf ens33
      1    2446    2446    2446 ?             -1 Ss     192   0:00 /usr/lib/systemd/systemd-networkd
      1    2492    2492    2492 ?             -1 Ss       0   0:00 /usr/lib/systemd/systemd-logind
      1    2502    2502    2502 ?             -1 Ssl      0   0:00 /usr/sbin/vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
      1    2562    2561    2561 ?             -1 Sl       0   0:44 /usr/sbin/vmtoolsd
      1    2593    2592    2592 ?             -1 S        0   0:00 /usr/lib/vmware-vgauth/VGAuthService -s
      1    2940    2940    2940 ?             -1 Ssl      0   2:08 /usr/bin/dockerd --live-restore
   2940    3444    3444    3444 ?             -1 Ssl      0   1:21  \_ containerd --config /var/run/docker/containerd/containerd.toml --log-level info
   3444   13193   13193    3444 ?             -1 Sl       0   0:00      \_ containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/dc367a51551d72efb4db73d1a28e08737f97de7b7d0ed60a2a256d3314af2885 -address /var/run/docker/containerd/containerd.sock -containerd-binary /usr/bin/container
  13193   13211   13211   13211 pts/0      13211 Ss+      0   0:00          \_ /bin/bash
      1    2949    2949    2949 ?             -1 Ss       0   0:00 /usr/sbin/sshd -D
      1    2951    2951    2951 ?             -1 Ssl      0   0:04 /usr/bin/python3 -Es /usr/sbin/tuned -l -P
      1    2970    1796    1796 ?             -1 Sl       0   0:00 /usr/sbin/kylin-security-daemon
      1    2971    2971    2971 ?             -1 Ss       0   0:00 /usr/sbin/atd -f
      1    2974    2974    2974 ?             -1 Ss       0   0:00 /usr/sbin/crond -n
      1    2975    2975    2975 ?             -1 SLsl     0   0:00 /usr/sbin/lightdm
   2975    3002    3002    3002 tty1        3002 Ssl+     0   1:34  \_ /usr/libexec/Xorg -core -noreset :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch
   2975    4666    2975    2975 ?             -1 Sl       0   0:00  \_ lightdm --session-child 14 21
   4666    9240    9240    9240 ?             -1 Ssl      0   0:00      \_ mate-session
   9240    9413    9413    9413 ?             -1 Ss       0   0:00          \_ /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "mate-session"
   9240    9483    9240    9240 ?             -1 Sl       0   0:30          \_ /usr/libexec/mate-settings-daemon
   9240    9487    9240    9240 ?             -1 Sl       0   0:32          \_ marco
   9240    9491    9240    9240 ?             -1 Sl       0   0:11          \_ caja
   9240    9494    9240    9240 ?             -1 Sl       0   0:00          \_ /usr/bin/python3 /usr/local/lib64/mate-indicators/libexec/reset_applet_position.py
   9240    9497    9240    9240 ?             -1 Sl       0   0:01          \_ mate-power-manager
   9240    9503    9240    9240 ?             -1 Sl       0   0:00          \_ ukui-screensaver-backend
   9503    9514    9240    9240 ?             -1 Z        0   0:00          |   \_ [xset] <defunct>
   9240    9507    9240    9240 ?             -1 Sl       0   0:00          \_ /usr/libexec/polkit-mate-authentication-agent-1
   9240    9510    9240    9240 ?             -1 Sl       0   0:01          \_ mate-volume-control-applet
   9240    9515    9240    9240 ?             -1 Sl       0   0:00          \_ /usr/libexec/geoclue-2.0/demos/agent
   9240    9519    9240    9240 ?             -1 Sl       0   0:02          \_ nm-applet
   9240    9567    9240    9240 ?             -1 Sl       0   0:01          \_ mate-panel
      1    9233    9233    9233 ?             -1 Ss       0   0:00 /usr/lib/systemd/systemd --user
   9233    9234    9233    9233 ?             -1 S        0   0:00  \_ (sd-pam)
   9233    9255    9255    9255 ?             -1 Ss       0   0:00  \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
   9233    9264    9255    9255 ?             -1 Sl       0   0:00  \_ /usr/libexec/imsettings-daemon
   9264   10072   10072    9255 ?             -1 S        0   0:04  |   \_ /usr/bin/fcitx -D
   9233    9267    9267    9267 ?             -1 Ssl      0   0:00  \_ /usr/libexec/gvfsd
   9267    9745    9267    9267 ?             -1 Sl       0   0:00  |   \_ /usr/libexec/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
   9267   11334    9267    9267 ?             -1 Sl       0   0:00  |   \_ /usr/libexec/gvfsd-network --spawner :1.4 /org/gtk/gvfs/exec_spaw/1
   9267   11418    9267    9267 ?             -1 Sl       0   0:00  |   \_ /usr/libexec/gvfsd-dnssd --spawner :1.4 /org/gtk/gvfs/exec_spaw/3
   9233    9272    9267    9267 ?             -1 Sl       0   0:00  \_ /usr/libexec/gvfsd-fuse /run/user/0/gvfs -f -o big_writes
   9233    9461    9461    9461 ?             -1 Ssl      0   0:00  \_ /usr/libexec/at-spi-bus-launcher
   9461    9466    9461    9461 ?             -1 S        0   0:00  |   \_ /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
   9233    9469    9461    9461 ?             -1 Sl       0   0:00  \_ /usr/libexec/at-spi2-registryd --use-gnome-session
   9233    9473    9255    9255 ?             -1 Sl       0   0:00  \_ /usr/libexec/dconf-service
   9233    9544    9255    9255 ?             -1 S        0   0:00  \_ /usr/libexec/gconfd-2
   9233    9771    9771    9771 ?             -1 Ssl      0   0:00  \_ /usr/libexec/gvfs-udisks2-volume-monitor
   9233    9789    9789    9789 ?             -1 Ssl      0   0:00  \_ /usr/libexec/gvfs-goa-volume-monitor
   9233    9808    9255    9255 ?             -1 Sl       0   0:00  \_ /usr/libexec/goa-daemon
   9233    9901    9255    9255 ?             -1 Sl       0   0:00  \_ /usr/libexec/goa-identity-service
   9233   10081   10081   10081 ?             -1 Ss       0   0:04  \_ /usr/bin/dbus-daemon --syslog --fork --print-pid 7 --print-address 9 --config-file /usr/share/fcitx/dbus/daemon.conf
   9233   10092   10091   10091 ?             -1 SN       0   0:00  \_ /usr/bin/fcitx-dbus-watcher unix:abstract=/tmp/dbus-JR7VcNuaHF,guid=4d1c99db896270efd6005b34608a6375 10081
   9233   10111    9255    9255 ?             -1 Sl       0   0:34  \_ python2 /usr/lib/ubuntu-mate/mate-menu/mate-menu.py
   9233   10114    9255    9255 ?             -1 Sl       0   0:57  \_ /usr/local/lib64/mate-indicators/libexec/mate-indicators
  10114   10135    9255    9255 ?             -1 Sl       0   0:00  |   \_ /usr/libexec/pxgsettings org.gnome.system.proxy org.gnome.system.proxy.http org.gnome.system.proxy.https org.gnome.system.proxy.ftp org.gnome.system.proxy.socks
   9233   10115    9255    9255 ?             -1 Sl       0   0:01  \_ /usr/libexec/mate-panel/wnck-applet
   9233   10224   10224   10224 ?             -1 Ssl      0   0:01  \_ /usr/libexec/bamf/bamfdaemon
   9233   10576   10576   10576 ?             -1 Ssl      0   0:00  \_ /usr/libexec/gvfsd-metadata
      1    9479    9240    9240 ?             -1 Sl       0   0:00 gnome-keyring-daemon --start
      1    9508    9240    9240 ?             -1 Sl       0   0:46 /usr/lib/vmware-tools/sbin64/vmtoolsd -n vmusr --blockFd 3
      1    9547    9546    9546 ?             -1 S<l      0   0:25 /usr/bin/pulseaudio --start
   9547    9755    9546    9546 ?             -1 S        0   0:00  \_ /usr/libexec/pulse/gconf-helper
      1    9561    9561    9561 ?             -1 Ssl      0   0:00 /usr/libexec/upowerd
      1   15390    9240    9240 ?             -1 Sl       0   0:24 mate-terminal
  15390   15395    9240    9240 ?             -1 S        0   0:00  \_ gnome-pty-helper
  15390   15396   15396   15396 pts/0      15396 Ss+      0   0:01  \_ bash
  15390   28325   28325   28325 pts/1      28387 Ss       0   0:00  \_ bash
  28325   28387   28387   28325 pts/1      28387 R+       0   0:00      \_ ps axjf
[root@localhost 桌面]# 

查看linux进程可以带动哪些额外其他进程,例如/usr/sbin/lightdm进程的启动同时启动了以下进程
在这里插入图片描述

;