Several diagnostic routines are available from the User Interface. These on-board tests let you check devices such as the network controller, the floppy disk system, memory, installed SBus cards and SCSI devices, and the system clock.
The value returned by diagnostic-mode? controls:
The selection of the device and file that are used by the boot and load commands (if the device and file are not explicitly specified as arguments to those commands).
The extent of the diagnostics performed during power-on self-test, and the (implementation dependent) number of diagnostic messages produced.
OpenBoot will be in diagnostic mode and the diagnostic-mode? command will return true if at least one of the following conditions is met:
The configuration variable diag-switch? is set to true.
The machine's diagnostic switch (if any) is "on".
Another system-dependent indicator requests extensive diagnostics.
When OpenBoot is in the Diagnostic mode, the value of diag-device is used as the default boot device and the value of diag-file is used as the default boot arguments for the boot command.
When OpenBoot is not in the Diagnostic mode, the value of boot-device is used as the default boot device and the value of boot-file is used as the default boot arguments for the boot command.
Table 2-2 lists diagnostic test commands. Not all of these tests are available in all OpenBoot implementations.
Table 2-2 Diagnostic Test Commands
Command |
Description |
---|---|
probe-scsi |
Identify devices attached to a SCSI bus. |
test device-specifier |
Execute the specified device's selftest method. For example: test net - test the network connection |
watch-clock |
Test a clock function. |
watch-net |
Monitor a network connection. |
To check a SCSI bus for connected devices, type:
ok probe-scsi Target 1 Unit 0 Disk SEAGATE ST1480 SUN04246266 Copyright (C) 1991 Seagate All rights reserved Target 3 Unit 0 Disk SEAGATE ST1480 SUN04245826 Copyright (C) 1991 Seagate All rights reserved ok
The actual response depends on the devices on the SCSI bus.
To test a single installed device, type:
ok test device-specifier
In general, if no message is displayed, the test succeeded.
Many devices require the system's diag-switch? parameter to be true in order to run this test.
The diskette drive test determines whether or not the diskette drive is functioning properly. For some implementations, a formatted, high-density (HD) disk must be in the diskette drive for this test to succeed.
To test the diskette drive, type:
ok test floppy Testing floppy disk system. A formatted disk should be in the drive. Test succeeded. ok
Not all OpenBoot systems include this test word.
To eject the diskette from the diskette drive of a system capable of software-controlled ejection, type:
ok eject-floppy ok
ok test /memory Testing 16 megs of memory at addr 4000000 11 ok
Not all OpenBoot systems include this test word.
In the preceding example, the first number (4000000) is the base address of the testing, and the following number (11) is the number of megabytes to go.
To test the clock function, type:
ok watch-clock Watching the 'seconds' register of the real time clock chip. It should be ticking once a second. Type any key to stop. 1 ok
The system responds by incrementing a number once a second. Press any key to stop the test.
Not all OpenBoot systems include this test word.
To test the primary network controller, type:
ok test net Internal Loopback test - (result) External Loopback test - (result) ok
The system responds with a message indicating the result of the test.
Depending on the particular network controller and the type of network to which your system is attached, various levels of testing are possible. Some such tests may require that the network interface be connected to the network.
To monitor a network connection, type:
ok watch-net Internal Loopback test - succeeded External Loopback test - succeeded Looking for Ethernet packets. '.' is a good packet. 'X' is a bad packet. Type any key to stop ....................X.....X............... ok
The system monitors network traffic, displaying "." each time it receives an error-free packet and "X" each time it receives a packet with an error that can be detected by the network hardware interface.
Not all OpenBoot systems include this test word.