Uniprocessor or multiprocessor

On unix, how do I know if a system is multiprocessor or single processor?

0
source share
3 answers

Several times we must answer our own question :)

On Solaris, run the command

/usr/sbin/psrinfo -v|grep "Status of processor"|wc -l

On AIX, run the command

lsdev -C|grep Process|wc -l

On HP-UX, run the following commands (superuser privilege required):

P=`echo processor_count/D | adb -k /stand/vmunix /dev/mem |tail -1|awk '{print $2}'` echo "The number of processors on `hostname` = $P"

In Tru64, run the command

 /usr/sbin/psrinfo -v|grep "Status of processor"|wc -l
+2
source

What about

cat /proc/cpuinfo | grep -i 'processor' | wc -l

Or even

 dmesg | grep -i cpu

Make sure to “release x processors” in the last

+1
source

Source: https://habr.com/ru/post/1740709/


All Articles