msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

24 Feb 15 Server backplane layout for rx class servers

HP-UX hardware is a bit Byzantine in nature. The following script demystifies things a bit and allows us to work at remote data centers with accuracy on cable issues both fiber and copper.

If you want to use this script, use the contact form to reach out to me. Most people will find cutting and pasting from the website very frustrating.

I am also reaching out to the community, dare I say fan base for assistance. I am fairly certain that the fiber side accurately reports status of hba connections. I am fairly certain that the copper side needs to be improved.

This is tested on rx7640 and rx8640 systems. I am fairly confident that it will work on superdomes. I just do not happen to have any around to test on.

Script includes an environment plugin called .scriptenv . I will provide relevant code from it as some of what it does is customer specific and can not be released into the wild. If functionality is needed everywhere, I try to provide it via a centrally managed file. I provide functionality to both command prompts and scripting this way. It allows me to make the scripts generic and change one file with environment customizations.

Script is based on olrad -q output. It uses several deprecated utilities such as lanadmin and lanscan. Since I currently doubt HP-UX v4 is in the works, this should not be a problem.

The output then the script:

IP addresses and mac addresses have been changed to protect the innocent:

./backplane.layout.ksh
Executing HP-UX specific environment parameters…
m rx8640
ml ia64 hp server rx8640
——————————————————————–
Valid model found: rx8640
8-0-1-1 3/0/8/1
Nework info:
info lan3: 192.189.44.111 3/0/8/1/0/6/0 0x0025B3E86088 UP up(1) up(1)
info lan4: 192.101.0.155 3/0/8/1/0/6/1 0x0025B3E86089 UP up(1) up(1)
HBA info:
hba dev: /dev/fcd2
drviver state: ONLINE
fcms device: 3/0/8/1/0/4/0
WWN sys: 0x500143800542b4f9
WWP sys: 0x500143800542b4f8
Switch port: 0x20280027f8a26cd4
Switch node: 0x10000027f8a26cd4
hba dev: /dev/fcd3
drviver state: ONLINE
fcms device: 3/0/8/1/0/4/1
WWN sys: 0x500143800542b4fb
WWP sys: 0x500143800542b4fa
Switch port: 0x20a80027f8a09ff8
Switch node: 0x10000027f8a09ff8
——————————————————————–
8-0-1-7 3/0/2/1
Nework info:
info lan1: 192.8.0.95 3/0/2/1/0/6/0 0x0025B3E86066 UP up(1) up(1)
info lan2: 119.101.3.71 3/0/2/1/0/6/1 0x0025B3E86067 UP up(1) up(1)
HBA info:
hba dev: /dev/fcd0
drviver state: AWAITING_LINK_UP
fcms device: 3/0/2/1/0/4/0
WWN sys: 0x500143800542b4b5
WWP sys: 0x500143800542b4b4
Switch port: 0000000000000000
Switch node: 0000000000000000
hba dev: /dev/fcd1
drviver state: AWAITING_LINK_UP
fcms device: 3/0/2/1/0/4/1
WWN sys: 0x500143800542b4b7
WWP sys: 0x500143800542b4b6
Switch port: 0000000000000000
Switch node: 0000000000000000
——————————————————————–
8-0-1-5 3/0/6/0/0/0
Nework info:
ifconfig: no such interface
info lan7: 3/0/6/0/0/0/0/2/0/0/0 0x001E0B5186F0 UP up(1) up(1)
info lan8: 0.0.0.0 3/0/6/0/0/0/0/2/0/0/1 0x001E0B5186F1 UP up(1) up(1)
HBA info:
hba dev: /dev/fclp6
drviver state: ONLINE
fcms device: 3/0/6/0/0/0/0/4/0/0/0
WWN sys: 0x5001438001314ad5
WWP sys: 0x5001438001314ad4
Switch port: 0x20260027f8a09ff8
Switch node: 0x10000027f8a09ff8
hba dev: /dev/fclp7
drviver state: ONLINE
fcms device: 3/0/6/0/0/0/0/4/0/0/1
WWN sys: 0x5001438001314ad7
WWP sys: 0x5001438001314ad6
Switch port: 0x20950027f8a26cd4
Switch node: 0x10000027f8a26cd4
——————————————————————–
8-0-1-6 3/0/4/0/0/0
Nework info:
info lan5: 0.0.0.0 3/0/4/0/0/0/0/2/0/0/0 0x001E0B5186B4 UP up(1) up(1)
info lan6: 0.0.0.0 3/0/4/0/0/0/0/2/0/0/1 0x001E0B5186B5 UP up(1) up(1)
HBA info:
hba dev: /dev/fclp4
drviver state: ONLINE
fcms device: 3/0/4/0/0/0/0/4/0/0/0
WWN sys: 0x5001438001314a99
WWP sys: 0x5001438001314a98
Switch port: 0x200f0027f8a09ff8
Switch node: 0x10000027f8a09ff8
hba dev: /dev/fclp5
drviver state: ONLINE
fcms device: 3/0/4/0/0/0/0/4/0/0/1
WWN sys: 0x5001438001314a9b
WWP sys: 0x5001438001314a9a
Switch port: 0x20140027f8a09ff8
Switch node: 0x10000027f8a09ff8
——————————————————————–

