Howto get CPU details in HPUX

Learn how to extract CPU, core, socket details in HPUX. Get familiar with hardware related commands like print_manifest, machinfo, cstm, ioscan.

There are many times when one has to check CPU details of the server which are like the number of cores, sockets, etc. This detail is useful in capacity planning, troubleshooting, performance analysis, etc. There are many ways to get these details as below –

  • ioscan command
  • cstm tool
  • print_manifest report
  • machinfo command
  • MP console
  • top command
  • SAR output

Before going into these methods make sure you check if logical CPUs are enabled on server or not. If yes then you need to take that into consideration while calculating the number of CPUs.

Let’s see the above methods one by one.

ioscan command

This is a well-known command to every HPUX server administrator. To scan or list hardware on the system, we use this command. Filtering processors out of this command give you details about CPU. This is helpful to get the only number of processors on the system.

# ioscan -kfnC processor
Class       I  H/W Path  Driver    S/W State H/W Type  Description
===================================================================
processor   0  128       processor CLAIMED   PROCESSOR Processor
processor   1  129       processor CLAIMED   PROCESSOR Processor
processor   2  136       processor CLAIMED   PROCESSOR Processor
processor   3  137       processor CLAIMED   PROCESSOR Processor
processor   4  144       processor CLAIMED   PROCESSOR Processor
processor   5  145       processor CLAIMED   PROCESSOR Processor
processor   6  152       processor CLAIMED   PROCESSOR Processor
processor   7  153       processor CLAIMED   PROCESSOR Processor

# ioscan -kfnC processor | grep processor|wc -l
8

cstm tool

CSTM is another famous tool native to HPUX used to deal with hardware. This will give you in-depth details about each processor on the system. Type /usr/sbin/cstm and you will be on CSTM shell. Here type is below command :

cstm>selclass qualifier cpu;infolog
-- Converting multiple raw log files to text. --
Preparing the Information Tool Log for each selected device...

.... server1  :  10.10.11.1 ....

-- Information Tool Log for CPU on path 128 --

Log creation time: Wed Jul 20 11:09:00 2016

Hardware path: 128


Product ID:                CPU          Module Type:              0
Hardware Model:            0x894        Software Model:           0x4
Hardware Revision:         0            Software Revision:        0
Hardware ID:               0            Software ID:              3848593997
Boot ID:                   0x2          Software Option:          0x91
Processor Number:          0            Path:                     128
Hard Physical Address:     0xfffffffffe780000     Soft Physical Address:    0

Slot Number:               0            Software Capability:      0x100000f0
PDC Firmware Revision:     46.34        IODC Revision:            0
Instruction Cache [Kbyte]: 768          Processor Speed:          N/A
Processor State:           CPU Present Configured
Monarch:                   Yes          Active:                   Yes
Data Cache        [Kbyte]: 768
Instruction TLB   [entry]: 240          Processor Chip Revisions: 3.2
Data TLB Size     [entry]: 240          2nd Level Cache Size:[KB] 65536
Serial Number:             44549e6cf43f0605


-----------------  Processor 0 HPMC Information - PDC Version: 46.34  ------

   * * * No valid timestamp * * *
       No HPMC chassis codes logged


General Registers 0 - 31
00-03  0000000000000000  0000000000000000  0000000000000000  0000000000000000
04-07  0000000000000000  0000000000000000  0000000000000000  0000000000000000
08-11  0000000000000000  0000000000000000  0000000000000000  0000000000000000
12-15  0000000000000000  0000000000000000  0000000000000000  0000000000000000
16-19  0000000000000000  0000000000000000  0000000000000000  0000000000000000
20-23  0000000000000000  0000000000000000  0000000000000000  0000000000000000
24-27  0000000000000000  0000000000000000  0000000000000000  0000000000000000
28-31  0000000000000000  0000000000000000  0000000000000000  0000000000000000



