Skip to content
Snippets Groups Projects
Commit b2ffc04c authored by Nigel Kukard's avatar Nigel Kukard
Browse files

We build cputool.8 from doc/ now

parent 377d3644
No related branches found
No related tags found
No related merge requests found
.\" man file for cputool
.TH cputool "1" "January 2013 - v0.5" "Utils" "Utils"
.SH NAME
cputool \- limit cpu usage of processes
.SH SYNOPSIS
.B cputool
[\fIOPTIONS\fR]... [\fICOMMAND\fR]...
.SH DESCRIPTION
.\" Add any additional description here
.PP
Limit the cpu usage of a process or a process group to a given limit and/or
suspend processes if the system load exceeds a treshold value.
Cputool works by sending SIGSTOP and SIGCONT signals to processes depending on
the system load.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\fB\-p\fR, \fB\-\-pid\fR=\fIPID\fR
Manage the CPU usage of a specific PID.
This is the most efficient use of cputool as it does not have to walk
the process tree to look for forks of children.
.TP
\fB\-P\fR, \fB\-\-pid\-pgrp\fR=\fIPID\fR
Manage the CPU usage of a specific PID's entire process group.
The same can be achieved by specifying a [\fICOMMAND\fR] which cputool will
then execute and manage the process group created by that command.
.TP
\fB\-c\fR, \fB\-\-cpu\-limit\fR=\fIPCNT\fR
Specify the maxium cpu the process / process group can use. Expressed as
percentage of total CPU. Eg. 200 is two full CPUs in a multi processor system.
Specify an integer value.
.TP
\fB\-l\fR, \fB\-\-load\-limit\fR=\fILOAD\fR
Specify the maxium load the system may experience for the process /
process group to continue running.
Specifing a fractional value is possible (e.g. 3.5).
.br
.B Note:
TCP network connections can time out if a process is suspended for
extended periods of time (while the load is too high).
Not all programs handle this case well.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase the amount of messages printed to stderr.
\fB\-vv\fR will additionally show statistical information.
\fB\-vvv\fR will addditionally show signals being sent to processes.
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-h\fR, \fB\-\-help\fR
display a help page and exit
.PP
Cputool will run on 32\-bit and 64\-bit LINUX systems. It depends on the \fB/proc\fR
pseudo-filesystem to detect PIDs and their resource usage.
.SS "Exit status:"
.TP
0
if OK,
.TP
1
if options specified could not be parsed or \fICOMMAND\fR not run,
.TP
any
if a \fICOMMAND\fR has exited cputool will relay its exit status as its own.
.SH EXAMPLES
cputool \-p 4711 \-c 75
.br
Limit the PID 4711 to 75% use of one CPU core.
.PP
cputool \-l 7.5 \-\- rsync \-av /home /backup/`date +%Y-%m-%d`/
.br
Run rsync for a local backup only when the system load does not exceed 7.5. See the
note for \-l when using program that relies on TCP network connections.
.SH AUTHOR
Cputool written by Nigel Kukard.
.br
This man page was written by Daniel Lange.
.SH "REPORTING BUGS"
Cputool home page and bugtracker at <https://devlabs.linuxassist.net/projects/cputool>.
.SH COPYRIGHT
Copyright \(co 2012-2013 AllWorldIT.
.br
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
.BR signals(7),
.BR kill(1),
.BR uptime(1)
.\" end of man file for cputool. Daniel Lange 130114, man v3.1 for cputool v0.5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment