- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Finding information about the CPU programatically
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
06-22-2003 06:43 AM
06-22-2003 06:43 AM
I would like to know the following for each CPU, programmatically
1. Type
2. Model
3. Speed
I am able to get the number of active CPUs and the speed of each CPU by using pstat_getdynamic() and pstat_getprocessor(). For CPU Type I am using sysconf(), however this does not give the model for each CPU. Also for getting the CPU Model I am using the model command, which again has the same problem.
Any information about APIs that lets me get all the information on a per CPU basis would be highly appreciated.
Thanks and Regards
Sonison James
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2003 06:55 AM
06-22-2003 06:55 AM
Re: Finding information about the CPU programatically
I am sorry for a mistake in the posting, please read the posting as
I would like to know the following for each CPU, programmatically
1. Type
2. Model
3. Speed
I am able to get the number of active CPUs and the speed of each CPU by using pstat_getdynamic() and pstat_getprocessor(). For CPU Type I am using sysconf(), however this does not give the CPU Type for each CPU. Also for getting the CPU Model I am using the model command, which again has the same problem.
Any information about APIs that lets me get all the information on a per CPU basis would be highly appreciated
Thanks and regards
Sonison James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2003 07:47 AM
06-22-2003 07:47 AM
SolutionAlthough this doesn't answer your question can I just add the information must be the same for each processor, i.e. they must all be the same model, type and speed.
I think that the structures that hold the information are global (not per SPU) hence I don't believe writing code to find this will be of much use?
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2003 08:34 AM
06-22-2003 08:34 AM
Re: Finding information about the CPU programatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2003 11:58 PM
06-22-2003 11:58 PM
Re: Finding information about the CPU programatically
You can use the att' scripts
OR:
################# CSTM #################
/usr/sbin/cstm << EOF >> /tmp/cstmmap1.tmp
map
exit
EOF
set CPU=`grep CPU /tmp/cstmmap1.tmp |awk '{print $1}'|sort -u`
foreach i ($CPU)
/usr/sbin/cstm << EOF >> /tmp/cpu1
map
sel device $i
il
SaveAs
cpu
EOF
set CACHE=`grep "Instruction Cache" /tmp/cpu |awk '{print $4}'|sort -u`
set PDC=`grep "PDC Firmware Revisi" /tmp/cpu |awk '{print $4}'|sort -u`
set CPUPATH=`grep CPU /tmp/cstmmap1.tmp |awk '{print $2}'|sort -u`
end
endif
endif
#############################
echo "Processors:`/usr/sbin/ioscan -C processor |grep processor |wc -l`" >>/tmp/cpu-info
set CPUSPEED=`echo "itick_per_usec/D" |adb -k /stand/vmunix /dev/kmem |tail -1|awk '{print $2}'`
echo "Processors Speed: "$CPUSPEED "Mhz">>/tmp/cpu-info
foreach I ($CPUPATH)
echo "The CACHE size on Processors in path" $I "is "$CACHE "[Kbyte]" >>/tmp/cpu-info
end
echo "The PDC Firmware Revisi is" "$PDC" >> /tmp/cpu-info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2003 01:45 AM
06-23-2003 01:45 AM
Re: Finding information about the CPU programatically
Thanks for the information and the scripts. Even the scripts seems to be assuming that all the CPUs have the same model and speed, so I hope that I can safely make that assumption too in my code.
Thanks and regards
Sonison James