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

Cellular Automata - Part II, Using Condor

[mpich-discuss] Errors while testing MPICH2 on Vista

MPI.NET Tutorial