-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace custom nproc(1) with freebsd nproc(1)
- Loading branch information
Showing
10 changed files
with
243 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
nproc_prog = executable( | ||
'nproc', ['nproc.c'], | ||
include_directories: inc, | ||
install: true, | ||
link_with: [libcompat], | ||
) | ||
|
||
install_man('nproc.1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.\"- | ||
.\" * Copyright (c) 2023 Piotr Paweł Stefaniak | ||
.\" | ||
.\" * SPDX-License-Identifier: BSD-2-Clause | ||
.\" | ||
.Dd June 2, 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. | ||
Do not 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 BUGS | ||
If HyperThreading is enabled in BIOS and disabled in the kernel, the | ||
.Fl -all | ||
option on Linux will still report all possible CPU threads. | ||
On FreeBSD only active threads will be reported. | ||
.Sh SEE ALSO | ||
.Xr cpuset 1 | ||
.Sh HISTORY | ||
The | ||
.Nm | ||
utility first appeared in | ||
.Fx 13.2 . | ||
.Sh AUTHORS | ||
.An -nosplit | ||
.An Mateusz Guzik Aq Mt [email protected] | ||
wrote the program and | ||
.An Piotr Paweł Stefaniak Aq Mt [email protected] | ||
wrote this page. |
Oops, something went wrong.