Control Registers 0 - 31
00-03  0000000000000000  0000000000000000  0000000000000000  0000000000000000
04-07  0000000000000000  0000000000000000  0000000000000000  0000000000000000
08-11  0000000000000000  0000000000000000  0000000000000000  0000000000000000
12-15  0000000000000000  0000000000000000  0000000000000000  0000000000000000
16-19  0000000000000000  0000000000000000  0000000000000000  0000000000000000
20-23  0000000000000000  0000000000000000  0000000000000000  0000000000000000
24-27  0000000000000000  0000000000000000  0000000000000000  0000000000000000
28-31  0000000000000000  0000000000000000  0000000000000000  0000000000000000


Space Registers 0 - 7
00-03  0000000000000000  0000000000000000  0000000000000000  0000000000000000
04-07  0000000000000000  0000000000000000  0000000000000000  0000000000000000


IIA Space (back entry)       = 0x0000000000000000
IIA Offset (back entry)      = 0x0000000000000000
Check Type                   = 0x00000000
Cpu State                    = 0x00000000
Cache Check                  = 0x00000000
TLB Check                    = 0x00000000
Bus Check                    = 0x00000000
Assists Check                = 0x00000000

Assist State                 = 0x00000000
Path Info                    = 0x00000000
System Responder Address     = 0x0000000000000000
System Requestor Address     = 0x0000000000000000



Floating Point Registers 0 - 31
00-03  0000000000000000  0000000000000000  0000000000000000  0000000000000000
04-07  0000000000000000  0000000000000000  0000000000000000  0000000000000000
08-11  0000000000000000  0000000000000000  0000000000000000  0000000000000000
12-15  0000000000000000  0000000000000000  0000000000000000  0000000000000000
16-19  0000000000000000  0000000000000000  0000000000000000  0000000000000000
20-23  0000000000000000  0000000000000000  0000000000000000  0000000000000000
24-27  0000000000000000  0000000000000000  0000000000000000  0000000000000000
28-31  0000000000000000  0000000000000000  0000000000000000  0000000000000000


PIM Revision                 = 0x0000000000000000
CPU ID                       = 0x0000000000000000
CPU Revision                 = 0x0000000000000000
Cpu Serial Number            = 0x0000000000000000
Check Summary                = 0x0000000000000000
SAL Timestamp                = 0x0000000000000000
System Firmware Rev.         = 0x0000000000000000
PDC Relocation Address       = 0x0000000000000000
Available Memory             = 0x0000000000000000
CPU Diagnose Register 2      = 0x0000000000000000
MIB_STAT                     = 0x0000000000000000
MIB_LOG1                     = 0x0000000000000000
MIB_LOG2                     = 0x0000000000000000
MIB_ECC_DATA                 = 0x0000000000000000
ICache Info                  = 0x0000000000000000
DCache Info                  = 0x0000000000000000
Sharedcache Info1            = 0x0000000000000000
Sharedcache Info2            = 0x0000000000000000
MIB_RSLOG1                   = 0x0000000000000000
MIB_RSLOG2                   = 0x0000000000000000
MIB_RQLOG                    = 0x0000000000000000
MIB_REQLOGa                  = 0x0000000000000000
MIB_REQLOGb                  = 0x0000000000000000

Reserved                     = 0x0000000000000000
Cache Repair Detail          = 0x0000000000000000

PIM Detail Text:



--------------  Memory Error Log Information  --------------

   No errors logged for this bus

------------  I/O Module Error Log Information  ------------

  No IO subsystem errors recorded

FRU INFORMATION

        Module              Revision
        ------              --------
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2
        PA 8900 CPU Module  3.2

Board Info!
  Format Version  : 0x1                   Language Code : 0x0
  Mfg Date        :                       Mfg Name      : JABIL
  Product Name    : augustus baseboard
  Serial Number   : 52JAPE4822000149
  Part Number     : A6961-60401
  Fru File Tp/Len : 0x1  Fru File :
  Revision        : A  Eng Date Code : 4728
  Artwork Rev     : A5  Fru Info :



=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=

----- output clipped -----

I showed only one processor details above.

print_manifest report

This command comes bundled with the Ignite Ux package. If you have ignite installed on your server you will be able to run this command. This command shows a number of the processor along with its speed.

