Operating System - HP-UX
1833049 Members
2374 Online
110049 Solutions
New Discussion

Re: PA-RISC 1.1 or PA-Risc 2.0

 
SOLVED
Go to solution
Bill McNAMARA_1
Honored Contributor

PA-RISC 1.1 or PA-Risc 2.0

Quick one..
single cli appreciated to determine cpu architecture.

I tried stm , print_manifest and uname but got nothing human readable back.

Later,
Bill
It works for me (tm)
12 REPLIES 12
Stefan Farrelly
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

use uname -m and the sched.models library;

grep $(uname -m|sed 's,/, ,'|awk '{print $2}') /usr/sam/lib/mo/sched.models
Im from Palmerston North, New Zealand, but somehow ended up in London...
John Palmer
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

This appears to work...

grep $(model | sed 's;.*/;;') /usr/sam/lib/mo/sched.models | awk '{print $3}'

Regards,
John
Andreas Voss
Honored Contributor
Solution

Re: PA-RISC 1.1 or PA-Risc 2.0

Hi,

you can get the cpu version with:

getconf _SC_CPU_VERSION

This will return in decimal.
To get the right information you have to format the version in hex and compare it in /usr/include/sys/unistd.h:

grep $(getconf _SC_CPU_VERSION | awk '{printf("0x%x",$0)}') /usr/include/sys/unistd.h

Regards
T G Manikandan
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

how about using this

#/usr/sam/lbin/samx -C /usr/sam/lib/C/mo.ui
T G Manikandan
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

#echo "cpu_arch_is_1_1/D"|adb -k /stand/vmunix /dev/kmem

For output
1--->True
0---->False

you can replace 1_1 with 2_0 for the 2.0 version arch machines
i.e
cpu_arch_is_2_0/D


Thanks
H.Merijn Brand (procura
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

/https://www.beepz.com/personal/merijn/#FAQ
Enjoy, Have FUN! H.Merijn
Jean-Louis Phelix
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

hi,

Too late but I give it anyway ...

Regards.

#include
main()
{
switch(sysconf(_SC_CPU_VERSION))
{
case CPU_PA_RISC1_0 : printf("PA-RISC1.0\n") ; break ;
case CPU_PA_RISC1_1 : printf("PA-RISC1.1\n") ; break ;
case CPU_PA_RISC1_2 : printf("PA-RISC1.2\n") ; break ;
case CPU_PA_RISC2_0 : printf("PA-RISC2.0\n") ; break ;
default : printf("Too recent !!!\n") ;
}
}
It works for me (© Bill McNAMARA ...)
Domenico_5
Respected Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

hy bill
download sysinfo, is a script for collect all information on a server and the result is very human.

regards
T G Manikandan
Honored Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0


#x=`model|awk -F "/" '{print $3}'`;grep $x /usr/sam/lib/mo/sched.models


THanks
Domenico_5
Respected Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

opsss.

i have the script
Domenico_5
Respected Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

opsss.

i have the script, sorry
Domenico_5
Respected Contributor

Re: PA-RISC 1.1 or PA-Risc 2.0

opppsssss


sorry i have sysinfo