1821245 Members
2694 Online
109632 Solutions
New Discussion юеВ

Re: CPU frequency

 
SOLVED
Go to solution
Ralph Grothe
Honored Contributor

CPU frequency

Hello,

when I issue the following command

echo "uti;sc product CPU;info;wait;il"|cstm


I obtain the dump that I attached to this posting (please have a look at attachment)

Although this is quite a detailed report I still cannot see at what frequency the CPUs operate.

How (where from) can I retrieve this information?

Regards

Ralph
Madness, thy name is system administration
11 REPLIES 11
U.SivaKumar_2
Honored Contributor
Solution

Re: CPU frequency

Hi,
To determine the processor speed:

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

Where 360 is the processor speed in the example
server.

regards,
U.SivaKumar


Innovations are made when conventions are broken
T G Manikandan
Honored Contributor

Re: CPU frequency



This will give you in Mhz
CPU frequency.


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

Also check

SAM--->performance MOnitor-->system properties

Thanks
Dietmar Konermann
Honored Contributor

Re: CPU frequency

Ralph,

of course this is an ugly method, but you may try to use the kernel's global "iticks_per_10_msec/D". E.g. 550MHz means 550,000,000 iticks/second.

echo "iticks_per_10_msec/D" | adb /stand/vmunix /dev/kmem

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Paula J Frazer-Campbell
Honored Contributor

Re: CPU frequency

Hi Ralph

Further info:-

1. 'getconf KERNEL_BITS' will return whether you are running 32- or 64-bit.

2. 'getconf HW_32_64_CAPABLE' will show whether your processor is 64-bit capable or not.

3. To find the processor speed (MHz):
echo itick_per_usec/D | adb -k stand/vmunix /dev/mem


Paula
If you can spell SysAdmin then you is one - anon
T G Manikandan
Honored Contributor

Re: CPU frequency

using CSTM you can do this

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


Thanks
Ralph Grothe
Honored Contributor

Re: CPU frequency

This looks strange to me that you have to query the symbol table of the kernel binary in a debugger.
Does this still work when the kernel was compiled without a symbol table (viz. no debugging support).
However, using this oblique HP-UX method, would you mind telling me how to obtain a full (or more thorough) list of symbols (i.e. all the data I could query this way).
I've never used the adb before (because I've done no system programming in C on HP-UX so far).
Madness, thy name is system administration
Paula J Frazer-Campbell
Honored Contributor

Re: CPU frequency

Hi Ralpe

ADB info :-

Paula
If you can spell SysAdmin then you is one - anon
T G Manikandan
Honored Contributor

Re: CPU frequency

Yogeeraj_1
Honored Contributor

Re: CPU frequency

hi,

Try this one to give you required info in Mhz.

HZ=`echo itick_per_tick/D | adb -k /stand/vmunix /dev/kmem|tail -1|cut -f2`
(MHZ=$HZ/10000))
echo $MHZ

Cheers
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ralph Grothe
Honored Contributor

Re: CPU frequency

Paula,

many thanks for the adb tutorial,
although I fear I won't find time to carefully peruse it,
but it sure will give me some answers.

T.G.,

thanks for providing the useful link.
I wonder how one could collectively query several symbols at one go without the need to repaetedly start a new adb instance.
Madness, thy name is system administration
Olav Baadsvik
Esteemed Contributor

Re: CPU frequency


Hi,

Writing a small c-program using calls
to sysconf() you will be able to get
this kind of info.

Here is a sample getting the cpu-speed
from the machine.

See man sysconf for more info.
One advantage with this method is that you
do not have to be logged in as user root.

#include
#include
#include


/* compile on hp-ux 10.20: */
/* cc -D_HPUX_SOURCE -o cpu_speed.exe cpu_speed.c */
/* Compile on hp-ux 11.xx */
/* cc -o cpu_speed.exe cpu_speed.c */

main()
{

struct pst_processor psp;
unsigned long int clock_speed, scclktick;

pstat_getprocessor(&psp, sizeof(psp), 1, 0);

scclktick=sysconf(_SC_CLK_TCK);
clock_speed = psp.psp_iticksperclktick * scclktick;

printf("clock speed is %ld Mhz\n", clock_speed/1000000);

}


Regards
Olav