]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/nproc/nproc.1
pfsync: Correctly check if bpf peers are present
[FreeBSD/FreeBSD.git] / bin / nproc / nproc.1
1 .\"-
2 .\" * Copyright (c) 2023 Piotr PaweÅ‚ Stefaniak
3 .\"
4 .\" * SPDX-License-Identifier: BSD-2-Clause
5 .\"
6 .Dd June 2, 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
19 The
20 .Nm
21 utility is used to print the number of processors limited to the
22 .Xr cpuset 2
23 of the current process, unless the
24 .Fl -all
25 flag is specified.
26 .Pp
27 The available flags are:
28 .Bl -tag -width Ds
29 .It Fl -all
30 Count all processors currently online.
31 .It Fl -ignore Ns = Ns Ar count
32 The result is decreased by
33 .Ar count ,
34 but never below 1.
35 .It Fl -version
36 Print the current program version and exit.
37 Do not use this option.
38 .It Fl -help
39 Print usage information and exit.
40 .El
41 .Sh COMPATIBILITY
42 This program is intended to be compatible with nproc as found in GNU coreutils.
43 .Sh BUGS
44 If HyperThreading is enabled in BIOS and disabled in the kernel, the
45 .Fl -all
46 option on Linux will still report all possible CPU threads.
47 On FreeBSD only active threads will be reported.
48 .Sh SEE ALSO
49 .Xr cpuset 1
50 .Sh HISTORY
51 The
52 .Nm
53 utility first appeared in
54 .Fx 13.2 .
55 .Sh AUTHORS
56 .An -nosplit
57 .An Mateusz Guzik Aq Mt mjg@FreeBSD.org
58 wrote the program and
59 .An Piotr PaweÅ‚ Stefaniak Aq Mt pstef@FreeBSD.org
60 wrote this page.