- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to identify processor?
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
11-12-2006 11:32 PM
11-12-2006 11:32 PM
How can I find out in hpux what processor do I have?
I can only find my machine type:
bash-2.03# model
9000/785/B1000
How do I get the processor type? I need something like PA8500...
It does not matter if it is C++ code or shell command...
Thanks,
Costin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:37 PM
11-12-2006 11:37 PM
Re: how to identify processor?
model command.
Better yet, http://docs.hp.com
It says exactly what processor is in your system.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:38 PM
11-12-2006 11:38 PM
Solutionuse SAM (System Properties)
and/or read:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=558731
Please also see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:39 PM
11-12-2006 11:39 PM
Re: how to identify processor?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:44 PM
11-12-2006 11:44 PM
Re: how to identify processor?
echo "selclass type proc;info;wait;infolog" | cstm
This should help you i think
Thanks,
siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:46 PM
11-12-2006 11:46 PM
Re: how to identify processor?
please read the info in the link I provided.
In Procura's answer are a number of ways of getting the info:
echo "selclass qualifier cpu;infolog" | /usr/sbin/cstm | grep "CPU Module"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2006 11:49 PM
11-12-2006 11:49 PM
Re: how to identify processor?
MODEL=$(grep -i $(model | tr "/" " " \
| awk '{print $NF}') \
/usr/sam/lib/mo/sched.models \
| awk '{print $NF}')
echo $MODEL
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:09 AM
11-13-2006 12:09 AM
Re: how to identify processor?
1. /usr/sam/lib/mo/sched.models does not contain B1000 on my machine.
2. cstm, mstm, xstm do not exist on my machine.
Do you think I have any chance to get the information I need?
bash-2.03# uname -a
HP-UX Janus B.11.00 U 9000/785 2014840735 unlimited-user license
bash-2.03# model
9000/785/B1000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:16 AM
11-13-2006 12:16 AM
Re: how to identify processor?
If there is now way to find it , why dont you hardcode it in your program.
9000/785/B1000 has the following processor
PA 8500 processor at 300MHz
Thanks,
siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:22 AM
11-13-2006 12:22 AM
Re: how to identify processor?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:23 AM
11-13-2006 12:23 AM
Re: how to identify processor?
if it helps (from my machine):
$ grep B1000 /usr/sam/lib/mo/sched.models
B1000 2.0 PA8500
which cstm
/usr/sbin/cstm
I would suggest:
1. you load the cstm etc tools.
2. Update to 11.11 ,as 11.00 support ends 31/12/06
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:27 AM
11-13-2006 12:27 AM
Re: how to identify processor?
bash-2.03# model
9000/785/B1000
bash-2.03# cat /usr/sam/lib/mo/sched.models | grep 785
785 2.0 PA8500
But can I trust this information?
In http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=558731
i find that:
d3:/wrk 105 > model
9000/800/D390
d3:/wrk 105 > grep -i d390 /opt/langtools/lib/sched.models
D390 2.0 PA8200
d3:/wrk 106 > grep -i d390 /usr/sam/lib/mo/sched.models
D390 2.0 PA8000
d3:/wrk 107 > echo "selclass qualifier cpu;info;wait;infolog" | /usr/sbin/cstm | grep "CPU Module"
PA 8200 CPU Module 5.1
Diffent commands, different values. Who do I trust?
The program will run on various machines, not only mine, and should give accurate results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 12:57 AM
11-13-2006 12:57 AM
Re: how to identify processor?
I have explained most of it in the FAQ (2)
1: http://mirrors.develooper.com/hpux/ux
2: http://mirrors.develooper.com/hpux/faq.html
# ux
a5 HP-UX 11.00/64 U 9000/800/A500-7X/64 PA8700/750(2) pa-2.0 2048 Mb
And when you're in doubt, the cstm command gives more reliable info the the grep from the static files. The above mentioned script prefers the files over the command, as that is both faster and never needs su permissions.
If you have the perl module Unix::Processors installed, try this:
# 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
but as you see, that won't give you the *exact* type.
perl also supports syscall ()'s, and in the "ux" script on line 58 and on, you see how that can be used to call syscall (239, ...) which is the SYS_pstat call, and the second argument being 10 is the PSTAT_PROCESSOR request, /usr/include/sys/pstat.h will show you more.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 01:29 AM
11-13-2006 01:29 AM
Re: how to identify processor?
as root
echo "selclass qualifier all;info;wait;infolog" | cstm | tee -a device.log
(It includes the model command)
And look for the cpu part in your device.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 01:31 AM
11-13-2006 01:31 AM
Re: how to identify processor?
The section you need to look for
in device.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 01:33 AM
11-13-2006 01:33 AM
Re: how to identify processor?
--8<--- xx.c
#include
#include
int main (int argc, char *argv[])
{
long sc = sysconf (_SC_CPU_CHIP_TYPE);
printf ("sysconf (%d CPU_CHIP_TYPE) = %ld\n", _SC_CPU_CHIP_TYPE, sc);
return (errno);
} /* main */
-->8---
Above code is unsupported on HP-UX 10.20
# cc +DD64 -O -o xx xx.c
# ./xx
sysconf (10023 CPU_CHIP_TYPE) = 616
#
Local tests here reveal:
PA8500 : 552 (0x00000228)
PA8700 : 616 (0x00000268)
PA8800 : 644 (0x00000284)
Itanium2 : 520225284 (0x1F020204)
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:33 AM
11-13-2006 05:33 AM
Re: how to identify processor?
# getconf CPU_CHIP_TYPE
616
On 10.20 you still get
getconf CPU_CHIP_TYPE: Invalid argument
http://www.openpa.net/cpu.html#table lists the hardware combo's, but not those values.
That made me google on CPU_CHIP_TYPE, and though rather dated, still interesting:
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2003-04/0003.html
And a useful reference to some older discussion here, so I don't need to repeat myself:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=21381
Now, 'man confstr', which should yield the string representation of the code found by getconf (), is wrong (all _SC_'s written as _CS_), but that aside, it still returns zilch:
--8<---
#include
#include
#include
extern void *calloc (size_t, int);
int main (int argc, char *argv[])
{
size_t l;
long sc = sysconf (_SC_CPU_CHIP_TYPE);
char *cs = calloc (80, 1);
l = confstr (_SC_CPU_CHIP_TYPE, cs, 80);
printf ("sysconf (%d CPU_CHIP_TYPE) = 0x%08lx (%12ld) '%s' (%d)\n",
_SC_CPU_CHIP_TYPE, sc, sc, cs, l);
return (errno);
} /* main */
-->8---
/tmp 111 > ./xx
sysconf (10023 CPU_CHIP_TYPE) = 0x00000268 ( 616) '' (0)
Exit 22
Another interesting snippet from http://www.unixguide.net/scripts/stats151
--8<---
# plan A (getconf CPU_CHIP_TYPE)
##################################
if [ "$OSVER" -ge 1100 ]; then
typeset -i2 bin
bin=`getconf CPU_CHIP_TYPE`
typeset -i16 hex
hex=2#`echo $bin | sed -e 's/2#//' -e 's/.....$//'`
model_num=`echo $hex | cut -c4-`
case $model_num in
b) model_name=PA7200 ;;
d) model_name=PA7100LC ;;
e) model_name=PA8000 ;;
f) model_name=PA7300LC ;;
10) model_name=PA8200 ;;
11) model_name=PA8500 ;;
12) model_name=PA8600 ;;
13) model_name=PA8700 ;;
14) model_name=PA8800 ;;
15) model_name=PA8750 ;;
*) model_name= ;;
esac
[ -n "$model_name" ] && { echo $model_name ; return 0 ; }
fi
-->8---
And the pointers continue:
--8<---
CPU_CHIP_TYPE _SC_CPU_CHIP_TYPE Itanium(R)-based systems:
CPUID Register 3 of the
Itanium-based processor
identification registers.
See the Itanium-based
architecture definition for
this platform for the
meaning of each bit.
-->8---
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2006 03:53 AM
11-15-2006 03:53 AM
Re: how to identify processor?
Using sched.models is having the dictionary at user host.
Using cstm is imposible since it is not on every machine.
Using `getconf CPU_CHIP_TYPE` is still a dictionay method and it happens not to be too accurate.