Earlier this month Rob documented this neat trick on how to figure out what
address your Linux/390 system was IPLed off of last.  While I was getting
ready to put this up on the linuxvm.org web site, I thought it would be a
nice idea to make this into a shell script so that it would be easy for
people to get that information.  So, at
http://linuxvm.org/patches/s390/iplvol.sh you can find a bash script that
does just that.

Due to the nature of the technique, running gdb against /proc/kcore, this
can only be done by root.  This is because the permissions on /proc/kcore
are 400, i.e.,
-r--------    1 root     root     42115072 Dec 30 00:59 /proc/kcore

And, since it requires /proc/subchannel to be present, the script checks to
see if you're running on a 2.4 or higher kernel level.

Some values for the text parsing are hard-coded, so you may need to adjust
them for your system.  If so, please let me know so I can see if I can
adjust the script to run properly in your environment.  Enjoy.

Mark Post

-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED]]On Behalf Of Rob
van der Heij
Sent: Tuesday, December 10, 2002 1:55 AM
To: [EMAIL PROTECTED]
Subject: Re: IPL device number


At 20:03 09-12-02 -0500, paultz wrote:

>Is there a single command or file somewhere in RH7.2 that will reveal
>the device name/number from which the RH7.2 LPAR was IPLed?

The subchannel address of your IPL device is stored in 0x10404 during the
boot process, so if you have 'gdb' installed it goes like this:
     gdb -c /proc/kcore
display the contents of 10404
     x/x 0x10404
     quit
look for that subchannel address (the rightmost 2 bytes shown in gdb) in
the list of devices, like with
     cat /proc/subchannels

Rob

Reply via email to