SunDiag User's Guide
  Search only this book
Download this book in PDF

The SunDiag TTY Interface

3

This chapter describes how to set testing parameters using the SunDiag TTY interface. This interface makes it possible to run the SunDiag system exerciser from a terminal attached to a TTY (or serial) port. This interface is also used by default when you remotely log into a system.
To use this interface, a terminal can be attached to a serial port of the system under test or connected with a modem. All the options available in the OPEN LOOK version of the SunDiag interface have command equivalents in TTY mode. These commands are described in more detail in Chapter 2, "The SunDiag OPEN LOOK Interface."

Note - If you are remotely logged into a Sun system, you may still run the SunDiag software with the OpenWindows interface. Refer to Section 1.7, "Running the SunDiag Exerciser on a Remote System," on page 1-15 for more information.

3.1 Using the SunDiag Program from a Terminal

The workstation under test must have the SunDiag software already loaded. A terminal must be remotely logged into the system, or attached to a serial port.
Starting SunDiag from a TTY port (terminal) is almost identical to starting it in OPEN LOOK. Type in the command line described in Section 1.4, "Starting the SunDiag Exerciser." The program senses that you are logging in from a terminal interface and automatically brings up the TTY version of the control panel.

Note - You can run the SunDiag software in TTY mode from a monitor. However, some framebuffer tests will fail. See Section , "TTY Mode and Framebuffer Window Locking," on page 1-5 for more information.

3.1.1 Starting TTY Mode from a Shell Tool

To run the SunDiag software in TTY mode from an OpenWindows shell tool window, become superuser, and type:

  # /opt/SUNWdiag/bin/sundiag -t  

A brief initialization message is displayed, followed by the main display, as shown in Figure 3-1.
Multiprocessing systems If your system under test is a multiprocessing system, the SunDiag program displays the number of processors at the top of each TTY screen after the hostname.

3.1.2 Executing Commands in TTY Mode -- Use the Abbreviations

You can execute commands, set options, or change screens by typing at the Command: prompt at the bottom of each TTY screen. Each of the TTY commands has a one-letter abbreviation shown in parenthesis. You can type the full command name, but you may find that it's easier to type the abbreviation.

3.1.3 Navigating the Screens

You can view other screens and menus using the commands displayed at the top of each screen. To go back to a previous screen, type d for done at the command prompt.

Graphic

Figure 3-1

3.1.4 Main Display Commands

This section describes what to expect when you enter the commands shown in brackets at the top of the TTY main display screen. The commands are described in the order they appear on the screen, from left to right.

Note - Options are typed at the Command prompt at the bottom of the screen. Press Return after you type any of these commands.

[START]
Typing start or s begins testing. After you have selected the tests and entered the system level and test level options of your choice, type start to begin testing. The Status window at the top of the screen will display "testing."
[OPTIONS]
Type options or o to display a menu of global system level options that affect every test. See Section 3.2, "Options Menu," on page 3-8 for an example of the display and a description of each option.
[STATUS]
Type status or a to display information about the tests in progress.
[SCHEDULE]
Type schedule or m to display the scheduling options (See "How to Use SunDiag's Schedule Feature" on page 2-17.)
[OPTFILES]
Type optfiles or f to display global options you can save (see "Option Files Window Button" on page 2-22.)
[STOP]
Type stop or t to stop all testing. While the SunDiag exerciser is stopping the tests in progress, the top right of the screen displays:

  System Status: stopping  

When all tests are stopped, the system status is idle.
To stop an individual test, type the test name:

  Command: mem  
  Message:  

If a test has already stopped, type the test name to restart it.
[QUIT]
Type quit or q to exit the SunDiag TTY interface. If you have remotely logged in, change directories to your remote entry point and exit the remote log-in.
[RESET]
Type reset or r to reset the passes to zero. This also resets the error count for each test, the system passes, and the total errors. This option is valid only while tests are stopped.
[SUSPEND]
Type suspend or p to suspend all testing. When you type this command, the system status window at the top of the screen displays "suspended."
[RESUME]
Type resume or u to resume testing after you've suspended testing. When you type this command, the system status window displays "testing."
[EEPROM]
The SunDiag software and the Solaris environment only support SPARC architectures. Typing eeprom or e will report the following error:
The EEPROM feature is not available!

