Timeline for How to know number of cores of a system in Linux?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 14 at 8:42 | comment | added | sphakka | +1 because this is the POSIXly way of doing it -- unix.stackexchange.com/questions/564494/… | |
| Apr 17, 2019 at 5:13 | comment | added | Galaxy |
And getconf _NPROCESSORS_CONF gets you the number of processors configured. You can get the value of both these macros inside of a C source code too, by using the sysconf() function. Type in man sysconf for more information.
|
|
| Feb 14, 2017 at 13:34 | comment | added | Toby Speight | That's slightly different (and useful for some needs). It's the number of processors that are online now (i.e. available for running processes). It may be less than the total number of CPUs if one or more have been taken offline (e.g. during hibernation or whilst adding/removing processors). | |
| Dec 18, 2016 at 19:39 | review | Low quality posts | |||
| Dec 18, 2016 at 20:48 | |||||
| Dec 18, 2016 at 19:21 | history | answered | L.R. | CC BY-SA 3.0 |