xref: /freebsd/bin/nproc/nproc.1 (revision 71e0c8906e1a4ff774f8ae810aeb94af039eedb7)
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. Don't use this option.
37.It Fl -help
38Print usage information and exit.
39.El
40.Sh COMPATIBILITY
41This program is intended to be compatible with nproc as found in GNU coreutils.
42.Sh SEE ALSO
43.Xr cpuset 1
44.Sh HISTORY
45The
46.Nm
47utility first appeared in
48.Fx 14.0 .
49.Sh AUTHORS
50.An -nosplit
51.An Mateusz Guzik Aq Mt mjg@FreeBSD.org
52wrote the program and
53.An Piotr Paweł Stefaniak Aq Mt pstef@FreeBSD.org
54wrote this page.
55