xref: /freebsd/bin/nproc/nproc.1 (revision 9768746b)
1.\"-
2.\" * Copyright (c) 2023 Piotr Paweł Stefaniak
3.\"
4.\" * SPDX-License-Identifier: BSD-2-Clause
5.\"
6.Dd February 5, 2023
7.Dt NPROC 1
8.Os
9.Sh NAME
10.Nm nproc
11.Nd print the number of processors
12.Sh SYNOPSIS
13.Nm
14.Op Fl -all
15.Op Fl -ignore Ns = Ns Ar count
16.Nm Fl -help
17.Nm Fl -version
18.Sh DESCRIPTION
19The
20.Nm
21utility is used to print the number of processors limited to the
22.Xr cpuset 2
23of the current process, unless the
24.Fl -all
25flag is specified.
26.Pp
27The available flags are:
28.Bl -tag -width Ds
29.It Fl -all
30Count all processors currently online.
31.It Fl -ignore Ns = Ns Ar count
32The result is decreased by
33.Ar count ,
34but never below 1.
35.It Fl -version
36Print the current program version and exit.
37Do not use this option.
38.It Fl -help
39Print usage information and exit.
40.El
41.Sh COMPATIBILITY
42This program is intended to be compatible with nproc as found in GNU coreutils.
43.Sh SEE ALSO
44.Xr cpuset 1
45.Sh HISTORY
46The
47.Nm
48utility first appeared in
49.Fx 14.0 .
50.Sh AUTHORS
51.An -nosplit
52.An Mateusz Guzik Aq Mt mjg@FreeBSD.org
53wrote the program and
54.An Piotr Paweł Stefaniak Aq Mt pstef@FreeBSD.org
55wrote this page.
56