m376diag(1M) — ADMINISTRATOR COMMANDS
NAME
m376diag − MVME376 LAN interface diagnostic test utility
SYNOPSIS
m376diag [-?BG] [{-c cntlr_num | -d dev_name}]
-t test_name [test_options] ...
where test_name is one of:
{ all | eloop | iloop | memrdwr | memwalk }
where test_options for eloop and iloop are:
[[-i iterations] [-p packets]]
DESCRIPTION
The m376diag command is a diagnostic test utility for the MVME376 Local Area Network interface. The user level command interacts with the m376 STREAMS driver via defined ioctl(2) commands (I/O controls). The device driver then performs the requested diagnostic test on the hardware that it controls, returning the result to the utility. The command then gives an indication of the individual test result, which is either "PASSED" or "FAILED". It should be noted that the diagnostic tests run by this utility are of a non-destructive nature. That is to say they can be run on a loaded system, with the interface up, and leave the system operational when the tests are completed. However, the services that the interface provide are temporarily taken off-line for the duration of the tests. This can impact the system, possibly introducing side affects at higher levels, if the interval of the test is suffuciently long. A knowledgable system administrator is the intended user of this utility. A practical usage is for on-line system analysis.
OPTIONS
The user may issue the following options on the m376diag command line:
-? Help flag.
This flag will display a brief usage message to the user, yet offering enough information for the advanced user to run the command properly.
-B Boot-time diagnostics flag.
Used when the m376diag command is being executed for boot-time diagnostic tests (see /etc/init.d/m376btd). The -B flag will put the utility into boot-time mode, which will cause the utility to pass the result of all tests run back down to the m376 driver. The result is then available via the various status gathering mechanisms for device drivers (see drv_getparm(1M,D3DK), frustat(1M)).
-G GOLD mode flag.
Used when the m376diag command is executed from within the GOLD package (see gold(1M)). The -G flag will put the utility into GOLD mode, which will echo the command line arguments on stdout.
-c cntlr_num
Specify the controller number of the m376 device on which the diagnostic tests are to be run.
(default: 0)
-d dev_name
Specify the device name (path) of the m376 device on which the diagnostic tests are to be run.
(default: /dev/m376_c0) NOTE: The -c and -d options are mutually exclusive; more specifically they provide the same information using a slightly different syntax.
-t { all | memrdwr | memwalk }
Specify a test to execute, without optional parameters.
-t { eloop | iloop } [[-i iterations] [-p packets]]
Specify a test to execute, with optional parameters for the loopback tests.
-i iterations
Specify the number of iterations for a loopback test.
(default: 1) NOTE: If the value of iterations is 0 (zero), the test will loop "forever" or until the test is interrupted by the user.
-p packets
Specify the number of packets to send per iteration for a loopback test.
(default: 100)
Test Names
The test_name keywords and definitions are as follows:
all The all test simply runs all of the "real" tests defined below in sequential order.
eloop The eloop test will run an external loopback test on the LANCE chip, which is on the MVME376 board. The utility simply goes into a loop for the specified number of iterations. Each time through this loop, the utility will attempt to send the specified number of data packets. The mechanism to do this is a special ioctl(2) command to the driver requesting loopback in external mode. The driver imposes a limit on the number of packets that may be sent per request, which is the number of buffers in the transmit ring. The utility will automatically throttle the number in each request so as to not exceed any driver limit. Because of this, the utility will loop once more to send as many commands to the driver as are needed to achieve the total packet count. This particular method also allows the user to break out of a test. (If the utility did not return to user context at a regular interval, the test would not be interruptable.) If this "throttle" is imposed, the user will be made aware by the utility writing a decimal point to stdout each time an ioctl completes. When the loopback test is completed, either by finishing all iterations or by breaking out, the utility will display a message with the result of the test and exit. A hardware level explaination of the eloop test is in order here. The external loopback mode of the LANCE chip will test the transmit path of the hardware all the way to the medium (through serial interface unit). The receiver detects data on the medium and so excerises the receive logic as well. The interconnection of the transmitter and receiver takes place with a regular connection to a network medium.
iloop The iloop test will run an internal loopback test on the LANCE chip, which is on the MVME376 board. The utility follows the same steps as in the eloop test described above, but in this case uses an internal mode in the ioctl instead. A hardware level explaination of the iloop test is in order here. The internal loopback mode of the LANCE chip will test the transmit path of the hardware right up to the point of giving the data to the serial interface unit (which puts the bits on the wire, or medium). It is at this point the packet is turned around and given directly to the receive logic immediately. So the receive path is also tested, sans the actual reading of data by the serial interface unit.
memrdwr The memrdwr test will run a memory test that performs read/write access verification for the MVME376’s local memory region. The memory access will be done for all of the byte, short word and long word sizes. For each element in the region of the given size, a write of an arbitrary value is done followed directly by a read. The value that is read is compared to the original. The test will fail if, at any point during this procedure, the preceeding two values do not compare.
memwalk The memwalk test will run a memory test that performs a bit-walk algorithm for the MVME376’s local memory region. This test will also perform a write, followed by a read, to each location in the memory area. The pattern in this case will change several times for each location. That is a single bit is walked (shifted) through each possible bit in a given byte. So, this test will in fact test that each and every bit in memory is writable and reliably readable. Again this test will fail if the value read does not match the pattern that was written.
EXAMPLES
The m376diag utility is simple and straight forward to use. To illustrate this fact, the following few examples are provided:
m376diag -d /dev/m376_c0 -t all -B
The above command invokes the m376diag utility using the provided device on which to run the tests and it requests that all of the tests be executed. The result of this command is seeing each test being run in a sequential order. The -B option was also provided, which implies the result is passed down to the m376 STREAMS driver. (This command is indeed the one run for boot-time diagnostics.)
m376diag -c0 -t memrdwr -t memwalk
The above command invokes the m376diag utility to run tests on controller 0 (zero, which happens to be the default). In this case, we request that the two memory tests be run in sequence during this invokation.
m376diag -t iloop -i0 -p64
The above command invokes the m376diag utility to run tests on the default device (/dev/m376_c0). In this case, we request that the iloop test be run by itself. There are also test options provided, which modify how the iloop in particular will be executed. The -i option, with a 0 (zero) parameter, tells the utility to loop "forever". However, the loopback tests are always interruptable at the user level. The -p option tells the utility how many packets to send per iteration of the test.
m376diag -t eloop -i32
The above command invokes the m376diag utility to run tests on the default device as well. In this case, we request that the eloop test be run by itself. A single test option is provided. The -i option, with a parameter of 32, tells the utility to execute the external loopback test 32 times. The default number of packets are sent on each iteration, as the -p option was not provided in this example.
FILES
/etc/init.d/m376btd,
/etc/rc2.d/S68m376btd
SEE ALSO
drv_getparm(1M), frustat(1M), gold(1M), m376cntl(1M),
m376(7)
DIAGNOSTICS
If m376diag terminates normally, it displays a message that indicates whether the requested test(s) passed or failed, and then exits with a 0 status. If m376diag does not terminate normally, it displays an error message to stderr and returns a non-zero exit status to indicate an error.
— MVME376 Diagnostic Utility