Search This Blog

Showing posts with label OK prompt. Show all posts
Showing posts with label OK prompt. Show all posts

Tuesday, 21 December 2010

Network troubleshooting from OBP (OK prompt)

For listing all the available network interfaces on the system, use below command from ok prompt.
{0} ok watch-net
Timed out waiting for Autonegotiation to complete
Check cable and try again
Link Down
{0} ok watch-net-all
/pci@3,700000/network@0,1 ----------------------> path to interface
Timed out waiting for Autonegotation to complete
Check cable and try again
----------------------> No cable is connected/active
Link Down
Timed out waiting for Autonegotation to complete
Check cable and try again
Link Down
Timed out waiting for Autonegotation to complete
Check cable and try again
Link Down
Timed out waiting for Autonegotation to complete
Check cable and try again
Link Down

/pci@3,700000/network@0   -------------------> path to interface

1000 Mbps full duplex  Link up
Looking for Ethernet Packets.
'.' is a Good Packet.  'X' is a Bad Packet.
Type any key to stop.
40 42 42 40 42 42 40 40 42 42 40 1ed 42 42 40 42 40 42 40 42 42 40 42 40 42 40 42 42 40 42 40 42 40 42 42 40 40 42 42 40 40 42 42 40 42 42 40 40 42 42 40 42 42 40 42 40 42 40 42 42 40 42 40 42 40 42 42 40
/pci@2,600000/network@0,1
1000 Mbps full duplex  Link up
Looking for Ethernet Packets.
'.' is a Good Packet.  'X' is a Bad Packet.
Type any key to stop.
40 44 44 44 40 7a 40 f7 40 40 40 1ed 40 40
/pci@2,600000/network@0
1000 Mbps full duplex  Link up
Looking for Ethernet Packets.
'.' is a Good Packet.  'X' is a Bad Packet.
Type any key to stop.
42 40 42 42 40 42 40 42
/pci@0,600000/pci@0/pci@8/pci@0/network@2,1
Timed out waiting for Autonegotiation to complete
Check cable and try again
Link Down

/pci@0,600000/pci@0/pci@8/pci@0/network@2
Timed out waiting for Autonegotiation to complete
Check cable and try again
Link Down

For getting the details about each interfaces, go to the corresponding path using cd comammnd, and run the properties as below
{0} ok cd /pci@3,700000/network@0
{0} ok .properties
mac-address              00 15 17 3b xx xx
link-clock               auto
duplex                   auto
speed                    auto
status                   okay
assigned-addresses       82020010 00000000 00100000 00000000 00020000
                         82020014 00000000 00120000 00000000 00020000
                         81020018 00000000 00000300 00000000 00000020
                         82020030 00000000 00140000 00000000 00020000
phy-type                 mif
board-model              501-7289
version                  Sun PCI-E 1G Ethernet UTP Adapter FCode 1.10 06/11/02
model                    SUNW,pcie-northstar
d-fru-len                00000800
d-fru-off                00006800
d-fru-dev                eeprom
s-fru-len                00000800
s-fru-off                00006000
s-fru-dev                eeprom
compatible               pciex8086,105e.108e.125e.6
                         pciex8086,105e.108e.125e
                         pciex108e,125e
                         pciex8086,105e.6
                         pciex8086,105e
                         pciexclass,020000
                         pciexclass,0200
reg                      00020000 00000000 00000000 00000000 00000000
                         02020010 00000000 00000000 00000000 00020000
                         02020030 00000000 00000000 00000000 00020000
max-frame-size           00010000
address-bits             00000030
device_type              network
name                     network
local-mac-address        00 15 17 3b xx xx
--> MAC Address for /pci@3,700000/network@0
fcode-rom-offset         0000e000
interrupts               00000001
cache-line-size          00000010
class-code               00020000
subsystem-id             0000125e
subsystem-vendor-id      0000108e
revision-id              00000006
device-id                0000105e
vendor-id                00008086
{0} ok cd /pci@2,600000/network@0,1
{0} ok .properties
status                   okay
assigned-addresses       82020110 00000000 00160000 00000000 00020000
                         82020114 00000000 00180000 00000000 00020000
                         81020118 00000000 00000320 00000000 00000020
                         82020130 00000000 001a0000 00000000 00020000
