systemd-cgls递归显示control group内容
help
  
  
    
      $ systemd-cgls --help
systemd-cgls [OPTIONS...] [CGROUP...]
Recursively show control group contents.
  -h --help           Show this help
     --version        Show package version
     --no-pager       Do not pipe output into a pager
  -a --all            Show all groups, including empty
  -u --unit           Show the subtrees of specified system units
     --user-unit      Show the subtrees of specified user units
  -x --xattr=BOOL     Show cgroup extended attributes
  -c --cgroup-id=BOOL Show cgroup ID
  -l --full           Do not ellipsize output
  -k                  Include kernel threads in output
  -M --machine=NAME   Show container NAME
See the systemd-cgls(1) man page for details.
     
   
 
使用
$ systemd-cgls
CGroup /:
-.slice
├─user.slice
│ └─user-0.slice
│   ├─session-3.scope
│   │ ├─3039 sshd: root@pts/0
│   │ ├─3151 -bash
│   │ ├─3209 systemd-cgls
│   │ └─3210 pager
│   └─user@0.service …
│     └─init.scope
│       ├─3044 /usr/lib/systemd/systemd --user
│       └─3046 (sd-pam)
├─init.scope
│ └─1 /sbin/init
└─system.slice
  ├─irqbalance.service
  │ └─1088 /usr/sbin/irqbalance
  ├─open-vm-tools.service
  │ └─781 /usr/bin/vmtoolsd
  ...