add -Wpedantic to default CFLAGS
[baseutils.git] / nproc.1
1 .\"-
2 .\" Copyright (c) 2023 Piotr Paweł Stefaniak
3 .\"
4 .\" SPDX-License-Identifier: BSD-2-Clause
5 .\" Redistribution and use in source and binary forms, with
6 .\" or without modification, are permitted provided that the
7 .\" following conditions are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above
10 .\" copyright notice, this list of conditions and the
11 .\" following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the
13 .\" above copyright notice, this list of conditions and
14 .\" the following disclaimer in the documentation and/or
15 .\" other materials provided with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18 .\" CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
19 .\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21 .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 .\" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
23 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30 .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 .\" OF SUCH DAMAGE.
32 .\"
33 .Dd April 2026
34 .Dt NPROC 1
35 .Os
36 .Sh NAME
37 .Nm nproc
38 .Nd print the number of processors
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl a
42 .Op Fl i Ar #
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility is used to print the number of processors available to the
47 current process, unless the
48 .Fl a
49 flag is specified.
50 .Pp
51 The available flags are:
52 .Bl -tag -width ".Fl i Ar #"
53 .It Fl a
54 Count all processors available on the system.
55 .It Fl i Ar #
56 The result is decreased by
57 .Ar # ,
58 but never below 1.
59 .El
60 .Sh COMPATIBILITY
61 This program is
62 .Sy NOT
63 compatible with nproc as found in GNU coreutils.
64 .Sh SEE ALSO
65 .Xr cpuset 1
66 .Sh AUTHORS
67 .An -nosplit
68 .An Mateusz Guzik Aq Mt mjg@FreeBSD.org
69 wrote the original program for FreeBSD and
70 .An Piotr Paweł Stefaniak Aq Mt pstef@FreeBSD.org
71 wrote the original of this page.