How to find how many CPU installed in the servers

We are using HP unix how to find out how many number of CPU's in the system.

Have your tried mpstat ? which works in unix not sure about HP unix

We tried but its not working.We tried parstatus too.But its not working.

uname -a
HP-UX hydcpub B.11.23 U ia64 0688858991 unlimited-user license.

One way:
ioscan -C processor

But please don't post technical questions in "Post Here to Contact Site Administrators and Moderators". Like the description says: "Make Suggestions About Forums, Features, or Content here. Discuss Rules and Guidelines. Get Forum Support Here. (Registered Users Only)" and that is not what you're trying to do. The HP-UX experts will general check the HP-UX forum and you probably would have gotten a quicker answer there.

what about ' top '

it displays the CPU utilization for all the CPU's

I got the same from "machinfo"

machinfo on IA64

glance and top will tell you

ioscan | grep -i processor
# ioscan -fn | grep -i proc
processor 0 33 processor CLAIMED PROCESSOR Processor
processor 1 37 processor CLAIMED PROCESSOR Processor
processor 2 97 processor CLAIMED PROCESSOR Processor

This will work on 11i PA-RISC:

:
# Name:
# cpumem
#
# Purpose:
# List the CPU & memory particulars of a HP-UX 11i v1 server.
#
#@(#)cpumem.sh PR

nodename=$(uname -n)
model=$(model)
ncpu=$(echo processor_count/D |adb /stand/vmunix /dev/kmem |tail -n 1 |awk '{print $2}')
mhz=$(echo itick_per_tick/D |adb /stand/vmunix /dev/kmem |tail -n 1 |awk '{print $2/10000 " MHz"}')
mb=$(echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem |tail -n 1 |awk '{print $2/256 " MB"}')

echo "$nodename $model ${ncpu} $mhz $mb"

# cpumem
ldgpdb01 9000/800/L3000-7x 3 750 MHz 12288 MB

(And no, I don't know why this box has three CPUs!)

Try the following:

ioscan -fnC processor

and also try

machinfo