nproc — Print the number of available processors
| Use Case | Command | Description |
|---|---|---|
| Print the number of available processors | nproc |
Prints the number of processing units available to the current process, considering environment variables like OMP_NUM_THREADS and OMP_THREAD_LIMIT. |
| Print the total number of installed processors | nproc --all |
Prints the number of installed processors on the system, ignoring environment variables. |
| Exclude a number of processors | nproc --ignore=N |
Excludes N processing units from the count. |
nproc [OPTION]
Print the number of processing units available to the current process, which may be less than the number of online processors. If this information is not accessible, then print the number of processors installed. If the OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables are set, then they will determine the minimum and maximum returned value respectively. The result is guaranteed to be greater than zero.
--all — Print the number of installed processors on the system, which may be greater than the number online or available to the current process. The OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables are not honored in this case.--ignore=NUMBER — If possible, exclude this NUMBER of processing units.Also see Common options.
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-16 07:41 @216.73.217.24
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)