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.
proxy.golang.org
v0.11.0
4 months ago
15
7,242
15,502
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
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 |