C H A P T E R 6 |
Using the SunVTS Command-Line Interface |
This chapter describes the command-line interface used in controlling SunVTS test sessions. Topics include:
Note - The man pages for these commands are installed in the /usr/sunvts/man/man1m directory. |
Note - SunVTS must first be started before selecting a user interface. See Starting SunVTS. |
vts_cmd is a UNIX shell application that enables you to send a single command to the SunVTS kernel (vtsk) from the command line. The SunVTS kernel processes the command and sends the response back to the command line.
To control a SunVTS test session, vtsk must first be running. While the test is running, you can control the session by using the vts_cmd commands.
The SunVTS application programming interface (API) is character-based, which means that a string of characters (in the form of a command) can be sent to the SunVTS kernel. This action returns a reply back in the form of a string of characters.
vts_cmd enables you to send commands and receive replies from a UNIX command-line. vtstalk is a utility used to establish a connection to the SunVTS kernel.
vts_cmd and vtstalk uses the commands listed in this section. In all cases, the commands (and any command arguments) must follow vts_cmd (for vts_cmd commands) or vtstalk(hostname)-> (for vtstalk commands) For reference, see the example section in each command option listed.
Note - The examples sections show vts_cmd commands. If using vtstalk commands, replace ./vts_cmd with vtstalk(hostname)-> in the below examples. |
Displays the summary of the agent in the test machine. The information includes the agent machine name, the operating system running on the agent, the version of SunVTS software currently installed on the agent, and the health of the agent.
# ./vts_cmd get_agent_summary Host Name:diag035,OS:SunOS 5.10,Vts Version:SunVTS7.0build6,Status:testing/elapseTime=000.30.56/Error=1 |
Displays the configuration information of test machine.
Displays the testing status information of the system. If you specify the name of a test, get_status displays the status information of the test.
To get the global status of the system, type:
To get the status of a test, append the test name to get_status.
Displays all the tests that have been successfully probed by the system. The display information further shows all the related details of the test. The details include information on whether the test is selected or not, its scheduling policy (time or pass based), the stress factor (high or low), the progress percentage of the test (when executed), and its status (idle, testing, completed, or failed).
Enables a test on the listed test name or all the tests if the word all is selected next to the enable_test command. When a test enabled, vts_cmd displays the word DONE. If the command fails, an error string is displayed along with the usage help.
Disables a test or all the tests. When a test disabled, vts_cmd displays the word DONE. If the command fails, an error string is displayed along with the usage help.
Displays the current test mode - Online Stress or System Exerciser or Component Stress.
To change test mode, provide the mode name (Online Stress or System Exerciser or Component Stress) as per the testing requirement. If SunVTS successfully sets the test mode, vts_cmd displays the word DONE.
If setting the options fails (for example, an error due to format or a misspelled word), an error string displays with the usage help.
# ./vts_cmd set_mode [Online Stress] Usage: ’vts_cmd set_mode [modeValue] where ’modeValue’ can be Online Stress/System Exerciser/Component Stress’ |
Displays the global options that apply to all the tests. The parameters for the global options includes duration of testing (in minutes), and verbose option (whether enabled or disabled). The parameters are defined as type of display, the chosen or default value, and the choices or range of the values.
To set the global options, you must provide all the option parameters (duration of testing and verbose) with a value in the format shown in the syntax. You can determine the values from the options listed by the get_global_options command, as per testing requirements. If SunVTS successfully sets the global options, vts_cmd displays the word DONE. If setting the options fails, an error string displays along with the usage help.
Setting of global options can fail if there is a misspelled parameter or the value of a parameter is missing. In the following example, the parameter Verbose is typed as Verb, so the option was not set.
# ./vts_cmd set_global_options [Duration of Testing:60,Verb:Enable] Format Error: Verb is not a valid value. Usage:’vts_cmd set_global_options [Duration of Testing:<0- 99999>,Verbose:Enable/Disable]’ |
Setting global options is not allowed when the vts kernel is not in the idle state. An error will be displayed as shown.
# ./vts_cmd set_global_options [Test Mode:System Exerciser, Duration of Testing:60,Verbose:Enable] ERROR: Setting of options allowed only when vts kernel is idle. |
Displays the test options. The parameters for the test options includes stress factor (high or low), scheduling policy (test passes or test time in minutes), and error limit. The parameters have been defined under type of display, the chosen or default value, and the choices or range of the values.
Where x,y, and z denote time, pass, and error count, respectively.
To set the test options, you must provide all the option parameters (stress, scheduling policy and error limit} with a value in the format shown. You can determine the values from the options listed by the get_test_options command, as per testing requirements. On success with setting the test options, vts_cmd displays the word DONE. If setting the options fails, an error string displays along with the usage help.
# ./vts_cmd set_test_options Disk [Stress:high,Scheduling Policy:Test Time,Test Time:50,Test Passes:0,Error Limit:2] DONE |
Setting options can fail if a parameter is misspelled, or the value of a parameter is missing. In the following example, the error limit parameter is missing. For this reason, the setting of that test option failed.
Setting global options is not allowed when the vts kernel is not in the idle state. An error displays as shown.
# ./vts_cmd set_test_options Disk [Stress:high,Scheduling Policy:Test Time,Test Time:50,Test Passes:0,Error Limit:2] ERROR: Setting of options allowed only when vts kernel is idle. |
Displays the devices and the options exported for the test.
# ./vts_cmd get_device_options Disk.c3d0p Iostate, RADIO, Disable, Enable/Disable; Write Threshold(KB/s), TEXT, 0, 0; Read Threshold(KB/s), TEXT, 0, 0 |
To set the device options exported for the test that you need to provide the command with testname and its device name with the exported variable and its value.
# ./vts_cmd set_device_options Disk.c3d0p [Iostat:Enable] DONE # ./vts_cmd set_device_options Disk.c3d0p0 [Iostat:Enable, Write Threshold\(KB/s\):30000] DONE |
To create a new session file you must provide the name of the session as an input parameter. The command has two more attributes: overwrite:yes/no and defaultMode:test mode. A value of yes for the option overwrite will overwrite the existing session file (default value is no). You can use any of the test modes (Online Stress, System Exerciser, or Component Stress) as a value for defaultMode. Whatever the default mode, the session file saves all the options separately for each of the three modes. The default mode only decides which mode will be active once the session is loaded. If you do not provide any input for the defaultMode option, then SunVTS will make the current selected Test Mode as the default active Test Mode. On success, command returns DONE.
In case of misspelled parameters or a missing value, an appropriate usage error message is returned by the command.
# ./vts_cmd save_session [overite:yes,defaultMode:Online Stress, name:sunvts_session] Format Error:overite is not a valid value. |
Usage: vts_cmd save_session [overwrite:yes,defaultMode:Component Stress,name:vijay] where the name argument is the required parameter.
The list_sessions can be used to see the list of available session files in the system, and then you can load any session file based on the availability. The command will return the “,” separated list of all the existing session files available in system.
To load an existing session file, the load_session command needs to be used to load an existing session file. The command has two input options: defaultMode and name. You must provide the name of the session file for this command to load the session file. The defaultMode option is not mandatory, it provides a way to set the defaultMode as the active mode and load the session options corresponding to that test mode. With no default mode, SunVTS will load the named session file and make the default test mode stored in the session file as the current test mode for the loaded session file. On success, command will return DONE, otherwise an appropriate error will be displayed by the command.
In case of misspelled parameters or a missing value, an appropriate usage error message will be returned by the command.
Usage: vts_cmd load_session [defaultMode:Component Stress,name:sunVTS] where the name argument is the required parameter.
You can use the get_session_name command to get the currently loaded session name. If no session is currently loaded, then command will return a blank string.
This command can be used to delete the existing session file. To remove a session file, you must enter the session file name as a parameter to delete_session. If the session file does not exist then an error will be thrown. On success, command will return DONE and the session file will be deleted.
In case the file does not exist, an error message is displayed.
# ./vts_cmd delete_session sunvts_session xyz Error: Session xyz does not exist. Please give valid session to remove. |
Once the complete execution of a session file is over, you can use the reset_session command to restore the default values of the SunVTS session without quitting from the SunVTS application.
Starts all enabled SunVTS tests. A reply with the word DONE confirms that the tests have started.
Stops all running SunVTS tests. A reply with the word DONE means the tests have stopped testing.
Resets all the tests pass, error, and time limit counts to zero. A reply with the word DONE confirms that the values of the parameters have been set to zero.
Reset is only possible if the vtsk system status is idle. If the system status is not idle, then an error is returned.
Probes all the devices on the test machine and updates the SunVTS kernel device list. A reply with the word DONE reply confirms that the vtsk has been informed to reprobe the devices.
Reprobing is only possible if the vtsk system status is idle. If the system status is not IDLE, then an error is printed on the screen.
Displays the Auto mode sequencer options and its values. Type the following command to get the modesequencer options:
Displays the Auto mode sequencer options and its values.
To set the auto mode sequencer options, you must provide all the option parameters with a value as shown in the syntax. You can determine the values from the options listed by the get_modesequencer_options command. If SunVTS successfully sets the modesequencer options, vts_cmd returns the word DONE. If setting the options fails, an error string displays along with the usage help.
# ./vts_cmd set_modesequencer_options [Sequencer:Enable,First:Online Stress,Second:System Exerciser,Third:Component Stress,Loop:1] DONE |
Where each of the modes - Online Stress, System Exerciser and Component Stress can be also typed as O, S and C (case does not matter).
Setting mode sequencer options can fail if one of the options is given a wrong or misspelled value, or if the value is missing. In the following example, a wrong value has been typed in for the option "Sequencer". The command then returns with an error.
Terminates the SunVTS kernel (vtsk). A reply with the word DONE confirms that the vtsk quit.
Quitting the vtsk is only possible if the vtsk system status is idle. If the system status is not idle, then an error is returned.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved.