English 中文(简体)
uniprocessor or multiprocessor
原标题:

On unix, how could we know whether the system is multiprocessor or uniprocessor?

最佳回答

Some times we have to answer owr 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 (requires superuser privileges):

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

On Tru64 run the command

 /usr/sbin/psrinfo -v|grep "Status of processor"|wc -l
问题回答

How about

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

Or even

 dmesg | grep -i cpu

Look out for "Brought up x processors" in the last one

I don t know if it applies to Unix as well, but for Linux, from command line, see here: http://www.howtogeek.com/howto/ubuntu/display-number-of-processors-on-linux/





相关问题
Write and test sub func

I m trying to write sub func for nachOS but when I combines it doesn t work. Don t know the reason. Details: In ../userprog/syscall.h Add : #define SC_Sub 11 int Sub(int a, int b); In ../test/ ....

Current Linux Kernel debugging techniques

A linux machine freezes few hours after booting and running software (including custom drivers). I m looking a method to debug such problem. Recently, there has been significant progress in Linux ...

How to debug driver load error?

I ve made a driver for Windows, compiled it and tried to start it via SC manager, but I get the system error from the SC manager API: ERROR_PROC_NOT_FOUND The specified procedure could not be found. ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

What is the exact architecture/components of MinWin?

I ve always wanted a minimal windows NT build . Sounds like one s already there : MinWin. Can anyone tell me the exact design or architecture of MinWin and is it used in Windows 7 ? Windows Server ...

uniprocessor or multiprocessor

On unix, how could we know whether the system is multiprocessor or uniprocessor?

热门标签