Previous Topic: Apply the File I/O Test through UINext Topic: File I/O Test Error Codes


Create, Run and Apply a File I/O Test through CLI

You can use the CLI commands to create and automate SRM AIM and run actions based on the results. You can add svcwatch command to create and apply the File I/O test to SRM AIM on the specified host.

This command has the following format:

svcwatch [-h| -p| -v| -u| -n| -a| -A| -x| -X| -m| -t| -d| -f] -o add index descr fileio destination 
username password args interval samples timeout winsiz tos limit flags name class contextInfo logLevel

The svcwatch command uses the following parameters:

-h hostname | -h ipAddr

(Optional) Specifies the CA SystemEDGE host.

Default: localhost

-p port

(Optional) Specifies the CA SystemEDGE SNMP port.

Default: 161

-c community

(Optional) Specifies the SNMP community string for SNMP version 1 and 2c.

Default: public

-v snmpVersion

(Optional) Specifies the SNMP version. Possible values are:

Default: 1

-u secName

(Optional) Specifies the name of the SNMPv3 secure user.

-u secLevel

(Optional) Specifies the level of security for SNMPv3. Possible values are:

-n contextName

(Optional) Specifies the instance name for a MIBMuxed agent.

-a authPassword

(Optional) Identifies the authentication password required when SNMPv3 is selected with security AuthNoPriv or AuthPriv.

-A authProtocol

(Optional) Specifies the authentication protocol. Possible values are:

Default: MD5

-x privPassword

(Optional) Specifies the privacy (encryption) password for SNMPv3 with security level 3 (AuthPriv).

-X encryptProtocol

(Optional) Specifies the use of encryption protocol for privacy. Possible values are:

-m FIPSmode

(Optional) Specifies the FIPS mode. Possible values are:

Default: 0

-t timeout

(Optional) Specifies the SNMP command timeout.

Default: 10 seconds

-d logLevel

(Optional) Specifies the log level for SNMP messages. Possible values are:

Default: 0

-f logFile

(Optional) Specifies the name of the logfile.

Default: sysedge_utility.log

-o add testparams

Adds a new test to SRM AIM.

testparams

Specifies the parameters for the new test.

index

Specifies the svcRspTable index.

descr

Specifies the description of the test in quotes. An empty string in quotes "" specifies no description.

fileio

Specifies the File IO service type.

destination

Specifies the remote file to test.

username

Specifies the user name for authentication in quotes. An empty string in quotes "" specifies no user name.

password

Specifies the password for authentication in quotes. An empty string in quotes "" specifies no password.

args

Specifies the service arguments. Each argument is a pair of a keyword and a value (key=value). Ampersands (&) concatenate and delimit multiple arguments. The complete arguments string is enclosed in quotes.

General syntax for arguments: "key1=value1[&key2=value2& ...]"

op=r – Reads the file.

op=w – Writes to a test file located on a remote file system, and then deletes the test file.

op=rw – Writes to a test file on a remote file system, reads the test file, and then deletes the test file.

op=cmp – Reads in one file and then another, and compares their contents.

local=path – The local path and file name to use for write, read/write, and compare operations.

domain=domain – The domain of the user logging in to the server (Windows only).

interval

Specifies the test interval in seconds.

Limits: multiple of 30 seconds

samples

Specifies the samples per interval.

timeout

Specifies the timeout in seconds.

winsiz

Specifies the statistics window size in seconds.

tos

Specifies the IP Type of Service or Differentiated Services Code. Use 0 (zero) for a normal service. See also RFC 1349.

limit

Specifies the acceptable performance limit (or threshold) for the total response time of this test. This value is used in reports.

flags

Specifies the following flags:

0x001 = collect performance cubes

0x100 = execute on request only (run once)

name

Specifies the unique name per service type. An empty string in quotes "" specifies no test name.

class

Specifies the class name. An empty string in quotes "" specifies no class name.

contextInfo

Specifies context information. An empty string in quotes "" specifies no context information.

logLevel

Specifies the log level for the test execution code. Possible values are:

-2 = use SRM-global log level (default)

-1 = do not log

0 = fatal (only the most important messages)

1 = critical

...

7 = debug3 (log all messages)

Example: Compare the Contents of Two Files

This example creates and applies the file I/O test to compare the content of two files:

svcwatch -h localhost -p 161 -c topsecret -o add 1360744 "FILEIO-TEST" fileio "F:\Test\CompTest.bin" "" "" "op=cmp&local=C:\sysedge\bin\saFileIOTest.bin" 30 1 10 120 0 0 0x100 "FILEIO-TEST" "" ""

For information about the errors returned by File I/O tests, see File I/O Test Error Codes.

Once you apply the test, each sample test runs every 30 seconds and times out after 10 seconds when the operation is not successful. Statistics for response and availability are calculated over 120-second intervals.

Based on these results, the administrator monitors and manages the health of the virtual network.