Nproc (Unix)
| Original author(s) | Giuseppe Scrivano |
|---|---|
| Initial release | 2009 |
| Engine | |
| Operating system | Unix and Unix-like |
| Type | Command |
Search Nproc (Unix) on Amazon.
Nproc is a command in GNU core utilities that outputs the number of processors available to the process. It was created by Giuseppe Scrivano in 2009. The number of processors output does not represent the number of processors physically present on the CPU. A limit on the cores the processor can use may display the value as lower,[1] or CPU features such as hyperthreading may display it as higher. This is not to be confused with the limit to how many processes the user can have active, which is set and viewed by the ulimit command, also called "nproc."
Usage
Nproc outputs the number of processors as an integer greater than zero. The information displayed is the same as the CPU(s) field in lscpu.[2] The output is determined by multiplying the number of threads in a core, the number of cores per socket (i.e., the number of cores in the CPU), multiplied by the number of detected sockets.
Running nproc with no options will display the number of CPUs processes owned by the user can use. If this information isn't available, nproc returns the number of CPUs installed.[3]
Options
--alldisplays the total number of CPUs regardless of whether the process can use them.--ignore=nignores n cores, outputting the normal output of nproc - n.
See Also
References
- ↑ "centos - Why `nproc` show less than `nproc --all`?". Unix & Linux Stack Exchange. Retrieved 2020-01-29.
- ↑ "Linux nproc Command Tutorial for Beginners (with Examples)". HowtoForge. Retrieved 2020-01-29.
- ↑ "GNU Coreutils: nproc invocation". www.gnu.org. Retrieved 2020-01-30.
This article "Nproc (Unix)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Nproc (Unix). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
