Commit Graph

3 Commits

Author SHA1 Message Date
Mateusz Guzik
059320b8c8 nproc: denote an incompatiblity with Linux
On Linux _NPROCESSORS_CONF reports CPU threads disabled by the kernel,
while it does not on FreeBSD.

Flip _NPROCESSORS_ONLN to _NPROCESSORS_CONF. While it keeps reporting
the same value, it will automagically unbreak should someone change the
above.
2023-02-15 20:43:46 +00:00
Konstantin Belousov
6957cd86d9 man: some typesetting and style fixes for recent additions
Mostly start each sentence from a new line.  Also add more pretty
typesetting to cdce(4).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D38501
2023-02-11 19:23:54 +02:00
Mateusz Guzik
48bfd35976 Add nproc(1)
This program prints the number of CPU threads it can run on, while
respecting cpusets (or not, depending on switches).

It aims to be compatible with nproc as found in GNU coreutils.

Reviewed by:	des
Reviewed by:	pstef
Differential Revision:	https://reviews.freebsd.org/D38386
2023-02-08 19:47:33 +00:00