GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SHTK_HW_CPUS(3) FreeBSD Library Functions Manual SHTK_HW_CPUS(3)

shtk_hw_ncpusQueries the number of CPUs (threads) in the machine

shtk_import hw

shtk_hw_ncpus

The shtk_hw_ncpus function queries the number of CPU threads in the machine and prints the total number to stdout.

If the query fails, or if the function does not know how to get the number from the current operating system, prints 1.

shtk_hw_ncpus returns 0.

make -j"$(shtk_hw_ncpus)" all

SHTK_HW_NCPUS
If set to a number greater than zero, overrides the return value of shtk_hw_ncpus. Generally useful for testing purposes, but can also be useful to inject greater numbers of parallelism in applications that do not expose a mechanism to tune such number.

shtk(3), shtk_hw(3)

shtk_hw_ncpus first appeared in shtk 1.7.

February 6, 2017 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.