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

13 Oct 15 debugging startup problems: trick of the day

Got an unfindable syntax error in startup?

We have the trick for you courtesy of JRF of the ITRC forums

/sbin/rc[102]: syntax error at line 188 : `”‘ unmatched
/sbin/rc1.d/S090hpvmguest[286]: /usr/bin/getconf: not found
/sbin/rc1.d/S090hpvmguest[286]: /usr/bin/grep: not found
/sbin/rc1.d/S105vparinit[63]: /usr/sbin/kcpath: not found

sh -vx /etc/rc.config 2>&1|more

+ fname=netconf
+ [ -f /etc/rc.config.d/netconf -a netconf != core -a netconf = netconf ]
+ . /etc/rc.config.d/netconf
/etc/rc.config[13]: Syntax error at line 188 : `”‘ is not matched.

Problem startup file in this case is netconf

Tags: , , ,

10 Sep 12 Hot replacement of an HBA/NIC card (rx8640). No downtime.

Take note of the fcmsutil output below. One of the fiber cards has failed here.

We became aware of the problem due to a resmon message and errors generated on the SAN side.

[shmuel01]/root # olrad -q
Driver(s)
Capable
Slot Path Bus Max Spd Pwr Occu Susp OLAR OLD Max Mode
Num Spd Mode
0-0-0-1 0/0/8/1 140 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-2 0/0/10/1 169 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-3 0/0/12/1 198 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-0-4 0/0/14/1 227 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-0-5 0/0/6/1 112 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-6 0/0/4/1 84 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-7 0/0/2/1 56 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-8 0/0/1/1 28 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-1 1/0/8/1 396 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-2 1/0/10/1 425 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-3 1/0/12/1 454 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-1-4 1/0/14/1 483 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-1-5 1/0/6/1 368 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-6 1/0/4/1 340 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-7 1/0/2/1 312 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-8 1/0/1/1 284 133 133 Off No N/A N/A N/A PCI-X PCI-X
[sap1pbw0]/root # ioscan -fnCfc
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
fc 0 0/0/12/1/0/4/0 fcd CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X Fibre Channel 1-port 4Gb FC/1-port 1000B-T Combo Adapter (FC Port 1)
/dev/fcd0
fc 1 0/0/14/1/0/4/0 fcd CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X Fibre Channel 1-port 4Gb FC/1-port 1000B-T Combo Adapter (FC Port 1)
/dev/fcd1
fc 2 1/0/12/1/0/4/0 fcd CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X Fibre Channel 1-port 4Gb FC/1-port 1000B-T Combo Adapter (FC Port 1)
/dev/fcd2
fc 3 1/0/14/1/0/4/0 fcd CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X Fibre Channel 1-port 4Gb FC/1-port 1000B-T Combo Adapter (FC Port 1)
/dev/fcd3
[shmuel01]/root # fcmsutil /dev/fcd0

Vendor ID is = 0x001077
Device ID is = 0x002422
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x0012de
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.0.90
ISP Chip version = 3
Previous Topology = UNINITIALIZED
Link Speed = UNKNOWN
Local N_Port_id is = None
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x500110a0003db94b
N_Port Port World Wide Name = 0x500110a0003db94a
Switch Port World Wide Name = 0x0000000000000000
Switch Node World Wide Name = 0x0000000000000000
Driver state = AWAITING_LINK_UP
Hardware Path is = 0/0/12/1/0/4/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.08 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Mar 27 2007,15:29:17

[shmuel01]/root # fcmsutil /dev/fcd1

Vendor ID is = 0x001077
Device ID is = 0x002422
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x0012de
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.0.90
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0xdc000b
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x500110a0003db94f
N_Port Port World Wide Name = 0x500110a0003db94e
Switch Port World Wide Name = 0x2043000dec8812c0
Switch Node World Wide Name = 0x2046000dec2adb01
Driver state = ONLINE
Hardware Path is = 0/0/14/1/0/4/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.08 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Mar 27 2007,15:29:17

[shmuel01]/root # fcmsutil /dev/fcd2

Vendor ID is = 0x001077
Device ID is = 0x002422
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x0012de
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.0.90
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0x9d000b
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x500110a0003db93b
N_Port Port World Wide Name = 0x500110a0003db93a
Switch Port World Wide Name = 0x2043000dec881f00
Switch Node World Wide Name = 0x2050000dec2adcc1
Driver state = ONLINE
Hardware Path is = 1/0/12/1/0/4/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.08 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Mar 27 2007,15:29:17

[shmuel01]/root # fcmsutil /dev/fcd3

Vendor ID is = 0x001077
Device ID is = 0x002422
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x0012de
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.0.90
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0x9d000a
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x500110a0003db8e1
N_Port Port World Wide Name = 0x500110a0003db8e0
Switch Port World Wide Name = 0x2003000dec881f00
Switch Node World Wide Name = 0x2050000dec2adcc1
Driver state = ONLINE
Hardware Path is = 1/0/14/1/0/4/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.08 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Mar 27 2007,15:29:17
/usr/bin/olrad -r slot_ID
/usr/bin/olrad -r 0-0-0-3

[shmuel01]/root # olrad -q
Driver(s)
Capable
Slot Path Bus Max Spd Pwr Occu Susp OLAR OLD Max Mode
Num Spd Mode
0-0-0-1 0/0/8/1 140 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-2 0/0/10/1 169 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-3 0/0/12/1 198 266 266 Off Yes Yes Yes N/A PCI-X PCI-X
0-0-0-4 0/0/14/1 227 266 266 On Yes No Yes N/A PCI-X PCI-X
0-0-0-5 0/0/6/1 112 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-6 0/0/4/1 84 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-7 0/0/2/1 56 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-0-8 0/0/1/1 28 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-1 1/0/8/1 396 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-2 1/0/10/1 425 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-3 1/0/12/1 454 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-1-4 1/0/14/1 483 266 133 On Yes No Yes N/A PCI-X PCI-X
0-0-1-5 1/0/6/1 368 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-6 1/0/4/1 340 266 266 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-7 1/0/2/1 312 133 133 Off No N/A N/A N/A PCI-X PCI-X
0-0-1-8 1/0/1/1 284 133 133 Off No N/A N/A N/A PCI-X PCI-X

Cards to be replaced are flashing yellow.

Replace card now.

/usr/bin/olrad -A 0-0-0-3

/usr/bin/olrad -R 0-0-0-3

 

Tags: , , , , ,

07 Jun 12 awk trick of the day(month?) parsing bdf output. awk with if else logic

Ever try and do system reporting based on bdf?

Annoying as all heck that sometimes the output is two line and sometimes one? I was forced to solve that problem today.

 

if [ “$OS” = “HP-UX” ]
then
   dcmd=bdf
fi

arraypointer=0

exec $dcmd | egrep -v “%used|/dev/deviceFileSystem” | awk ‘{lvn=$1;v=$2;if (v==””) {getline;cap=$1;ucap=$2;acap=$3;puse=$4;mp=$5;printf “%s %s %s %s %s %s\n”, lvn,cap,ucap,acap,puse,mp} else {printf “%s %s %s %s %s %s\n”, $1,$2,$3,$4,$5,$6} }’ | while read -r  p1 p2 p3 p4 p5 p6
do

   #### calculations

done

Typical bdf output:

/dev/vg00/lvol9    4096000 3140019  896285   78% /var/adm/crash
/dev/vg_stgb1/lvol1
1572765696 1382813225 178080447   89% /steven05stgb

More when the script is done

Tags: , , , ,

sidebarbottom
sidebartop
sidebarbottom
WhatsApp chat