Operating System - HP-UX
1824808 Members
3929 Online
109674 Solutions
New Discussion юеВ

Howto get CPU frequency information on HP-UX ?

 
BOUVET_2
Occasional Advisor

Howto get CPU frequency information on HP-UX ?

hello :)

All is in the title.

Thanks

21 REPLIES 21
Piergiacomo Perini
Trusted Contributor

Re: Howto get CPU frequency information on HP-UX ?

Hi Philippe,

try this command:

echo "itick_per_usec/D" | adb /stand/vmunix /dev/mem | tail -1

Also with SAM you can find out CPU parameters.

Hth

regards
pg
Robert-Jan Goossens_1
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Hi Philippe,

Merijn aka Procura created a forum faq.

http://mirrors.develooper.com/hpux/faq.html

What is my CPU speed?
d3:/ 103 # echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 240
d3:/ 104 #

Regards,
Robert-Jan
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

This command
"echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem"
work on HP-UX PA-RISC but not on Itanium.

Anyone have the solution for the itanium platform ?

Thanks
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

ok,

I've found this command /usr/contrib/bin/machinfo" with the Merijn aka Procura forum.

Thanks all : )
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Hi Bouvet,

You can use this command:



# echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem

echo "selclass qualifier cpu;info;wait;infolog" | /usr/sbin/cstm
--------------------------------------------

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Hi Bouvet,

You can use this command:



# echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem

# echo "selclass qualifier cpu;info;wait;infolog" | /usr/sbin/cstm
--------------------------------------------

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Bouvet,

Also, finidng CPU speed in Mhz, in a single command:


# echo "CPU Speed is= \c" ; echo itick_per_tick/D|adb -k /stand/vmunix /dev/kmem|tail -1|cut -f2 | awk '{printf "%0f MHz\n", $1/10000}'


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

Sorry, Raj.

Your commands don't work on my ITANIUM system.

It's ok now, I found howto get information.

Thanks Raj
Don Mallory
Trusted Contributor

Re: Howto get CPU frequency information on HP-UX ?

Be careful with adb. I had a problem in that it was hanging completely on an rp4440 every time it ran.

The solution was to install NEWADB11i instead.

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=NEWADB11i
Geoff Wild
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Yes, the command is:

/usr/contrib/bin/machinfo

adb won't work on Itanium.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
MAUCCI_2
Frequent Advisor

Re: Howto get CPU frequency information on HP-UX ?

Hi

the CLI that runs on IPF is
echo "itick_per_usec/D" | adb -o /stand/vmunix /dev/kmem

-Cyrille
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Voran,
Good day!!

If you have access to SAM , you can do the following:

sam--> Performance Monitor --> System Property .

----------------------------------------
Ex:
Processors:
Active: 2
Total: 2
CPU Version: 2.0 PA8500
Clock Frequency: 440 MHz
Machine Identification: 534760508
Hardware Model: 9000/800/A500-44
Kernel Width Support: 64
-------------------------------------------

And you will see the CPU frequency Information with other informations.


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

Thanks all but it's ok now.

Yes, of course, i can use SAM, but I need to get this informations from scripts.

MAUCI, You send solution that already done ... please read before ;-)

It 's ok, I have my solution for HP IA64 and HP9000

THANKS ALL :)
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

thx
MAUCCI_2
Frequent Advisor

Re: Howto get CPU frequency information on HP-UX ?

Hmmm, I don't understand what
"You send solution that already done ... please read before ;-)
"
means,

but if you look carefully, my adb command is unique (look at -o) in this post and it is what make its work on IA systems...

unlike other proposed for which you were complaining about them not working on IA
;-)

Cheers
Cyrille
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

Hi Cyrille,

Accept my apologises, you totally right.
Your command run also on IA64

Thanks

Philippe
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Voran,

One thing to be noted :

Giving 0 pts to my last post shows you are sick., and you need to check out this page:

http://66.34.90.71/ITRCForumsEtiquette/




"
Subject: Howto get CPU frequency information on HP-UX ?

Though, You never mentioned through command prompt.



Hope this will help,
Regards,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

Raj,

I can understand that 0 pts frustate you.
But,

You fisrt give solution for HP9000 after I ask solution for IA64. And your solution was the same that as done before.

Then you give "very light" solution (yes, use sam is not fair, are you thinking we are poor noob? ) after I said it's ok I have solution.

May be I'm sick like you said (thanks a lot) but may be you only search to win points. I don't think that can improve the quality of this forum. An dthat can be add in the ITRCForumsEtiquette/

Regards
Philippe
Raj D.
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Voran,

Looks like still you havn't gone through the link: http://66.34.90.71/ITRCForumEtiquette/

, else It could have very easy to understand as how this forum works. I suggest, take out sometime to go through the link. Nothing more I have to write,

This forum is nice and alwayas will be nice,


Cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
BOUVET_2
Occasional Advisor

Re: Howto get CPU frequency information on HP-UX ?

http://66.34.90.71/ITRCForumEtiquette/ ?

you surely want to say http://66.34.90.71/ITRCForumsEtiquette/
No ?

It is not write that we must give points to anyone post reply. Even if this one give nothing interesting.
No ? yes ?
Geoff Wild
Honored Contributor

Re: Howto get CPU frequency information on HP-UX ?

Not that I like jumping in when topics go astray - but I do have a solution for you.

I forgot about the -o option to adb - so I re-wrote the hpmem script - output looks like:

# hpmem.ia64
HP-UX sha1 B.11.23 U ia64 3122715088 unlimited-user license
CPU Count: 1
CPU Speed: 1300 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
RAM Size: 2036 MB
bufpages: 407 MB
maxuprc: 256
maxvgs: 10
maxfiles: 2048
max_thread_proc: 1200
nfile: 65536
nproc: 4200
ninode: 4880
shmmax: 1073741824
shmmni: 400
dbc_max_pct: 20

Here's the script:

# cat hpmem.ia64
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb to
# examine the running kernel
#
GetKernelSymbol()
{
echo "$1/D" | \
adb -o $hpux /dev/kmem | \
tr "\012" " " | \
awk -F: '{print $3}' |\
read kval
}
hpux=/stand/vmunix
rev=$(uname -r | cut -d. -f2)
/bin/uname -a
GetKernelSymbol "active_processor_count"
print CPU Count: $kval
GetKernelSymbol "itick_per_usec"
print CPU Speed: $kval MHz
print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
ver=$(uname -r | cut -d. -f3)
# if 11iv2 or higher - get memory this way
if ((ver > 22)); then
kernel=$(/usr/sbin/kcpath -x)
hexval=$(echo "phys_mem_pages/A" | adb -o $kernel /dev/kmem|tail +2|awk '{print $2}')
REAL_MEM=$(echo ${hexval}=D|adb -o)
mb=$(expr ${REAL_MEM} / 256)
else
let mb=kval*4/1024 # convert pages to MB
fi
print RAM Size: $mb MB
GetKernelSymbol "bufpages"
let mb=kval*4/1024 # convert pages to MB
print bufpages: $mb MB
GetKernelSymbol "maxuprc"
print maxuprc: $kval
GetKernelSymbol "maxvgs"
print maxvgs: $kval
GetKernelSymbol "maxfiles"
print maxfiles: $kval
GetKernelSymbol "max_thread_proc"
print max_thread_proc: $kval
GetKernelSymbol "nfile"
print nfile: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
GetKernelSymbol "dbc_max_pct"
print dbc_max_pct: $kval


Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.