1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
=======
cputool
=======
----------------------------
CPU usage management utility
----------------------------
:Manual section: 8
:Manual group: System Utilities
.. contents::
SYNOPSIS
========
``cputool`` [*OPTION*] [-- *COMMAND*]
DESCRIPTION
===========
CPUTool is a utility which manages CPU usage and system load using SIGSTOP
and SIGCONT. CPUTool is able to "slow down" process CPU usage and manage
load levels caused by processes utilizing CPU and/or IO resources.
A common use for CPUTool is decreasing the CPU load caused by compression
software or backup software where there is no limit on CPU or IO resources
normally imposed, but it can be used to manage almost any process.
OPTIONS
=======
``-h``, ``--help``
Display command line usage then exit.
``-p``, ``--pid`` *PID*
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.
``-P``, ``--pid-pgrp`` *PID*
Manage the CPU usage of a specific PID's entire process group. The same can
be achieved by specifying a *COMMAND* which CPUTool will then execute and
manage the process group created by that command.
``-c``, ``--cpu-limit`` *PERCENT*
Specify the maximum 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.
``-l``, ``--load-limit`` *LOAD*
Specify the maximum load the system may experience for the process process
group to continue running. Specifyng a fractional value is possible
(e.g. 3.5).
``-v``, ``--verbose``
Increase the amount of messages printed to stderr.
-vv will additionally show statistical information.
-vvv will addditionally show signals being sent to processes.
``-V``, ``--version``
Output version information and exit.
EXAMPLES
========
Limit the PID 4711 to 75% use of one CPU core:
::
cputool -p 4711 -c 75
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:
::
cputool -l 7.5 -- rsync -av /home /backup/`date +%Y-%m-%d`
NOTES
=====
CPUTool should run on all Linux systems. It depends on the /proc
pseudo-filesystem to detect PIDs and their resource usage.
TCP network connections could time out if process execution is suspended for
extended periods of time (while the load is too high). Not all programs
handle this case well.
BUGS
====
Please report all bugs you discover. This should be done via:
#. the project issue tracker
`https://gitlab.devlabs.linuxassist.net/cputool/cputool/-/issues
<https://gitlab.devlabs.linuxassist.net/cputool/cputool/-/issues>`_
Alternatively, you may report bugs to your software distributor / vendor.
AUTHORS
=======
Please refer to the AUTHORS file distributed with CPUTool.
COPYRIGHT
=========
Copyright (c) 2012-2021, AllWorldIT., and the authors listed in the
CPUTool AUTHORS file.
LICENSE
=======
``cputool`` is distributed under the terms of the GNU v3+.
This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE
|