Существует возможность отключить аппаратные устойства непосредственно в OBP с помощью 'asr'-команд. Если у вас "production critical" сервер, и он не загружается из-за сбоя какого-либо компонента, вы можете отключить данный компонент в OBP и добиться загрузки машины для минимизации простоя.
Rebooting with command: boot
Boot device: /pci@1e,600000/pci@0/pci@2/scsi@0/disk@0,0 File and args: -rsv
Loading ufs-file-system package 1.4 04 Aug 1995 13:02:54.
FCode UFS Reader 1.12 00/07/17 15:48:16.
Loading: /platform/SUNW,Sun-Fire-V445/ufsboot
Loading: /platform/sun4u/ufsboot
ERROR: Last Trap: Corrected ECC Error
{3} ok
Вот и ошибка - у нас проблема с памятью.
Слово "sifting" в команде OBP будет искать все команды, которые содержат специфическую последовательность. Так, найдем все команды, которые содержат 'asr':
{3} ok sifting asr
In vocabulary srassembler
(f001d858) rdasr (f001d550) wrasr (f001d53c) rdasr
In vocabulary forth
(f008ee08) asr-list-keys (f008ed2c) asr-enable
(f008ebd8) asr-disable (f008d22c) .asr (f008cb50) asr-clear
(f0052240) asr-policies
Итак, главные команды здесь 'asr-list-keys' (покажет, что мы можем отключить), '.asr' (покажет, что у нас уже отключено), 'asr-enable', 'asr-disable', и 'asr-clear'.
{3} ok asr-list-keys
key = net2&3 /pci@1f,700000/pci@0/pci@2/pci@0/@4
key = net0&1 /pci@1e,600000/pci@0/pci@1/pci@0/@4
key = ide /pci@1f,700000/pci@0/pci@1/pci@0/@1f
key = usb /pci@1f,700000/pci@0/pci@1/pci@0/@1c
key = pci7 /pci@1f,700000/pci@0/@9
key = pci6 /pci@1e,600000/pci@0/@9
key = pci5 /pci@1f,700000/pci@0/pci@2/pci@0/@8
key = pci4 /pci@1f,700000/pci@0/pci@2/pci@0/@8
key = pci3 /pci@1e,600000/pci@0/pci@1/pci@0/@8
key = pci2 /pci@1e,600000/pci@0/pci@1/pci@0/@8
key = pci1 /pci@1f,700000/pci@0/@8
key = pci0 /pci@1e,600000/pci@0/@8
key = cpu3-bank3
key = cpu3-bank2
key = cpu3-bank1
key = cpu3-bank0
key = cpu2-bank3
key = cpu2-bank2
key = cpu2-bank1
key = cpu2-bank0
key = cpu1-bank3
key = cpu1-bank2
key = cpu1-bank1
key = cpu1-bank0
key = cpu0-bank3
key = cpu0-bank2
key = cpu0-bank1
key = cpu0-bank0
Так как у нас ECC-ошибка, мы знаем, что проблема с одним из вышеупомянутых банков памяти. Отключая банки на каждом процессоре по одному за раз, методом проб и ошибок мы можем найти неработающую память.
{3} ok .asr
Нет отключенных девайсов с помощью ASR.
Отключение cpu0-2 продолжает показывать ошибку памяти EEC. Отключим CPU3.
{3} ok asr-disable cpu3-bank0
{3} ok asr-disable cpu3-bank1
{3} ok asr-disable cpu3-bank2
{3} ok asr-disable cpu3-bank3
{3} ok .asr
cpu3-bank3 Disabled by USER
No reason given
cpu3-bank2 Disabled by USER
No reason given
cpu3-bank1 Disabled by USER
No reason given
cpu3-bank0 Disabled by USER
No reason given
Запустим сервер:
Sun Fire V445, No Keyboard
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.22.19, 24576 MB memory installed, Serial xxxxxxxxx
Ethernet address 0:14:4f:xx:xx:xx, Host ID: xxxxxxx
NOTICE: CPU 3 has 8192/8192 MB of memory disabled
ERROR: The following devices are disabled:
cpu3-bank3
cpu3-bank2
cpu3-bank1
cpu3-bank0
Спасибо за информацию!
Rebooting with command: boot -rsv
Boot device: /pci@1e,600000/pci@0/pci@2/scsi@0/disk@0,0 File and args: -rsv
Loading ufs-file-system package 1.4 04 Aug 1995 13:02:54.
FCode UFS Reader 1.12 00/07/17 15:48:16.
Loading: /platform/SUNW,Sun-Fire-V445/ufsboot
Loading: /platform/sun4u/ufsboot
module /platform/sun4u/kernel/sparcv9/unix: text at [0x1000000, 0x107a767]
module misc/sparcv9/krtld: text at [0x107a768, 0x10933af] data at 0×184c760
module /platform/sun4u/kernel/sparcv9/genunix: text at [0x10933b0, 0x11f0f17]
module /platform/SUNW,Sun-Fire-V445/kernel/misc/sparcv9/platmod: text at [0x11f0f18, 0x11f1817]
module /platform/sun4u/kernel/cpu/sparcv9/SUNW,UltraSPARC-IIIi: text at [0x11f1880, 0x120278f]
SunOS Release 5.10 Version Generic_118833-33 64-bit
Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Ethernet address = 0:14:4f:2b:ea:aa
mem = 25165824K (0×600000000)
avail mem = 25226371072
root nexus = Sun Fire V445
Вуаля! Наш сервер возвращается к жизни, правда без 8 гигабайтов памяти. Это скажется на производительности, так как у машины теперь меньше системных ресурсов, но лучше кое-что чем ничего, верно?
Вольный перевод с prefetch.net