[LOGFILES]
Type logfiles or l to display the operations you can perform on the log files stored in the /var/adm/sundiaglog directory. See "The Log Files Window Button" in Chapter 2 for more details.
[HELP]
This option is not available at this time.
[NEXT]
Type next or n to display the next screen of information when a second screen is needed. When you reach the end of the display, type n again to page back to the beginning, or type a new command from those in brackets at the top of the screen.
[INTERVENTION]
When you type intervention or i in the control panel display, the [INTERVENTION]: text item toggles from Disable to Enable or from Enable to Disable. When you enable intervention mode, you can now enable tests that require special loopback connectors and scratch media. If you try to enable a test that requires intervention mode and it is not enabled, a message at the bottom of the screen reminds you to enable it.
[TESTS]
Type tests default or c d to run all default tests when you type start. A -> symbol will appear before each default test. All default tests run when you type start.
If you type tests none or c n, no tests are enabled, and the -> symbols disappear from the test names.
If you type tests all or c a and intervention is disabled, all tests that do not require user intervention are enabled, and an arrow is displayed in front of each test. If intervention mode was enabled before you entered tests all, all tests displayed are enabled.

3.1.5 Scrolling

With the next command you can view a display that is too long to fit on one terminal screen. When you reach the end of the display, the next command takes you back to the beginning.
When you type the first character of a command, the screen clears any messages at the bottom of the screen.

3.1.6 Redrawing the Screen

To redraw the screen, type Control-L.
When tests are actively running, an asterisk is displayed before the test name, as in the OPEN LOOK mode.
Some commands bring up a secondary display that replaces the existing one. You can type d for done from most displays and return to the control panel display.
The SunDiag TTY interface attempts to simulate all the windows you see when you use the OPEN LOOK interface. In some cases, features are combined for your convenience. For example, the status panel shows whether a test is in progress or has failed. A secondary display either shows all available control panel commands besides those available from the current level, or provides a done command that returns you to the original display.

Note - When you choose to Display a log file, the SunDiag TTY interface uses vi to display the file. You must then use the vi command :q to exit from that display.

3.1.7 Running the SunDiag Exerciser in the Background

To run the SunDiag exerciser with the TTY interface in the background, press Control-X. This frees your screen for other functions. You can also log out of the remote system after placing the program in background mode. Customer Support personnel often run the SunDiag software in the background to free up the system for other diagnostic applications.
To bring the SunDiag exerciser back into view, log back into the remote system, if necessary, and type /opt/SUNWdiag/bin/sundiagup. The SunDiag display will reappear.

3.1.8 Enabling and Disabling Individual Tests

If you do not want to run the preselected default tests or all the tests, you can enable or disable any test by entering its name as shown in parentheses. For example, if there is no -> symbol in front of the display

  (mem) Physical                 [OPTION]  

you can type mem to enable the physical memory test. An arrow is displayed before the test name. Typing mem again disables the test and removes the arrow. Tests that do not have an arrow in front of the test name are not run when you type start. As mentioned earlier, you can also type a test name to stop an individual test in progress, or start a new test.

3.2 Options Menu

Typing options or o in the control panel displays the system option menu as shown in Figure 3-2.

Graphic

Figure 3-2

Commands can be entered as complete words or with the abbreviations displayed in parentheses after each command word.
These commands correspond to the Set Options menu items described in detail in Chapter 2, "The SunDiag OPEN LOOK Interface."
When you type default or f, the preselected default system options are enabled. The display should display enabled after each default option.
To exit from this display, type done or d.
The corefile (o), single pass (s), quick test (q), verbose (v), auto start (a) and run on error (r) options toggle from disable to enable when you type their commands. For example, if the display shows:

    [COREFILE] disable  

and you type corefile or o, the option of having a core dump saved in a file is enabled, and the display changes to Enable. When you type the command again, the display changes back to Disable, and the tests attempt to capture the signals that cause core dumps. Messages will be displayed instead of a core file.
To change the maximum number of errors the SunDiag exerciser allows before stopping tests, type:

  maxerrors number  

or:

  y number  

When you press Return, the number you have typed is displayed after maxerrors.
To specify the maximum number of tests you want to execute concurrently, type:

  concurrent number  
              or  
  c number  

To specify where you want your log files to be printed, type the printer name as it appears when you type lpstat -v. For example:

  printer lp1  

You can also type:

  p printer_name  


Note - You cannot print a screendump in TTY mode.

3.3 System Status Display

Type status or a in the control panel to display the screen shown in Figure 3-3.

Graphic

Figure 3-3

Test messages display in the message line at the bottom of the screen.

3.3.1 Status View Equivalents

TTY mode includes complementary commands for the Status View button. See Section 2.1.1, "System Status Panel," on page 2-3 and Section 2.2.4.4, "Status View Button," on page 2-24 for more information on the system status display. The TTY commands change the behavior of the System Status Display in the following ways:
[NEXT]
Typing next or n scrolls the system status display to the next page, if applicable.
[PREV]
Typing prev or p scrolls the system status display to the next page, if applicable.
[GOTO]
Typing goto or g and then typing a page number scrolls the display to the specified page. For example, typing g 3 would scroll the display to page 3.
[ERRORS]
Typing errors or e restricts the system status display to show only those tests which have failed.
[ALL]
Typing all or a returns the display to the default: all tests.

