Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I wonder how to get how many cores (including emulated via HT and such) are avaliable to user via bash shell-script command?
grep ^processor /proc/cpuinfo | wc -l
grep -c ^processor /proc/cpuinfo
You can also use nproc or nproc --all.
Required, but never shown