Test project for C++23 with meson
Find a file
Thorsten Schubert b1ead681ce
All checks were successful
/ build (push) Successful in 1m30s
/ build-x86 (push) Successful in 1m19s
Optimize data types
2024-10-17 12:14:15 +02:00
.forgejo/workflows Install- and build instructions 2024-07-07 19:53:07 +02:00
src Optimize data types 2024-10-17 12:14:15 +02:00
subprojects Introduce narrow_cast for discoverability 2024-06-23 16:37:27 +02:00
systemd Update Tor browser example 2024-07-19 13:41:16 +02:00
.clang-format Support SIGHUP for printing matching processes 2023-12-13 14:05:12 +01:00
.clang-tidy Optimize data types 2024-10-17 12:14:15 +02:00
.clangd Reduce vector allocations 2023-11-15 12:19:41 +01:00
.gitignore Provide a fallback generator implementation 2024-06-24 17:53:16 +02:00
compile_commands.json Use some new C++23 features 2023-11-14 02:38:20 +01:00
config.h.in Premature optimizations 2024-06-21 02:04:29 +02:00
justfile Style and some variable hoisting 2024-07-24 14:28:20 +02:00
LICENSE Use Google's re2 library 2023-12-08 11:10:47 +01:00
meson.build Enable -Weffc++ and more warnings for debug builds 2024-07-29 23:46:44 +02:00
meson.version Optimize data types 2024-10-17 12:14:15 +02:00
meson_options.txt Use a deque instead of vector<unique_ptr<RE2>> 2024-06-20 19:50:50 +02:00
procwatch.1 Add basic manpage 2024-06-26 17:43:35 +02:00
procwatch.spec.rpkg Add basic manpage 2024-06-26 17:43:35 +02:00
README.md Install- and build instructions 2024-07-07 19:53:07 +02:00
rpkg.conf Use rpkg and system libraries if available 2024-06-19 16:24:52 +02:00
rpkg.macros Use rpkg default tag format 2024-06-20 18:25:14 +02:00

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)

Please don't upload to GitHub