1833875 Members
1720 Online
110063 Solutions
New Discussion

Re: Processor speed

 
SOLVED
Go to solution
Ken Lee_1
Occasional Contributor

Processor speed

Can anyone tell me on how to check the processor speed instead of using "model"? I need to know the EXACT clock speed of the processor.
6 REPLIES 6
Edward Alfert_2
Respected Contributor
Solution

Re: Processor speed

Per HP document on hp-ux 11.00:

To determine processor speed, use one of these methods:

- Option 1. Use this command:

echo "itick_per_usec/D" | adb /stand/vmunix /dev/kmem
itick_per_usec:
itick_per_usec: 60

- Option 2. Use SAM:

Sam -> Performance -&qt; Performance Monitors->
System Properties

clock speed = 60 MHz
"Do what you love and you will never work a day in your life." - Confucius
Sanjay_6
Honored Contributor

Re: Processor speed

Hi,

If you have STM installed on your system, you can get the info you are looking for easily.

Run and info on processor.

for that use stm in
xstm --> Graphical mode
mstm --> Character terminal mode
cstm --> Command line mode.

do "man cstm" or like that for mode info. STM is part of diag tools on the support plus CD.

Hope this helps.

thanks
Animesh Chakraborty
Honored Contributor

Re: Processor speed

Hi,
Use these commands:

- The model command shows that your system is a K220.

- The 'more /usr/lib/sched.models' command shows that the CPU
is a PA7200.

- This command will show the CPU speed:

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



Thanks
Animesh





Did you take a backup?
Mike Stroyan
Honored Contributor

Re: Processor speed

You can get processor speed from a program by calling pstat_getprocessor and sysconf. See the attached example.
Ian P. Springer
Occasional Contributor

Re: Processor speed

The below C program will print the first CPU's speed in MHz. It can be run by any user:

/* cpuspeed.c - To compile: cc +DAportable -o cpuspeed cpuspeed.c */
#include
#include
#include
#include
#include
#define CPU_ID 0
#define HZ_PER_MHZ 1000000
main()
{
struct pst_processor pst;
union pstun pu;

pu.pst_processor = &pst;
pstat( PSTAT_PROCESSOR, pu, (size_t)sizeof(pst), (size_t)1, CPU_ID);
printf( "%d MHz\n",
(int)((double)pst.psp_iticksperclktick * sysconf( _SC_CLK_TCK ) / HZ_P
ER_MHZ) );
}
Geoff Wild
Honored Contributor

Re: Processor speed

Here's a script (hpmem) I use:

#!/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 -k $hpux /dev/kmem | tr "\012" " " | read junk junk2 kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix ;fi
/bin/uname -a
GetKernelSymbol "processor_count"
print CPU Count: $kval
GetKernelSymbol "itick_per_tick"
let speed=kval/10000
print CPU Speed: $speed MHz
if ((rev > 10)); then
print CPU HW Support: `getconf HW_CPU_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
else
GetKernelSymbol "physmem"
fi
let mb=kval*4/1024 # convert pages to MB
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 "nflocks"
print nflock: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
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.