3.4 Option Files Menu

Type optfiles or f from the control panel to display the Option File menu.

Graphic

Figure 3-4

The Option Files menu provides the opportunity to load and store the global system options and the individual test options you have selected. The default option file is .sundiag. You can create option files with different names, and use the -o option when you invoke the SunDiag exerciser to use the options specified in the named file. Any command you enter applies to the latest file that was named.

  [NAME]  

For example, if you want the selected options to be stored in the .sundiag file, listed after [NAME], type store or s. If you want to remove the .sundiag file, type remove or r. If you want to use the options that are stored in the named file the next time you run SunDiag tests, type load or l.
If you want to create a new option file, type:

  name newfilename  

The name you enter is displayed after [NAME]. To save the file, type store.
The option files named in this display are stored in the /var/adm/sundiaglog/options directory. If there are more files than the screen is able to display at one time, type next or n to page forward. When you want to return to the previous display, type done or d.

3.5 Log Files Menu

Type logfiles or l in the control panel to display a menu similar to the one shown in Figure 3-5.

Graphic

Figure 3-5

Type error, info, or unix after typing name to toggle between the three available files you want to view or edit. When you type unix and display, for example, the /var/adm/messages file is displayed in the vi editor format (see
Figure 3-6). You can use vi commands such as Control-F or Control-B to page forward and backward through the file. To return to the Log File menu, use the :q command.

Imported image(39x43)

Warning - Do not attempt to edit message files while the SunDiag exerciser is running. You may only display, print, or remove these files. Editing these files while the program is running will cause the program to crash.

Graphic

Figure 3-6

Type name info or i, and then display or l, to display the TTY info log.

Graphic

Figure 3-7

Enter remove or r to remove the log file listed after [NAME].
When you are ready to return to the previous menu, type done or d.

3.6 Setting Individual Test Options in TTY Mode

When you enter a test name from the control panel window, such as:

  Command: c0t3d0 option  

or just c0t3d0 o, a menu of individual test options is displayed.

Graphic

Figure 3-8 c0t0d0rawtest

These options vary according to the type of test. Each menu displays [DEFAULT] [DONE] [HELP] at the bottom, and the devices found during the kernel probe are listed. Type f for default and the default options are enabled. Type d for done to go back to the previous menu. Help is not implemented at this time.
Type the character in parentheses next to the sub-test or option to toggle the option from Enable to Disable. Type the character again to toggle the option or sub-test back from Disable to Enable.
Some options, like the Wait Time option to vmem, have a range of values to choose from. Typing the option letter (w, in the case of the vmem Wait Time option) and then pressing Return will cycle the option through the range of available values.
Other options, like the Reserve option to vmem, can be set to arbitrary values. Type the option letter (r, in the case of the vmem Reserve option) followed by the value to be set. For example, typing r 10 reserves 10 megabytes in the vmem test.
In all cases, though, the TTY test option window emulates the OpenWindows option menu for each individual test where possible. For toggled items, typing the command is sufficient. For text items, a value needs to follow the command. If you have trouble changing individual test options, refer to the option menu printed in Chapter 6, "SunDiag Test Descriptions" for more detail on how the option works.

3.7 Setting Processor Affinity Masks in TTY Mode

The processor affinity mask is a tool that enables you to specify which processor you want a test to run. By default the UNIX kernel will randomly distribute testing among all the processors it controls.
All processor affinity masks (PAMs) in TTY mode are set by turning on a "bit position." In other words, you need to enter a series of 1's and 0's for each affinity mask, depending on the configuration of your multiprocessor system.

Note - For more information on the scalability features in the SunDiag environment, see Chapter 4, "Scaling SunDiag Hardware Tests."

Graphic

Figure 3-9

In the Figure 3-9, there are four binary digits beside each PAM option for the four processors in the system. There are four digits because there are four processors in this system.
[SCALABLEPAM(w)]: 0010
[XSCALABLEPAM(z)]: 0000


Note - On the OPEN LOOK interface, these four processors would be numbered: 0, 1, 2, and 3.

By default, no processor will be selected, so all the digits will be 0's. To select only one of the processors for testing, you must set the processor digit to 1.
The [SCALABLEPAM(w)] option is used to reserve processors for scalable tests. In Figure 3-9, the third processor was chosen for testing by typing w 0010. In this example, all the scalable tests will be run only on the third processor. To run the scalable tests on only the second processor, you would type: w 0100.
The [XSCALABLEPAM(z)] option is used to reserve processors for non-scalable tests. For example, to run non-scalable tests on only the fourth processor, you would type: z 0001.

Note - For a complete discussion on the PAM tool, see Section 4.1.6, "Processor Affinity Mask."