6
2
I can use 'prtdiag' to get number of CPU by prtdiag command.
$ prtdiag
System Configuration: Sun Microsystems sun4u Sun Fire 6800
System clock frequency: 150 MHz
Memory size: 4096 Megabytes
========================= CPUs
===============================================
CPU Run E$ CPU CPU
FRU Name ID MHz MB Impl. Mask
---------- ------- ---- ---- ------- ----
/N0/SB1/P2 6 1200 8.0 US-III+ 11.0
/N0/SB1/P3 7 1200 8.0 US-III+ 11.0
/N0/SB3/P2 14 1200 8.0 US-III+ 11.0
/N0/SB3/P3 15 1200 8.0 US-III+ 11.0
But, I don't know is there any command could get the number (4 in this example)to let my script use it?
For numbers of cores/threads, I often do
psrinfo -v | grep -c on-line
which isn't the cleanest solution, but it's always worked for me. – alanc – 2013-03-14T06:06:06.373