Test project for C++23 with meson
.forgejo/workflows | ||
src | ||
subprojects | ||
systemd | ||
.clang-format | ||
.clang-tidy | ||
.clangd | ||
.gitignore | ||
compile_commands.json | ||
config.h.in | ||
justfile | ||
LICENSE | ||
meson.build | ||
meson.version | ||
meson_options.txt | ||
procwatch.1 | ||
README.md |
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
$ just release $ ./dist/procwatch-x86-64-v3 --version
For a different
march
: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)