cgroup-utils

Utility tools for control groups of Linux
Download

cgroup-utils Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • peo3
  • Publisher web site:
  • https://github.com/peo3/

cgroup-utils Tags


cgroup-utils Description

cgroup-utils is a Python utility that provides tools and libraries for control groups of Linux. For example, cgtop is a top-like tool which shows activities of running processes based on the POV of control groups.Installation python setup.py build sudo python setup.py installPackaging (rpm) python setup.py bdist --formats=rpmAvailable subcommands configs event pgrep stats top treecgutil configsThis subcommand show you configurations of cgroups. By default, it shows only changed configurations.Example output cgutil configs -o memory< root > notify_on_release=1 release_agent=/usr/lib/ulatencyd/ulatencyd_cleanup.luasys_essential swappiness=0 notify_on_release=1sys_bg swappiness=100 notify_on_release=1cgutil eventThis subcommand makes cgroup.event_control easy to use. It exits when a state of a target cgroup crosses a threshold which you set, thus, you can know the state of the cgroup has changed.Example output cgutil event /sys/fs/cgroup/memory/system/sshd.service/memory.usage_in_bytes +1M # It exits when memory usage of processes in the cgroup has increased one more MB.cgutil pgrepThis subcommand is alike pgrep command but it shows cgroups in addtion to PIDs.Example output$ cgutil pgrep ssh/: 15072/: 15074/system/sshd.service: 630$ cgutil pgrep ssh -l -f/: 15072 sshd: ozaki-r /: 15074 sshd: ozaki-r@pts/2/: 15157 /bin/python /bin/cgutil pgrep ssh -l -f/system/sshd.service: 630 /usr/sbin/sshd -Dcgutil statsThis subcommand shows you states of cgroups.Example output cgutil stats< root > stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/sm-client.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/sendmail.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/vboxadd-service.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/colord.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/colord-sane.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/udisks2.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}system/cups.service stat={'throttled_time': 0L, 'nr_periods': 0L, 'nr_throttled': 0L}cgutil topThis subcommand is alike top command but it shows activities in a unit of cgroups.Example outputcgutil top -i -n 2 -b18.1 msec to collect statistics USR SYS READ WRITE TOTAL RSS SWAP # NAME 0.0% 0.0% 0.0 /s 0.0 /s 0.0 48.0k 0.0 97 usr_1000/default20.5 msec to collect statistics USR SYS READ WRITE TOTAL RSS SWAP # NAME 0.0% 0.0% 0.0 /s 0.0 /s 128.0k 4.0k 0.0 104 sys_daemon 0.0% 0.0% 0.0 /s 0.0 /s -64.0k 0.0 0.0 0 sys_essential 0.0% 0.0% 0.0 /s 0.0 /s 108.0k 32.0k 0.0 97 usr_1000/defaultcgutil treeThis subcommand shows you tree structure of cgroups.Example outputs$ cgutil tree -o blkio< root > `system +sm-client.service +sendmail.service +vboxadd-service.service +colord.service +colord-sane.service +udisks2.service +cups.service +rtkit-daemon.service(snip) +fsck@.service +udev.service `systemd-journald.serviceProduct's homepage


cgroup-utils Related Software