Skip to content

Commit

Permalink
Update: readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
BinSquare committed Jun 18, 2023
1 parent 7e10fd0 commit cb91c45
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Cgroup Stats CLI Tool
This repository contains a command line tool written in Go that uses the containerd/cgroups library to print out cgroup (control group) statistics for a given cgroup. You can specify the type of stats to print out using command line flags.

### Dependencies
This tool requires the containerd/cgroups Go library. You can install it using the following command:
````
go get github.com/containerd/cgroups
````

### Usage
You can run the tool using the go run command. You must provide the cgroup path using the -path flag. You can also specify what kind of stats to print out using the -cpu, -mem, -pids, -blkio, and -hugetlb flags.
```
go run main.go -path=<cgroup_path> [-cpu] [-mem] [-pids] [-blkio] [-hugetlb]
```
For example, the following command will print out the CPU, Memory, and PIDs stats of the specified cgroup:

```
go run main.go -path=/sys/fs/cgroup/unified/system.slice/docker.service -cpu -mem -pids
```

### Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

0 comments on commit cb91c45

Please sign in to comment.