Operating System - HP-UX
1834478 Members
3465 Online
110067 Solutions
New Discussion

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

 
SOLVED
Go to solution
Samir Bittar
Occasional Contributor

Help on getting CPU Speed and RAM on a B11.23 HP-UX

Hi
Someone helped before by telling me I can get CPU Speed and RAM with the following script:
HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo RAM: $MYMEM

MHZ=$(echo itick_per_tick/D \
| adb -k $HPUX /dev/kmem \
| tail -1 \
| awk '{print $2/10000}')
echo CPU Speed: $MHZ MHz

However, when I run this script on a B11.23, here's my output:

adb: warning: Unrecognized format character - 'D'.
RAM: 0 MB

adb: info: Option -k is deprecated.
adb: warning: Unrecognized format character - 'D'.
CPU Speed: 0 MHz

Does anyone know what I can do to get these information correctly on a script, not by using SAM or print_manifest? Thank you
8 REPLIES 8
Muthukumar_5
Honored Contributor
Solution

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Use machinfo in 11.23 operating simply. It will give that information.

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

# machinfo in 11.23 will be helpful

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Devender Khatana
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Hi,

The script you are using is for HPUx 11 perhaps. Do this to find out

$file script_name

In Itanium use machinfo to find the detailed information easily.

Also for Physical memory you can use

#dmesg |grep -i physical

HTH,
Devender
Impossible itself mentions "I m possible"
Muthukumar_5
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Use several options available in this thread,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=988157

You can use sysinfo script to get all informations simply.

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

what are you for this,

HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/d" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo RAM: $MYMEM

MHZ=$(echo itick_per_tick/d \
| adb -k $HPUX /dev/kmem \
| tail -1 \
| awk '{print $2/10000}')
echo CPU Speed: $MHZ MHz


--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Hello,

You can use cfg2html to find out.

http://come.to/cfg2html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Use more if you want to have in script mode,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=700995
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=706790

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Help on getting CPU Speed and RAM on a B11.23 HP-UX

Hello,

You can use sysinfo as well,

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sysinfo-3.3.1/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"