/cgrps

cgrps is a set of commands for checking cgroups.

Primary LanguageGoMIT LicenseMIT

cgrps Build Status GitHub release Coverage Status

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.