Several diagnostic routines are available from the Forth Monitor. 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. User-installed devices can be tested if their firmware includes a self-test feature.
The following table lists diagnostic test commands. Remember: device-specifier refers to either a device path name or a device alias.
Table 2-4 Diagnostic Test Commands
Command |
Description |
---|---|
probe-scsi |
Identify devices attached to the built-in SCSI bus. |
probe-scsi-all [device-path] |
Perform probe-scsi on all SCSI buses installed in the system below the specified device tree node. (If device-path is absent, the root node is used.) |
test device-specifier |
Execute the specified device's self-test method. For example: test floppy - test the floppy drive, if installed test /memory - test number of megabytes specified in the selftest-#megs NVRAM parameter; or test all of memory if diag-switch? is true test net - test the network connection |
test-all [device-specifier] |
Test all devices (that have a built-in self-test method) below the specified device tree node. (If device-specifier is absent, the root node is used.) |
watch-clock |
Test the clock function. |
watch-net |
Monitor the network connection. |
To check the built-in 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
To test all SCSI buses installed in the system, type:
ok probe-scsi-all /iommu@f,e0000000/sbus@f,e0001000/esp@3,200000 Target 6 Unit 0 Disk Removable Read Only device SONY CD-ROM CDU-8012 3.1d /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000 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 response depends on the devices on the SCSI bus.
To test a single installed device, type:
ok test device-specifier
This executes the device method (named selftest) of the specified device node. Response depends on the self-test of the device node.
To test a group of installed devices, type:
ok test-all
All devices below the root node of the device tree are tested. The response depends on the devices that have a self-test method. If you use the device-specifier option with the test-all command, all devices below the specified device tree node are tested.
The diskette drive test determines whether the diskette drive is functioning properly. A formatted, high-density (HD) disk must be in the diskette drive for this test to be successful.
To test the diskette drive, type:
ok test floppy Testing floppy disk system. A formatted disk should be in the drive. Test succeeded. ok
If the test fails, you see an error message.
ok eject-floppy ok
If this command fails, you can physically eject the diskette by inserting a straightened paper clip into the little hole near the diskette slot.
When you use the memory testing routine, the system tests the number of megabytes of memory specified in the NVRAM parameter selftest-#megs. (See Chapter 3, Setting Configuration Parameters, for information about NVRAM parameters.) One megabyte of memory is tested as the default. If either the hardware diagnostic switch (if the system has one) or the NVRAM parameter diag-switch? is enabled, all the memory is tested.
ok test /memory Testing 16 megs of memory at addr 4000000 11 ok
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.
There will be a delay while the PROM tests the system. If the system fails this test, you see an error message.
To test the on-board Ethernet 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.
The external loopback portion of this test will fail unless the system is connected to Ethernet.
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.
To monitor the 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 2.x systems include this test word.