phy-type                 mif
board-model              501-7289
version                  Sun PCI-E 1G Ethernet UTP Adapter FCode 1.10 06/11/02
model                    SUNW,pcie-northstar
d-fru-len                00000800
d-fru-off                00006800
d-fru-dev                eeprom
s-fru-len                00000800
s-fru-off                00006000
s-fru-dev                eeprom
compatible               pciex8086,105e.108e.125e.6
                         pciex8086,105e.108e.125e
                         pciex108e,125e
                         pciex8086,105e.6
                         pciex8086,105e
                         pciexclass,020000
                         pciexclass,0200
reg                      00020100 00000000 00000000 00000000 00000000
                         02020110 00000000 00000000 00000000 00020000
                         02020130 00000000 00000000 00000000 00020000
max-frame-size           00010000
address-bits             00000030
device_type              network
name                     network
local-mac-address        00 15 17 3d xx xx
--> MAC Address for /pci@2,600000/network@0,1
fcode-rom-offset         0000e000
interrupts               00000002
cache-line-size          00000010
class-code               00020000
subsystem-id             0000125e
subsystem-vendor-id      0000108e
revision-id              00000006
device-id                0000105e
vendor-id                00008086
{0} ok cd /pci@2,600000/network@0
{0} ok .properties
status                   okay
assigned-addresses       82020010 00000000 00100000 00000000 00020000
                         82020014 00000000 00120000 00000000 00020000
                         81020018 00000000 00000300 00000000 00000020
                         82020030 00000000 00140000 00000000 00020000
phy-type                 mif
board-model              501-7289
version                  Sun PCI-E 1G Ethernet UTP Adapter FCode 1.10 06/11/02
model                    SUNW,pcie-northstar
d-fru-len                00000800
d-fru-off                00006800
d-fru-dev                eeprom
s-fru-len                00000800
s-fru-off                00006000
s-fru-dev                eeprom
compatible               pciex8086,105e.108e.125e.6
                         pciex8086,105e.108e.125e
                         pciex108e,125e
                         pciex8086,105e.6
                         pciex8086,105e
                         pciexclass,020000
                         pciexclass,0200
reg                      00020000 00000000 00000000 00000000 00000000
                         02020010 00000000 00000000 00000000 00020000
                         02020030 00000000 00000000 00000000 00020000
max-frame-size           00010000
address-bits             00000030
device_type              network
name                     network
local-mac-address        00 15 17 3d xx xx
--> MAC Address for  /pci@2,600000/network@0
fcode-rom-offset         0000e000
interrupts               00000001
cache-line-size          00000010
class-code               00020000
subsystem-id             0000125e
subsystem-vendor-id      0000108e
revision-id              00000006
device-id                0000105e
vendor-id                0000808

Saturday, 6 March 2010

Creating disk alias from OS for booting from mirror disk.

1. Finding the name for / filesystem. Here its is d10


root@test # df -h /
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         39G   4.1G    35G    11%    /




2. Findout the disk inclueded in d10 (root and root mirror)


root@test # metastat  d10
d10: Mirror
    Submirror 0: d11
      State: Okay
    Submirror 1: d12
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 83890944 blocks (40 GB)


d11: Submirror of d10
    State: Okay
    Size: 83890944 blocks (40 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s0          0     No            Okay   Yes




d12: Submirror of d10
    State: Okay
    Size: 83890944 blocks (40 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s0          0     No            Okay   Yes




Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@n5000c5001780b3bb
c1t0d0   Yes    id1,sd@n5000c50017807697




3. Find the H/W path to two of this disks


root@test # ls -ltr /dev/dsk/c0t0d0s0 /dev/dsk/c1t0d0s0
lrwxrwxrwx   1 root     root          60 Feb 15 15:51 /dev/dsk/c0t0d0s0 -> ../../devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0:a
lrwxrwxrwx   1 root     root          61 Feb 15 15:51 /dev/dsk/c1t0d0s0 -> ../../devices/pci@10,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0:a


4. Editing NVRAM parameters using eeprom command. Replace the sd with disk in about output




root@test # eeprom "nvramrc=devalias rootdisk /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0 rootmirror /pci@10,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0"


5. Setting the boot sequence from the newly defined aliases (rootdisk and rootmirror)


root@test # eeprom boot-device="rootdisk rootmirror net"


6. Verifying changes.


root@test # eeprom |grep rootmirror
boot-device=rootdisk rootmirror net
nvramrc=devalias rootdisk /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0 rootmirror /pci@10,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0