| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 | set -eux |
| 4 | set -o pipefail |
| 5 | |
| 6 | # Without tty attached cgtop should default to --iterations=1 |
| 7 | systemd-cgtop |
| 8 | systemd-cgtop --iterations=1 |
| 9 | # Same as --iterations=1 |
| 10 | systemd-cgtop -1 |
| 11 | systemd-cgtop --delay=1ms |
| 12 | systemd-cgtop --raw |
| 13 | systemd-cgtop --batch |
| 14 | systemd-cgtop --cpu=percentage |
| 15 | systemd-cgtop --cpu=time |
| 16 | systemd-cgtop -P |
| 17 | systemd-cgtop -k |
| 18 | systemd-cgtop --recursive=no -P |
| 19 | systemd-cgtop --recursive=no -k |
| 20 | systemd-cgtop --depth=0 |
| 21 | systemd-cgtop --depth=100 |
| 22 | |
| 23 | for order in path tasks cpu memory io; do |
| 24 | systemd-cgtop --order="$order" |
| 25 | done |
| 26 | systemd-cgtop -p -t -c -m -i |
| 27 | |
| 28 | (! systemd-cgtop --cpu=foo) |
| 29 | (! systemd-cgtop --order=foo) |
| 30 | (! systemd-cgtop --depth=-1) |
| 31 | (! systemd-cgtop --recursive=foo) |
| 32 | (! systemd-cgtop --delay=1foo) |