53 lines
1.5 KiB
Groff
53 lines
1.5 KiB
Groff
.TH PROCWATCH 1 "June 2024" "procwatch" "User Commands"
|
|
.SH NAME
|
|
procwatch \- Monitor CPU usage of processes matching a regular expression pattern
|
|
.SH SYNOPSIS
|
|
.B procwatch
|
|
.RB [ OPTIONS ]
|
|
.IR pattern ...
|
|
.SH DESCRIPTION
|
|
.B procwatch
|
|
monitors the CPU usage of processes that match the specified regular expression pattern(s).
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
Print the help message and exit.
|
|
.TP
|
|
.BR \-i ", " \-\-interval " " \fIUINT\fR[UNIT]
|
|
Set the interval between process CPU usage measurements. Default is 30s.
|
|
.TP
|
|
.BR \-g ", " \-\-grace\-period " " \fIUINT\fR[UNIT]
|
|
Set the cooldown period before another notification can be sent. Default is 5m.
|
|
.TP
|
|
.BR \-t ", " \-\-threshold " " \fIFLOAT\fR
|
|
Set the CPU usage threshold. Default is 66.
|
|
.TP
|
|
.BR \-v ", " \-\-version
|
|
Display program version information and exit.
|
|
.SH ARGUMENTS
|
|
.TP
|
|
.IR pattern
|
|
Regular expression pattern to match (partial) process name(s). This argument is required and can be specified multiple times.
|
|
.SH EXAMPLES
|
|
.PP
|
|
Monitor Firefox and Brave browsers with custom settings:
|
|
.PP
|
|
.nf
|
|
.RS
|
|
procwatch --interval=30s --grace-period=5m --threshold=66 '^/app/lib/firefox/firefox-bin$|^/app/brave/brave'
|
|
.RE
|
|
.fi
|
|
.PP
|
|
Print a snapshot of matching processes while running:
|
|
.PP
|
|
.nf
|
|
.RS
|
|
kill -HUP $(pidof procwatch)
|
|
.RE
|
|
.fi
|
|
.SH NOTES
|
|
This program monitors CPU usage of specified processes and can send notifications when usage exceeds the defined threshold.
|
|
.SH AUTHOR
|
|
Thorsten Schubert <tschubert@bafh.org>
|
|
.SH SEE ALSO
|
|
Full documentation is available at: https://betaco.de/strom/procwatch
|