How to Check CPU and Core Count in Sun Solaris: SPARC Processor Analysis Guide


2 views

When working with SPARC servers running Solaris 10, interpreting processor information requires understanding Solaris' unique terminology and reporting methods. The system reports both physical and virtual processors, which can cause confusion.

Here are the most useful commands for analyzing your SPARC processor configuration:

# Check total number of processors (physical + virtual)
psrinfo -p

# Detailed processor information
psrinfo -vp

# System diagnostic information
prtdiag -v

# Alternative method using kstat
kstat -m cpu_info

From your example outputs, we can determine:

$ psrinfo -pv
The physical processor has 1 virtual processor (0)
  UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1592 MHz)
[...]

This clearly shows you have 4 physical processors (Sun Fire V445 typically uses single-core UltraSPARC-IIIi CPUs). Each physical processor has exactly 1 virtual processor, meaning no hyperthreading or core multiplication.

For more detailed examination, consider these methods:

# Check processor topology (Solaris 10 update 9+)
psrinfo -t

# View CPU details via /proc
cat /proc/cpuinfo

# Check CPU binding (useful for NUMA systems)
pbind -Q

# Performance counter information
cpustat -h

Here's a simple shell script to summarize your processor configuration:

#!/bin/sh
echo "=== Physical Processor Count ==="
psrinfo -p
echo "\n=== Detailed CPU Information ==="
psrinfo -vp | grep "physical processor" | sort | uniq -c
echo "\n=== CPU Clock Speeds ==="
psrinfo -v | grep "operates at" | sort -u

Your UltraSPARC-IIIi processors follow Sun's traditional design where:

  • Each physical CPU contains one execution core
  • Virtual processors typically map 1:1 to physical cores in this generation
  • The "MB/C0/P0" notation in prtdiag indicates motherboard/controller/processor

Early Solaris versions reported processors differently. Modern commands like psrinfo -t (introduced in Solaris 10 update 9) provide better core visibility. For older systems, cross-reference:

prtconf -vp | grep cpu-unit

When working with Sun Solaris 10 on SPARC architecture, determining your exact processor and core configuration can be crucial for performance tuning and capacity planning. Let's explore multiple methods to get accurate information.

The most common commands for checking CPU information in Solaris are:

# Basic processor information
psrinfo -v

# System diagnostics including CPU details
prtdiag -v

# Count physical processors
psrinfo -p

# Detailed physical/virtual processor mapping
psrinfo -pv

From your example output:

$ psrinfo -pv
The physical processor has 1 virtual processor (0)
  UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1592 MHz)
...
The physical processor has 1 virtual processor (3)
  UltraSPARC-IIIi (portid 3 impl 0x16 ver 0x34 clock 1592 MHz)

This clearly shows you have:

  • 4 physical processors (shown by -p flag)
  • Each physical processor has 1 virtual processor (no hyperthreading)
  • UltraSPARC-IIIi architecture
  • 1MB cache per processor (from prtdiag output)

For more detailed information, try these additional commands:

# Show CPU topology (Solaris 10 and later)
kstat cpu_info | grep core_id

# Check processor type and features
isainfo -v

# View CPU details from OpenBoot PROM
eeprom | grep cpu

Here's a simple shell script to extract and summarize CPU information:

#!/bin/ksh

echo "=== CPU Summary ==="
echo "Physical processors: $(psrinfo -p)"
echo "Virtual processors: $(psrinfo | wc -l)"

echo "\n=== Detailed Info ==="
psrinfo -pv | awk '
/^The physical/ { 
    printf("Physical CPU %d: ", ++phys_count)
    getline
    print $0
}'

echo "\n=== System Type ==="
prtdiag | grep "System Configuration"

The MB/Cx/P0 in your prtdiag output indicates:

  • MB: Motherboard
  • Cx: CPU socket number (C0 to C3 in your case)
  • P0: Core number (only P0 means single core per CPU)

Quick reference guide:

Need Command
Simple processor count psrinfo -p
Physical/virtual mapping psrinfo -pv
Detailed system info prtdiag -v
Cache size and speed prtconf -vp
Processor features isainfo -v