Re: IPL device number
paultz wrote: In thanking Mark for writing the script ( I had been the one who originally asked how this could be done), I mentioned I owed him yet another beer. Mark corrected me that I was probably up to a pony keg by now. Hmmm ... can you FedEx a kegger? ;-) Mark is one of the speakers at SHARE in Dallas next month. Just ship the keg to him in care of the VM & Linux table at SCIDS, we'll probably make sure he gets it. :-) Just a thought, Nick
Re: IPL device number
Ken, Mark has it posted: http://linuxvm.org/patches/S390/iplvol.sh Here's another chance for me, though, to thank Mark for the great job he does of organizing all of this stuff at linuxvm.org. In thanking Mark for writing the script ( I had been the one who originally asked how this could be done), I mentioned I owed him yet another beer. Mark corrected me that I was probably up to a pony keg by now. Hmmm ... can you FedEx a kegger? ;-) Paul From: Ken Dreger Subject: Re: IPL device number In-Reply-To: <[EMAIL PROTECTED] xch.eds.com> Hey Mark, how about a full copy of the script ?? Ken Dreger
Re: IPL device number
It's been previously uploaded to http://linuxvm.org/Patches/S390/iplvol.sh Mark Post -Original Message- From: Ken Dreger [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 3:50 PM To: [EMAIL PROTECTED] Subject: Re: IPL device number Hey Mark, how about a full copy of the script ?? Ken Dreger At 03:44 PM 1/10/2003 -0500, you wrote: >Apply this patch to it: >--- iplvol.orig Fri Jan 10 15:42:05 2003 >+++ iplvol Fri Jan 10 15:42:31 2003 >@@ -33,6 +33,6 @@ > > subchannel=`get_subchannel` > >-iplvol=`grep " $subchannel" /proc/subchannels | cut -f 1 -d" "` >+iplvol=`grep -i " $subchannel" /proc/subchannels | cut -f 1 -d" "` > echo "IPL volume was device number $iplvol" > > >Mark Post > >-Original Message- >From: Jim Sibley [mailto:[EMAIL PROTECTED]] >Sent: Friday, January 10, 2003 3:39 PM >To: [EMAIL PROTECTED] >Subject: Re: IPL device number > > >You have a bug in the iplvol.sh script > >When the subchannel is returned to the variable "subchannel", it should be >translated to upper case as the values in /proc/subchannels are in hex and >upper case. > >On my SuSE SLES7 2.4.7 system LPAR, the value returned is "0be7", but the >value in /proc/subchannel is "0BE7" > >Regards, Jim >Linux S/390-zSeries Support, SEEL, IBM Silicon Valley Labs >t/l 543-4021, 408-463-4021, [EMAIL PROTECTED] >*** Grace Happens *** Ken Dreger Consultant in OS390, z/OS Systems, Linux 390 systems, Web page consulting, High Tech Investigations Home pages: www.ken.dreger.com Our Santa site: www.acornartists.com The PI site: www.laprivateeye.com My RedHat system: kendreger.dns2go.com Contracting services available at reasonable rates Contact: [EMAIL PROTECTED]
Re: IPL device number
Hey Mark, how about a full copy of the script ?? Ken Dreger At 03:44 PM 1/10/2003 -0500, you wrote: Apply this patch to it: --- iplvol.orig Fri Jan 10 15:42:05 2003 +++ iplvol Fri Jan 10 15:42:31 2003 @@ -33,6 +33,6 @@ subchannel=`get_subchannel` -iplvol=`grep " $subchannel" /proc/subchannels | cut -f 1 -d" "` +iplvol=`grep -i " $subchannel" /proc/subchannels | cut -f 1 -d" "` echo "IPL volume was device number $iplvol" Mark Post -Original Message- From: Jim Sibley [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 3:39 PM To: [EMAIL PROTECTED] Subject: Re: IPL device number You have a bug in the iplvol.sh script When the subchannel is returned to the variable "subchannel", it should be translated to upper case as the values in /proc/subchannels are in hex and upper case. On my SuSE SLES7 2.4.7 system LPAR, the value returned is "0be7", but the value in /proc/subchannel is "0BE7" Regards, Jim Linux S/390-zSeries Support, SEEL, IBM Silicon Valley Labs t/l 543-4021, 408-463-4021, [EMAIL PROTECTED] *** Grace Happens *** Ken Dreger Consultant in OS390, z/OS Systems, Linux 390 systems, Web page consulting, High Tech Investigations Home pages: www.ken.dreger.com Our Santa site: www.acornartists.com The PI site: www.laprivateeye.com My RedHat system: kendreger.dns2go.com Contracting services available at reasonable rates Contact: [EMAIL PROTECTED]
Re: IPL device number
Apply this patch to it: --- iplvol.orig Fri Jan 10 15:42:05 2003 +++ iplvol Fri Jan 10 15:42:31 2003 @@ -33,6 +33,6 @@ subchannel=`get_subchannel` -iplvol=`grep " $subchannel" /proc/subchannels | cut -f 1 -d" "` +iplvol=`grep -i " $subchannel" /proc/subchannels | cut -f 1 -d" "` echo "IPL volume was device number $iplvol" Mark Post -Original Message- From: Jim Sibley [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 3:39 PM To: [EMAIL PROTECTED] Subject: Re: IPL device number You have a bug in the iplvol.sh script When the subchannel is returned to the variable "subchannel", it should be translated to upper case as the values in /proc/subchannels are in hex and upper case. On my SuSE SLES7 2.4.7 system LPAR, the value returned is "0be7", but the value in /proc/subchannel is "0BE7" Regards, Jim Linux S/390-zSeries Support, SEEL, IBM Silicon Valley Labs t/l 543-4021, 408-463-4021, [EMAIL PROTECTED] *** Grace Happens ***
Re: IPL device number
You have a bug in the iplvol.sh script When the subchannel is returned to the variable "subchannel", it should be translated to upper case as the values in /proc/subchannels are in hex and upper case. On my SuSE SLES7 2.4.7 system LPAR, the value returned is "0be7", but the value in /proc/subchannel is "0BE7" Regards, Jim Linux S/390-zSeries Support, SEEL, IBM Silicon Valley Labs t/l 543-4021, 408-463-4021, [EMAIL PROTECTED] *** Grace Happens ***
Re: IPL device number
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., -r1 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
Re: IPL device number
Rob, Perfect! Thanks a million. I don't suppose you have a similar techniques for the older Marist 2.2.14 flavor? I was thinking it may have been based oh RH 6.1 or thereabouts. No /proc/subchannels there. Thanks again, Paul From: Rob van der Heij Subject: Re: IPL device number In-Reply-To: <[EMAIL PROTECTED]> 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
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
Re: IPL device number
Paul, I'm not aware of anything like that on any distribution. Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED]]On Behalf Of paultz Sent: Monday, December 09, 2002 8:03 PM To: [EMAIL PROTECTED] Subject: IPL device number 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? Thanks, Paul