50 lines
1.4 KiB
Markdown
50 lines
1.4 KiB
Markdown
# procwatch
|
|
|
|
### Monitor CPU usage of processes matching a regular expression pattern
|
|
|
|
Usage: procwatch [OPTIONS] <pattern>...
|
|
|
|
Positionals:
|
|
<pattern> TEXT ... REQUIRED Regular expression pattern to match (partial) process name(s)
|
|
|
|
Options:
|
|
-h,--help Print this help message and exit
|
|
-i,--interval UINT:UINT [UNIT] [30s]
|
|
Interval between process cpu usage measurements
|
|
-g,--grace-period UINT:UINT [UNIT] [5m]
|
|
Cooldown period before another notification can be sent
|
|
-t,--threshold FLOAT [66] CPU usage threshold
|
|
-v,--version Display program version information and exit
|
|
|
|
### Install
|
|
|
|
#### Fedora
|
|
|
|
- COPR: `dnf copr enable zeno/tools`
|
|
|
|
- From source:
|
|
|
|
Build dependencies: `libnotify-devel re2-devel cli11-devel meson ninja-build just jq`
|
|
|
|
```cli
|
|
$ just release
|
|
$ ./dist/procwatch-x86-64-v3 --version
|
|
```
|
|
|
|
For a different `march`:
|
|
|
|
```cli
|
|
march=x86-64-v2
|
|
$ just setup-release $march
|
|
$ just release
|
|
$ ./dist/procwatch-$march --version
|
|
```
|
|
|
|
### Example
|
|
|
|
./procwatch --interval=30s --grace-period=5m --threshold=66 '^/app/lib/firefox/firefox-bin$|^/app/brave/brave'
|
|
|
|
# print snapshot of matching processes while running
|
|
kill -HUP $(pidof procwatch)
|
|
|
|
[![Please don't upload to GitHub](https://static.betaco.de/badge.svg)](https://nogithub.codeberg.page)
|