aboutsummaryrefslogtreecommitdiff
path: root/bin/nproc/nproc.1
blob: ae252fe0f50c85077092b6358dd374c5b536d289 (plain) (blame)
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
.\"-
.\" * Copyright (c) 2023 Piotr Paweł Stefaniak
.\"
.\" * SPDX-License-Identifier: BSD-2-Clause
.\"
.Dd February 5, 2023
.Dt NPROC 1
.Os
.Sh NAME
.Nm nproc
.Nd print the number of processors
.Sh SYNOPSIS
.Nm
.Op Fl -all
.Op Fl -ignore Ns = Ns Ar count
.Nm Fl -help
.Nm Fl -version
.Sh DESCRIPTION
The
.Nm
utility is used to print the number of processors limited to the
.Xr cpuset 2
of the current process, unless the
.Fl -all
flag is specified.
.Pp
The available flags are:
.Bl -tag -width Ds
.It Fl -all
Count all processors currently online.
.It Fl -ignore Ns = Ns Ar count
The result is decreased by
.Ar count ,
but never below 1.
.It Fl -version
Print the current program version and exit. Don't use this option.
.It Fl -help
Print usage information and exit.
.El
.Sh COMPATIBILITY
This program is intended to be compatible with nproc as found in GNU coreutils.
.Sh SEE ALSO
.Xr cpuset 1
.Sh HISTORY
The
.Nm
utility first appeared in
.Fx 14.0 .
.Sh AUTHORS
.An -nosplit
.An Mateusz Guzik Aq Mt mjg@FreeBSD.org
wrote the program and
.An Piotr Paweł Stefaniak Aq Mt pstef@FreeBSD.org
wrote this page.