An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/tklauser/numcpus

Package numcpus provides information about the number of CPUs in the system. It gets the number of CPUs (online, offline, present, possible or kernel maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, Solaris/Illumos or Windows systems. On Linux, the information is retrieved by reading the corresponding CPU topology files in /sys/devices/system/cpu. On BSD systems, the information is retrieved using the hw.ncpu and hw.ncpuonline sysctls, if supported. On Windows systems, the information is retrieved using the GetActiveProcessorCount and GetMaximumProcessorCount functions, respectively. Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, Solaris/Illumos and Windows. ErrNotSupported is returned in case a function is not supported on a particular platform.

Ecosystem
proxy.golang.org
Latest Release
v0.11.0
4 months ago
Versions
15
Dependent Packages
7,242
Dependent Repos
15,502
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/tklauser/numcpus
spec
License Apache-2.0
Namespace github.com/tklauser
First Release about 5 years ago
Last Synced 26 days ago
Repository
Stars 29 on GitHub
Forks 10 on GitHub
Docker Dependents 2,573
Docker Downloads 8,953,489,419
Commits 190
Committers 2
Avg per Author 95.0
DDS 0.305
Rankings on proxy.golang.org
Overall Top 3.3%
Dependent packages Top 0.1%
Dependent repos Top 0.1%
Forks Top 7.4%
Docker downloads Top 0.1%