# print_manifest

NOTE: Could not read the /etc/resolv.conf file.

System Information

    Your Hewlett-Packard computer has software installed and
    configured as follows.

    The system was created September 24, 2008, 02:30:54 EDT.
    It was created with Ignite-UX revision C.6.10.97.

-------------------------------------------------------------
NOTE: You should retain this information for future reference.
-------------------------------------------------------------


System Hardware

    Model:              9000/800/rp4440
    Main Memory:        24574 MB
    Processors:         8
    Processor(0) Speed: 999 MHz
    Processor(1) Speed: 999 MHz
    Processor(2) Speed: 999 MHz
    Processor(3) Speed: 999 MHz
    Processor(4) Speed: 999 MHz
    Processor(5) Speed: 999 MHz
    Processor(6) Speed: 999 MHz
    Processor(7) Speed: 999 MHz
    OS mode:            64 bit
    LAN hardware ID:    0x001A4B08AF2E
----- output clipped -----

machinfo command

This command is available from HPUX 11.21 and above on RX models. This command gives you processor numbers, speed, sockets, and core details.

# machinfo
CPU info:
  4 Intel(R) Itanium 2 9000 series processors (1.6 GHz, 12 MB)
          533 MT/s bus, CPU version C2
          6 logical processors

MP console

Login to MP console and enter the command menu by typing cm. Then ss is the command which shows processor status. This shows you processor sockets. So if you are seeing 8 CPU in top command and below output in MP then its 4 processor sockets housing 4 duel-core processors.

[server12] MP:CM> ss

SS

System Processor Status:

   Monarch Processor: 0

   Processor Module 0: Installed and Configured
   Processor Module 1: Installed and Configured
   Processor Module 2: Installed and Configured
   Processor Module 3: Installed and Configured

top command

This is the simplest way to check the number of CPU on HPUX as well as any Linux system. The top output shows your list of the processor at top of the page.

# top
System: server1                                      Fri Nov 25 14:29:06 2016
Load averages: 0.15, 0.11, 0.11
386 processes: 362 sleeping, 24 running
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    0.13  23.8%   0.0%   0.0%  76.2%   0.0%   0.0%   0.0%   0.0%
 1    0.18  25.7%   0.0%   7.9%  66.3%   0.0%   0.0%   0.0%   0.0%
 2    0.16  14.9%   0.0%   2.0%  83.2%   0.0%   0.0%   0.0%   0.0%
 3    0.13   3.0%   0.0%   5.0%  92.1%   0.0%   0.0%   0.0%   0.0%
 4    0.13  23.8%   0.0%   4.0%  72.3%   0.0%   0.0%   0.0%   0.0%
 5    0.15  17.8%   0.0%   4.0%  78.2%   0.0%   0.0%   0.0%   0.0%
 6    0.15  11.9%   0.0%   4.0%  84.2%   0.0%   0.0%   0.0%   0.0%
 7    0.16  20.8%   0.0%   5.0%  74.3%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   0.15  17.8%   0.0%   4.0%  78.2%   0.0%   0.0%   0.0%   0.0%

You can see CPU is numbered from 0 to 8 i.e. total of 8 CPU active.

sar output

Even sar output can be used to determine the number of CPU in the system. Use just one iteration for output for one second. sar will show one row for each cpu value.

Read our SAR tutorials

Counting the number of rows can help us figure out CPU count.

# sar -Mu 1 1

HP-UX apcrss78 B.11.11 U 9000/800    11/25/16

14:41:14     cpu    %usr    %sys    %wio   %idle
14:41:15       0       0       0       0      99
               1       0       1       0      98
               2       0       0       0      99
               3       0       0       0      99
               4       0       0       0      99
               5       0       0       0      99
               6      24       1       0      75
               7       0       1       0      98
          system       3       1       0      96

# sar -Mu 1 1 | awk 'END {print NR-5}'
8

See first command actual output. We are stripping off extra 5 lines which are for total, headers to get exact count using awk. in second command. Even first output shows CPU numbering like top in first column!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.