How to count the number of cores in a Linux machine

Use the following command:

cat /proc/cpuinfo | grep processor | wc –l

It is convenient to put it in a script which I will call, for example, ncores:

#!/bin/sh
cat /proc/cpuinfo | grep processor | wc –l

See enclosed screen shot:

ncores

Comments

Popular posts from this blog

The End of Grid Computing?

Parallel Debugging with a Serial Debugger

[mpich-discuss] Errors while testing MPICH2 on Vista