- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Howto get CPU frequency information on HP-UX ?
Operating System - HP-UX
1752676
Members
6031
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2006 12:21 AM
09-14-2006 12:21 AM
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 ?
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2006 01:34 AM
09-14-2006 01:34 AM
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
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.
- « Previous
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP