1823084 Members
3233 Online
109646 Solutions
New Discussion юеВ

cpu clock speed

 
SOLVED
Go to solution
David Lewis_1
Advisor

cpu clock speed

Hi,
Is there a way of determining the cpu clock speed via the command line.

many thx
8 REPLIES 8
John Meissner
Esteemed Contributor
Solution

Re: cpu clock speed

yes... use this:

#!/usr/bin/ksh
BOLD="`tput smso`"
NORMAL="`tput rmso`"
cpu=$(echo itick_per_tick/D | adb /stand/vmunix /dev/kmem | sed -n '2p' | awk '{print $2}' | sed 's/0000$//g')
cpu_num=$(grep -i proc /var/adm/syslog/syslog.log | wc -l)
echo "`hostname` has ${BOLD}$cpu_num${NORMAL} processors at ${BOLD}$cpu${NORMAL} Mhz"
All paths lead to destiny
Jannik
Honored Contributor

Re: cpu clock speed

to get the speed of the CPU:
echo "itick_per_usec/D" | adb /stand/vmunix /dev/kmem
jaton
PIYUSH D. PATEL
Honored Contributor

Re: cpu clock speed

Pete Randall
Outstanding Contributor

Re: cpu clock speed

I use the following little script:



HPUX=/stand/vmunix

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



Pete


Pete
Geoff Wild
Honored Contributor

Re: cpu clock speed

Yes - I use this script called hpmem.

It gives you some additional settings as well....

Here's a sample output:

HP-UX system3 B.11.11 U 9000/800 2504392627 unlimited-user license
CPU Count: 6
CPU Speed: 750 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
RAM Size: 10080 MB
bufpages: 1008 MB
maxuprc: 800
maxvgs: 80
maxfiles: 2048
max_thread_proc: 256
nfile: 189100
nflock: 1200
nproc: 2560
ninode: 2984
shmmax: 1073741824
shmmni: 256
dbc_max_pct: 10


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.
Gary Yu
Super Advisor

Re: cpu clock speed

maybe you can just use the "model" command, usually, the last 2 digital of the output indicates the CPU speed. e.g

9000/800/L2000-44 is 440MHZ
9000/800/L1000-5X is 540MHZ
Caesar_3
Esteemed Contributor

Re: cpu clock speed

Hello!

Check this:
echo "itick_per_tick/D" | adb -k /stand/vmunix /dev/kmem | tail -1

Caesar
Fragon
Trusted Contributor

Re: cpu clock speed

The kernel file must be set correctly, normall it is /stand/vmunix!
You can get the cpu clock speed in MHz by:
#echo itick_per_usec /D |adb -k /stand/vmunix /dev/kmem|tail -1|awk '{print $2}'
540 (example)

-ux