1751938 Members
4783 Online
108783 Solutions
New Discussion юеВ

CPU and MEMORY

 
Zeng Qing yong
Occasional Contributor

CPU and MEMORY

How could I know the number of CPU and the size of MEMORY installed?

Queyon
4 REPLIES 4
Victor Berridge_1
Occasional Advisor

Re: CPU and MEMORY

Try dmesg:
heres what I get on a 2 processor (K360):
32 processor
34 processor
memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 2097140 Kbytes, lockable: 1797212 Kbytes, available: 1833496
Kbytes

Now there cmd top, that says also 2 processors,
and you can try stm ...

Regards
Victor
Steve Wilson_12
New Member

Re: CPU and MEMORY

The following script may help for 10.X and 11.x systems (note, we put the
serial number in /etc/issue):

if [[ `uname -r` = *.10.* ]]; then
RAM=`adb /stand/vmunix /dev/kmem << !
mem_ptr/U
!`
RAM=`echo $RAM | awk '{
if ($3 > 1073741824) {
printf(" %s GB", $3/1073741824)}
else {
printf(" %s MB", $3/1048576)}
}'`
# the "1048576" in the above equation is equivalent to 1024 * 1024
else
RAM=`adb -k /stand/vmunix /dev/kmem << !
phys_mem_pages/U
!`
RAM=`echo $RAM | awk '{
if ($3 > 1048576/4) {
printf(" %s GB", $3*4/1048576)}
else {
printf(" %s MB", $3*4/1024)}
}'`
fi

if [[ `uname -r` = *.10.* ]]; then
CPU_SPEED=`adb /stand/vmunix /dev/kmem << !
itick_per_tick/U
!`
CPU_SPEED=`echo $CPU_SPEED | awk '{print $3 /= 10000}'`
else
CPU_SPEED=`adb -k /stand/vmunix /dev/kmem << !
itick_per_n_usec/U
!`
CPU_SPEED=`echo $CPU_SPEED | awk '{print $3}'`
fi

CPU_NUM=`adb -k /stand/vmunix /dev/kmem << !
processor_count/D
!`
CPU_NUM=`echo $CPU_NUM | awk '{print $3}'`

osletter=$(uname -r | awk -F. '{print $1}')
osmajor=$(uname -r | awk -F. '{print $2}')
osminor=$(uname -r | awk -F. '{print $3}')
machine_id=$(uname -i)
license=$(uname -l)

echo `date` " Serial Number " `cat /etc/issue | cut -d " " -f 3` " " `cat
/etc/issue | cut -d "," -f 1`
echo " `hostname` is a `model` has $CPU_NUM $CPU_SPEED MHZ cpu(s) $RAM of
memory"
echo " HP-UX $osletter.$osmajor.$osminor $license"

example of output:
Wed Mar 29 10:53:27 PST 2000 Serial Number 6339A02279
cpafisc1 is a 9000/735/99 has 1 99 MHZ cpu(s) 208 MB of memory
HP-UX B.10.20 two-user license
Ben Boutalib
Occasional Advisor

Re: CPU and MEMORY

The best way to have information about your system,memory , CPU's , disks ,
cards , firmwares....
is to install diagnostics from support plus media or IPR and execute : mstm or
xstm.
Choose the one that you need info on (memory, CPU...)
go to action and choose run information.
good luck
Glenn Wagner_1
Occasional Advisor

Re: CPU and MEMORY

IN 10.20, uf you run sam, go into performance monitors, select system
properties. This gives you your CPU info (how many, speed..), Memory info
(physical, virtual,..), network info, as well as dynamic info. This is the
easiest way I've found to get this info.