check for POWER5+ in shell script - Aix

This is a discussion on check for POWER5+ in shell script - Aix ; Hi, how can i check within a shell script, wether i'm running on a Power5 or Power5+ processor ? Regards Andreas Andreas Wizemann...

+ Reply to Thread
Results 1 to 6 of 6

Thread: check for POWER5+ in shell script

  1. check for POWER5+ in shell script

    Hi,

    how can i check within a shell script, wether i'm running
    on a Power5 or Power5+ processor ?

    Regards
    Andreas
    Andreas Wizemann

  2. Re: check for POWER5+ in shell script

    Try prtconf and grep on Processor

    Also you might read something like this (from prev. posts):

    http://www-1.ibm.com/support/docview...d=isg3T1000107

    Andreas Wizemann wrote:
    > Hi,
    >
    > how can i check within a shell script, wether i'm running
    > on a Power5 or Power5+ processor ?
    >
    > Regards
    > Andreas
    > Andreas Wizemann



  3. Re: check for POWER5+ in shell script

    I know PRTCONF.
    On a p570 (Power5) it shows:

    Processor Type: PowerPC_POWER5

    But what das this line show on new Power5+ Processors ???

    On 11 Oct 2006 23:08:05 -0700, "Bobohoolie" wrote:

    >Try prtconf and grep on Processor
    >
    >Also you might read something like this (from prev. posts):
    >
    >http://www-1.ibm.com/support/docview...d=isg3T1000107
    >
    >Andreas Wizemann wrote:
    >> Hi,
    >>
    >> how can i check within a shell script, wether i'm running
    >> on a Power5 or Power5+ processor ?
    >>
    >> Regards
    >> Andreas
    >> Andreas Wizemann

    Andreas Wizemann

  4. Re: check for POWER5+ in shell script


    Andreas.Wizemann@fvvag.de wrote:
    > I know PRTCONF.
    > On a p570 (Power5) it shows:
    >
    > Processor Type: PowerPC_POWER5
    >
    > But what das this line show on new Power5+ Processors ???
    >
    > On 11 Oct 2006 23:08:05 -0700, "Bobohoolie" wrote:
    >
    > >Try prtconf and grep on Processor
    > >
    > >Also you might read something like this (from prev. posts):
    > >
    > >http://www-1.ibm.com/support/docview...d=isg3T1000107
    > >
    > >Andreas Wizemann wrote:
    > >> Hi,
    > >>
    > >> how can i check within a shell script, wether i'm running
    > >> on a Power5 or Power5+ processor ?
    > >>
    > >> Regards
    > >> Andreas
    > >> Andreas Wizemann

    > Andreas Wizemann


    On my p5+ machines it also shows:

    Processor Type: PowerPC_POWER5

    you may be able to tell by the System Model:
    line of prtconf

    on my p5 520 machine the System Model is:

    9111-520

    on my p5+ 520 machine the System Model is:

    9131-52A

    on my p5+ 550 machine the System Model is:

    9133-55A

    I don't recall any of the p5 machines carrying
    the -xxA designation. The p5+ quads may be
    ending in Q. (not sure I don't have a quad)


  5. Re: check for POWER5+ in shell script

    Thank you, verry much.
    This info helps a lot.
    Bye
    Andreas Wizemann

  6. Re: check for POWER5+ in shell script

    Andreas Wizemann wrote:
    > Hi,
    >
    > how can i check within a shell script, wether i'm running
    > on a Power5 or Power5+ processor ?
    >
    > Regards
    > Andreas
    > Andreas Wizemann


    You may be able to map from System_Model to processor type,
    but that's indirect at best, and is soon outdated. Same problem
    exists with trying to map from CPU part numbers (80P5244, etc.)

    The proper way would be to read the processor version register.
    But since access via mfspr instruction to PVR is privileged,
    it could only be called in kernel mode.

    If you are running in a Linux LPAR, it's easier:
    (GR was the codename for the Power5, GS for 5+)

    -SLES9 LPAR with glibc-2.3.3-98.35.3 on Power5
    >cat /proc/cpuinfo

    processor : 0
    cpu : POWER5 (gr)
    clock : 1656.408000MHz
    revision : 2.2

    -RHEL4 LPAR with glibc-2.3.4-2.9 on Power5+
    >cat /proc/cpuinfo

    processor : 0
    cpu : POWER5 (gs)
    clock : 1898.100000MHz
    revision : 2.0

    Have a look at the initial processor startup code for Linux
    located in: arch/powerpc/kernel/cputable.c for more details.

    Unfortunately AIX has no such easy access method.
    Best way I found was to read the OF device tree.
    From an OF prompt:

    >show-devs

    0000020a1a88: /cpus
    0000020a5e98: /PowerPC,POWER5@0
    ....
    >dev /cpus/PowerPC,POWER5@0 ok
    >.properties

    name PowerPC,POWER5
    device_type cpu
    cpu-version 003a0202
    ....

    If you have already booted AIX you can use kdb for this.
    The iplcb (IPL controlblock) command will show ROSIPL values,
    including processor info and an OS copy of the flattened OF
    Device Tree. (assuming bos.sysmgt.serv_aid was installed).
    So something like this could be used:
    >echo "iplcb 0"|kdb| sed -n -e '/version/,$p'



    Eric



+ Reply to Thread