Key output is this:
8-0-1-6
This is how the backplane is actually labeled.

cat backplane.layout.ksh
#!/usr/bin/ksh
#
# vgfiberswitch.ksh
# Steven “Shmuel” Protter steven.protter@hcl.com
#
. /var/adm/bin/.scriptenv
PATH=/opt/fcms/bin:${PATH}
####
# binary location
#
LS=/usr/sbin/lanscan
IS=/usr/sbin/ioscan
NW=/usr/sbin/nwmgr
IF=/usr/sbin/ifconfig
FU=/opt/fcms/bin/fcmsutil
LL=/usr/sbin/linkloop
LA=/usr/sbin/lanadmin

echo “m ${modinfo}”
echo “ml ${modinfol}”
echo “——————————————————————–”
if [ “${modinfo}” = “rx8640” ] ||[ “${modinfo}” = “rx7640” ]
then
echo “Valid model found: ${modinfo}”
else
echo “INVALID model found: ${modinfo}”
echo “Exiting return code 1 ………”
exit 1
fi
## determine number of multifunction cards to expect
ncards=$(olrad -n);
olrad -q| awk ‘/Yes/{ printf “%s %s\n”,$1,$2 }’ | while read -r slot hwp
do
echo “${slot} ${hwp}”
echo “Nework info:”
## network info
${LS} | grep “${hwp}” | awk ‘{ printf “%s %s %s %s %s\n”,$1,$2,$3,$4,$5 }’ | while read -r fwp mad nn st ln
do
### echo “hwp: ${fwp} mad: ${mad} netnum: ${nn} status ${st} lan:${ln}”
ipady=$(ifconfig ${ln} |awk ‘/inet/{print $2}’);
last1=$(lanadmin -g $nn |awk ‘/Administration Status/{ print $NF}’);
last2=$(lanadmin -g $nn |awk ‘/Operation Status/{ print $NF}’);
echo “info ${ln}: ${ipady} ${fwp} ${mad} ${st} ${last1} ${last2}”
done
echo “HBA info:”
ioscan -fnCfc -H ${hwp} | awk ‘/dev/{print $NF}’ |while read -r dv
do
nnwwn=$(${FU} ${dv}|awk ‘/N_Port Node World Wide Name/{print $NF}’);
npwwn=$(${FU} ${dv}|awk ‘/N_Port Port World Wide Name/{print $NF}’);
spwwn=$(${FU} ${dv}|awk ‘/Switch Port World Wide Name/{print $NF}’);
snwwn=$(${FU} ${dv}|awk ‘/Switch Node World Wide Name/{print $NF}’);
drst=$(${FU} ${dv}|awk ‘/Driver state/{print $NF}’);
fchw=$(${FU} ${dv}|awk ‘/Hardware Path is/{print $NF}’);
echo “hba dev: ${dv}”
echo “drviver state: ${drst}”
echo “fcms device: ${fchw}”
echo “WWN sys: ${nnwwn}”
echo “WWP sys: ${npwwn}”
echo “Switch port: ${spwwn}”
echo “Switch node: ${snwwn}”
done

echo “——————————————————————–”
done

relevant parts of .scriptenv

OSM=$(uname -s);
OSV=$(uname -r);

# determine the third octet
hn=$(hostname);

## /Depots/B.11.31/2014midyear_depot
## /Depots/B.11.23/2014midyear_depot

if [ “${OSM}” = “HP-UX” ]
then
echo “Executing HP-UX specific environment parameters…”
modinfo=$(model | awk ‘{print $NF}’);
modinfol=$(model | awk ‘{printf “%s %s %s %s\n”,$1,$2,$3,$4}’);
isvirt=$(model | awk ‘/Virtual/{print $NF}’ | wc -l);
fi

Script is provided without warranty.

Link to script..

Tags: , , ,

WhatsApp chat