https://github.com/k1low/cgrps
cgrps is a set of commands for checking cgroups.
https://github.com/k1low/cgrps
cgroup cgroups cli
Last synced: 12 months ago
JSON representation
cgrps is a set of commands for checking cgroups.
- Host: GitHub
- URL: https://github.com/k1low/cgrps
- Owner: k1LoW
- License: mit
- Created: 2018-04-11T06:54:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T03:22:18.000Z (about 1 year ago)
- Last Synced: 2025-02-23T20:35:02.512Z (about 1 year ago)
- Topics: cgroup, cgroups, cli
- Language: Go
- Homepage:
- Size: 3.56 MB
- Stars: 14
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cgrps [](https://travis-ci.org/k1LoW/cgrps) [](https://github.com/k1LoW/cgrps/releases)
`cgrps` is a set of commands for checking cgroups.

## Usage
`cgrps` is supposed to be used with [peco](https://github.com/peco/peco) like following command,
```sh
$ cgrps stat $(cgrps ls | peco)
```
or
```sh
$ cgrps ls | grep user.slice | head -1 | cgrps stat
```
### Use with `ps`
```sh
$ ps u --pid $(cgrps ls | peco | cgrps pids | xargs)
```
### Use with `pidstat`
```sh
$ pidstat -dru -h -p $(cgrps ls | peco | cgrps pids | xargs | tr ' ' ',')
```
### Use with `lsof`
```sh
$ 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.