Skip to content
/ cgrps Public

cgrps is a set of commands for checking cgroups.

License

Notifications You must be signed in to change notification settings

k1LoW/cgrps

Repository files navigation

cgrps Build Status GitHub release

cgrps is a set of commands for checking cgroups.

cgrps.gif

Usage

cgrps is supposed to be used with peco like following command,

$ cgrps stat $(cgrps ls | peco)

or

$ cgrps ls | grep user.slice | head -1 |  cgrps stat

Use with ps

$ ps u --pid $(cgrps ls | peco | cgrps pids | xargs)

Use with pidstat

$ pidstat -dru -h -p $(cgrps ls | peco | cgrps pids | xargs | tr ' ' ',')

Use with lsof

$ lsof -Pn -i -a -p $(cgrps ls | peco | cgrps pids | xargs | tr ' ' ',')

Commands

cgrps ls

list cgroups.

cgrps pids [CGROUP...]

report a snapshot of the current cgroups pids.

cgrps stat [CGROUP]

show current cgroup stats (CPU MEMORY BLKIO PIDS).

cgrps identify [PID...]

report cgroups for processes.

!!!NOTICE!!!

cgrps displays cgroups with the same hierarchies together.

If you want to check separately, please use cgroup-tools (Ubuntu) or libcgroup-tools (CentOS) etc.