Linux command
systemd-cgtop 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start
systemd-cgtop
Change
systemd-cgtop --order [cpu|memory|path|tasks|io]
Show
systemd-cgtop --cpu=percentage
Change
systemd-cgtop -d [interval]
Only
systemd-cgtop -P
说明
systemd-cgtop shows the top control groups by resource usage, similar to top but organized by cgroups. It displays CPU, memory, and I/O statistics for each control group. The tool is useful for monitoring resource consumption by services and understanding which systemd units are using system resources. Interactive mode supports keyboard shortcuts for changing display options.
参数
- --order _field_
- Sort by cpu, memory, path, tasks, or io
- -d, --delay _interval_
- Update interval (supports ms, us, min suffixes)
- -P
- Count only userspace processes
- -k
- Include kernel threads in counts
- -n, --iterations _n_
- Run for n iterations and exit
- -b, --batch
- Run in batch mode (non-interactive)
- -r, --raw
- Output raw numbers without units
- --depth _n_
- Maximum cgroup tree depth to show
FAQ
What is the systemd-cgtop command used for?
systemd-cgtop shows the top control groups by resource usage, similar to top but organized by cgroups. It displays CPU, memory, and I/O statistics for each control group. The tool is useful for monitoring resource consumption by services and understanding which systemd units are using system resources. Interactive mode supports keyboard shortcuts for changing display options.
How do I run a basic systemd-cgtop example?
Run `systemd-cgtop` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --order _field_ do in systemd-cgtop?
Sort by cpu, memory, path, tasks, or io