Package: cpulimit
Version: 3.2-1
Severity: minor
Tags: patch
Dear Maintainer,
>From "/usr/share/doc/debian/bug-reporting.txt.gz":
Don't file bugs upstream
If you file a bug in Debian, don't send a copy to the upstream software
maintainers yourself, as it is possible that the bug exists only in
Debian. If necessary, the maintainer of the package will forward the
bug upstream.
-.-
I do not send reports upstream if I have to get an account there.
The Debian maintainers have one already.
If I get a negative (or no) response from upstream, I send henceforth
bugs to Debian.
-.-
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z < "man page"
[Use
grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>
to find (most) trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:66: warning: trailing space in the line
troff:<stdin>:67: warning: trailing space in the line
troff:<stdin>:106: warning: cannot select font 'r'
troff:<stdin>:111: warning: trailing space in the line
troff:<stdin>:115: warning: trailing space in the line
troff:<stdin>:117: warning: trailing space in the line
troff:<stdin>:119: warning: trailing space in the line
troff:<stdin>:120: warning: trailing space in the line
troff:<stdin>:126: warning: trailing space in the line
troff:<stdin>:127: warning: trailing space in the line
troff:<stdin>:128: warning: trailing space in the line
troff:<stdin>:129: warning: trailing space in the line
troff:<stdin>:135: warning: trailing space in the line
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.17.13+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1),
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages cpulimit depends on:
ii libc6 2.42-6
cpulimit recommends no packages.
cpulimit suggests no packages.
-- no debconf information
Input file is cpulimit.1
Output from "mandoc -T lint cpulimit.1": (shortened list)
10 STYLE: input text line longer than 80 bytes:
12 STYLE: whitespace at end of input line
1 WARNING: skipping paragraph macro: PP after SH
Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
Output from
test-nroff -mandoc -t -ww -z cpulimit.1: (shortened list)
1 cannot select font 'r'
12 line(s) with a trailing space
Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
Input file is cpulimit.1
Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".
Number of lines affected is
12
-.-.
Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
" \(em " creates a too big gap in the text (in "troff").
An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".
cpulimit.1:3:cpulimit -- limits the CPU usage of a process
cpulimit.1:6:\fI[TARGET\fR] \fR[\fIOPTIONS\fR...] \fR[ -- \fIPROGRAM\fR]
cpulimit.1:66:\fB\--\fR
-.-.
Reduce space between words.
cpulimit.1:122:depend on SIGSTOP/SIGCONT. For example,
-.-.
Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.
3:cpulimit -- limits the CPU usage of a process
6:\fI[TARGET\fR] \fR[\fIOPTIONS\fR...] \fR[ -- \fIPROGRAM\fR]
36:percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on
multi-core CPUs. (mandatory)
66:\fB\--\fR
-.-.
Wrong distance (not two spaces) between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
Mark a final abbreviation point as such by suffixing it with "\&".
Some sentences (etc.) do not begin on a new line.
Split (sometimes) lines after a punctuation mark; before a conjunction.
Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.
Use
#!/usr/bin/sh
sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\. */\1.\n/g' $1
to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"
[List of affected lines removed.]
29:specify the number of CPU cores available. Usually this is detected for us.
32:set the assumed kernel HZ value manually. The default on most Linux kernels
and the default
36:percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on
multi-core CPUs. (mandatory)
46:Warning: It is usually a bad idea to use this flag, especially on a shell
script. The commands
48:this program to throttle them, bogging down the system. Also, it is possible
for
49:a child process to die and for its PID to be assigned to another program.
When this
51:the old information has had a chance to be flushed out. Only use the
monitor-forks
58:send an alternative signal to the watched process when we exit. Default is
SIGCONT.
67:This is the final CPUlimit option. All following
89:\[sh] \fBcpulimit \-p $! \-l 25 \-b\fR
103:program thinks are available. Usually this is detected
111:Throttle process 1234 at 20% CPU usage. If cpulimit is forced to exit,
122:depend on SIGSTOP/SIGCONT. For example,
-.-.
Split lines longer than 80 characters (fill completely
an A4 sized page line on a terminal)
into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Add "\:" to split the string for the output, "\<newline>" in the source.
[List of affected lines removed.]
Longest line is number 36 with 103 characters
percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on
multi-core CPUs. (mandatory)
-.-.
Use \(en (en-dash) for a dash at the beginning (end) of a line,
or between space characters,
not a minus (\-) or a hyphen (-), except in the NAME section.
cpulimit.1:36:percentage of CPU allowed from 1 up. Usually 1 - 100, but can be
higher on multi-core CPUs. (mandatory)
-.-.
Do not use more than two space characters between sentences or (better)
only a new line character.
122:depend on SIGSTOP/SIGCONT. For example,
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
[List of affected lines removed.]
cpulimit.1:120:has been stopped (when actually it was, but immediately
restarted).
cpulimit.1:124:and restarted in the background. (See also
<http://bugs.debian.org/558763>.)
-.-.
Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).
[List of affected lines removed.]
-.-.
Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.
cpulimit.1:1:.TH CPULIMIT "1" "June 2012" "cpulimit" "User commands"
-.-.
Put a (long) web address on a new output line to reduce the posibility of
splitting the address between two output lines.
Or inhibit hyphenation with "\%" in front of the name.
124:and restarted in the background. (See also
<http://bugs.debian.org/558763>.)
-.-.
Add "\&" after an ellipsis, when it does not end a sentence.
6:\fI[TARGET\fR] \fR[\fIOPTIONS\fR...] \fR[ -- \fIPROGRAM\fR]
-.-.
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:66: warning: trailing space in the line
troff:<stdin>:67: warning: trailing space in the line
troff:<stdin>:106: warning: cannot select font 'r'
troff:<stdin>:111: warning: trailing space in the line
troff:<stdin>:115: warning: trailing space in the line
troff:<stdin>:117: warning: trailing space in the line
troff:<stdin>:119: warning: trailing space in the line
troff:<stdin>:120: warning: trailing space in the line
troff:<stdin>:126: warning: trailing space in the line
troff:<stdin>:127: warning: trailing space in the line
troff:<stdin>:128: warning: trailing space in the line
troff:<stdin>:129: warning: trailing space in the line
troff:<stdin>:135: warning: trailing space in the line
-.-
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
--- cpulimit.1 2025-12-30 17:26:45.874886555 +0000
+++ cpulimit.1.new 2025-12-30 17:27:19.923094205 +0000
@@ -1,11 +1,10 @@
-.TH CPULIMIT "1" "June 2012" "cpulimit" "User commands"
+.TH CPULIMIT 1 "June 2012" cpulimit "User commands"
.SH NAME
cpulimit -- limits the CPU usage of a process
.SH SYNOPSIS
.B cpulimit
-\fI[TARGET\fR] \fR[\fIOPTIONS\fR...] \fR[ -- \fIPROGRAM\fR]
+[\fITARGET\fR] \fR[\fIOPTIONS\fR...\&] \fR[ \-\- \fIPROGRAM\fR]
.SH DESCRIPTION
-.P
\fITARGET \fRmust be exactly one of these:
.TP
\fB\-p\fR, \fB\-\-pid\fR=\fIN\fR
@@ -33,7 +32,7 @@ set the assumed kernel HZ value manually
assumed by cpulimit is 250.
.TP
\fB\-l\fR, \fB\-\-limit\fR=\fIN\fR
-percentage of CPU allowed from 1 up. Usually 1 - 100, but can be higher on
multi-core CPUs. (mandatory)
+percentage of CPU allowed from 1 up. Usually 1\(en100, but can be higher on
multi-core CPUs. (mandatory)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Runs in quiet mode, avoids writing update messages to console.
@@ -63,8 +62,8 @@ show control statistics
\fB\-z\fR, \fB\-\-lazy\fR
exit if there is no suitable target process, or if it dies
.TP
-\fB\--\fR
-This is the final CPUlimit option. All following
+\fB\-\-\fR
+This is the final CPUlimit option. All following
options are for another program we will launch.
.TP
\fB\-h\fR, \fB\-\-help\fR
@@ -103,34 +102,34 @@ The \fB\-c\fR flag sets the number of CP
program thinks are available. Usually this is detected
for us, but can be over-ridden.
.TP
-\[sh] \fBcpulimit \-l 20 \-k firefox\fr
+\[sh] \fBcpulimit \-l 20 \-k firefox\fR
Launch the Firefox program and kill it if the process goes
over 20% CPU usage.
.TP
\[sh] \fBcpulimit \-l 20 \-p 1234 \-s SIGTERM
-Throttle process 1234 at 20% CPU usage. If cpulimit is forced to exit,
+Throttle process 1234 at 20% CPU usage. If cpulimit is forced to exit,
it sends the watched process the SIGTERM signal.
.SH NOTES
.IP \(bu 4
-cpulimit always sends the SIGSTOP and SIGCONT signals to a process,
+cpulimit always sends the SIGSTOP and SIGCONT signals to a process,
both to verify
-that it can control it and
+that it can control it and
to limit the average amount of CPU it consumes. This can result in
-misleading (annoying) job control messages that indicate that the job
-has been stopped (when actually it was, but immediately restarted).
+misleading (annoying) job control messages that indicate that the job
+has been stopped (when actually it was, but immediately restarted).
This can also cause issues with interactive shells that detect or otherwise
-depend on SIGSTOP/SIGCONT. For example,
+depend on SIGSTOP/SIGCONT. For example,
you may place a job in the foreground, only to see it immediately stopped
and restarted in the background. (See also <http://bugs.debian.org/558763>.)
.IP \(bu 4
-When invoked with the \fI\-e\fR or \fI\-P\fR options, cpulimit looks for
-any process under /proc with a name that matches the process name argument
-given. Furthermore, it uses the first instance of the process found.
-To control a specific instance of a process, use the \fI\-p\fR option
+When invoked with the \fI\-e\fR or \fI\-P\fR options, cpulimit looks for
+any process under /proc with a name that matches the process name argument
+given. Furthermore, it uses the first instance of the process found.
+To control a specific instance of a process, use the \fI\-p\fR option
and provide a PID.
.IP \(bu 4
The current version of cpulimit assumes the kernel HZ value 100.
.SH AUTHOR
-This manpage was written for the Debian project by gregor herrmann
+This manpage was written for the Debian project by gregor herrmann
<[email protected]> but may be used by others.
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
To find trailing space use
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
The same goes for man pages that are used as an input.
-.-
For a style guide use
mandoc -T lint
-.-
For general input conventions consult the man page "nroff(7)" (item
"Input conventions") or the Texinfo manual about the same item.
-.-
Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
It should also check its input files for too long (> 80) lines.
This is just a simple quality control measure.
The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.
-.-
Common defects:
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
"git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")
-.-
Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced when that has been fixed.
The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.
See man-pages(7), item "semantic newline".
-.-
The difference between the formatted output of the original
and patched file can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -d -u <out1> <out2>
and for groff, using
\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output from 'diff -d -u ...' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-