.TH "CPUTOOL" "8" .SH "NAME" cputool \(em CPUTool is a utility which manages CPU usage and system load .SH "SYNOPSIS" .PP \fBcputool\fR [\-\-cpu-limit \fIPCNT\fR] [\-\-load-limit \fILOAD\fR] [ [\-\-pid \fIPID\fR | \-\-pid-pgrp \fIPID\fR ] | [\-\-] \fICOMMAND\fR \&... ] .SH "DESCRIPTION" .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 threshold. CPUTool works by sending SIGSTOP and SIGCONT signals to processes depending on the system load. .SH "OPTIONS" .PP These programs follow the usual GNU command line syntax, with long options starting with two dashes (`\-'). A summary of options is included below. .IP "\fB-c\fP, \fB\-\-cpu-limit \fIPCNT\fR\fP" 10 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. .IP "\fB-l\fP, \fB\-\-load-limit \fILOAD\fR\fP" 10 Specify the maxium load the system may experience for the process process group to continue running. Specifyng a fractional value is possible (e.g. 3.5). .IP "\fB-p\fP, \fB\-\-pid \fIPID\fR\fP" 10 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. .IP "\fB-P\fP, \fB\-\-pid-pgrp \fIPID\fR\fP" 10 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. .IP "\fB-v\fP, \fB\-\-verbose\fP" 10 Increase the amount of messages printed to stderr. .IP "" 10 \-vv will additionally show statistical information. .IP "" 10 \-vvv will addditionally show signals being sent to processes. .IP "\fB-V\fP, \fB\-\-version\fP" 10 Output version information and exit. .IP "\fB-h\fP, \fB\-\-help\fP" 10 Display a help page and exit. .SH "NOTES" .PP CPUTool will run on 32-bit and 64-bit Linux systems. It depends on the /proc pseudo-filesystem to detect PIDs and their resource usage. .PP TCP network connections could 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. .SH "EXAMPLES" .IP "cputool \-p 4711 \-c 75" 10 Limit the PID 4711 to 75% use of one CPU core. .IP "cputool \-l 7.5 \-\- rsync \-av /home /backup/`date +%Y-%m-%d`/" 10 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 "SEE ALSO" .PP signals (7), kill(1), uptime(1). .SH "AUTHOR" .PP This manual page was written by Daniel Lange and converted to SGML by Nigel Kukard . Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 any later version published by the Free Software Foundation. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-3. .\" created by instant / docbook-to-man