- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to get cpu info
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
07-25-2005 03:13 AM
07-25-2005 03:13 AM
how to get cpu info
I need to know number of cpu's and the speed of each.
i dont have root permission , (and dont have permission to /dev/kmem)
also i can't use a scripts (i need to run rexec query)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:17 AM
07-25-2005 03:17 AM
Re: how to get cpu info
You may check the number of CPUs by using the top command.
You can also get some information using the command model
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:25 AM
07-25-2005 03:25 AM
Re: how to get cpu info
#!/bin/ksh
#
# @(#) sysinfo - gives system information on HPUX machine
#
echo `hostname` "is a " `model |sed 's/9000\/800\///' |sed 's/9000\/899\///'` "with" `/usr/sbin/ioscan -k |grep -n processor |wc -l` `/home/adm/bin/cpuspeed` "Mhz processors and" `/home/adm/bin/meminfo` "of memory"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 03:40 AM
07-25-2005 03:40 AM
Re: how to get cpu info
local($struct_pst_processor)=("L30");
local($cpu_info
, $cpu_ticks);
$cpu_info = "\0" x 120;
syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);
($cpu_ticks)=(unpack($struct_pst_processor
, $cpu_info))[26];
print "speed=".int($cpu_ticks/10000)."\n";'
this will give you the speed of cpu without root privileges.
if you need more info this may help you:
echo "map\nselect device 33\ninfo\nwait\nil\n" | /usr/sbin/cstm
here on this command you need to know your CPU line number on the cstm map, which was 33 for one of my 4 cpus. you can get it from the output of this command and process it yourself:
echo "map" | /usr/sbin/cstm
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 06:20 AM
07-25-2005 06:20 AM
Re: how to get cpu info
If you are not root - then why do you need to know?
If you can pursuade the admin - ask them to install sudo, then this script:
# cat /usr/local/bin/hpmem
#!/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 $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
# if 11iv2 or higher - get cpu this way
ver=$(uname -r | cut -d. -f3)
if ((ver > 22)); then
kval=`echo "processor_count/D" | adb /stand/vmunix /dev/kmem |tail -1|awk -F: '{print $2}' `
else
GetKernelSymbol "processor_count"
fi
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
# if 11iv2 or higher - get memory this way
ver=$(uname -r | cut -d. -f3)
if ((ver > 22)); then
kernel=$(/usr/sbin/kcpath -x)
hexval=$(echo "phys_mem_pages/A" | adb $kernel /dev/kmem|tail +2|awk '{print $2}')
REAL_MEM=$(echo ${hexval}=D|adb)
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 07:07 AM
07-25-2005 07:07 AM
Re: how to get cpu info
you can get CPU, memory, Machine serial number, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 09:27 AM
07-25-2005 09:27 AM
Re: how to get cpu info
If you have (or can get) sudo priviledges then you will have an easier time.
To determine CPU speed;
echo itickl_per_usec/D | adb /stand/vmunix /dev/kmem
To determine number of processors in use;
echo "runningprocs/D" | adb /stand/vmunix /dev/mem
To get CPU HW support;
getconf HW_CPU_SUPP_BITS
To get kernel support;
getconf KERNEL_BITS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 06:27 PM
07-25-2005 06:27 PM
Re: how to get cpu info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 07:05 PM
07-25-2005 07:05 PM
Re: how to get cpu info
[1] http://mirrors.develooper.com/hpux/faq.html
[2] http://mirrors.develooper.com/hpux/ux
As most possibilities are already posted here, I'll just take the shortest non-root version from the FAQ to put here:
a5:/wrk 108 > perl -MUnix::Processors -le'print join"\t",$_->id,$_->state,$_->type,$_->clock for @{Unix::Processors->new()->processors}'
0 online HP PA-RISC 2.0 750
1 online HP PA-RISC 2.0 750
a5:/wrk 109 >
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 08:53 PM
07-25-2005 08:53 PM
Re: how to get cpu info
sam -> performance monitor -> system properties -> processor
If you use sysinfo or adb then it will be able to get information from adb only.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 10:31 PM
07-25-2005 10:31 PM
Re: how to get cpu info
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 10:46 PM
07-25-2005 10:46 PM
Re: how to get cpu info
1. top command will give you number of CPUs in server
2. with cstm>sel all > info > il you can get complete information on CPUs
3. You may also use third part utility "cfg2html" available from freeware
Regards
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2005 10:56 PM
07-25-2005 10:56 PM
Re: how to get cpu info
Please find the attached script(created by some other irtcian) & change permission and run.
# ./ranveer
This will give u information.
enjoy
ranveer
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
