Working With CLI Command Results. Dell OpenManage Server Administrator Version 8.3


Add to my manuals
215 Pages

advertisement

Working With CLI Command Results. Dell OpenManage Server Administrator Version 8.3 | Manualzz

9

Working With CLI Command Results

Server Administrator Command Line Interface (CLI) users can use the command output in various ways.

This chapter explains how to save command output to a file and how to select a format for the command results that fits different objectives. The following table displays the systems on which omreport commands are applicable.

Table 122. System Availability For The omreport Command

Command Level 1 omreport

Command Level 2 modularenclosure servermodule mainsystem system chassis

Applicable To

Blade systems

Blade systems

Blade systems

Rack and Tower systems

Rack and Tower systems

Output Options For Command Results

CLI command output displays to standard output on the system in a command window, in an X-terminal, or on a screen, depending on the type of the operating system.

You can redirect command results to a file instead of displaying them to standard output. Saving command output to a file allows you to use the command output for later analysis or comparison.

Whether you display command results to standard output or have the command results written to a file, you can format the results. The format you select determines the way the command output is displayed and the way the command output is written to a file.

Controlling command output display

Each operating system provides a means of controlling the way that command results display to standard output. The following is a useful command for ensuring that command results do not scroll by before you can view them. The same command syntax works for the Microsoft Windows command prompt, the

Red Hat Enterprise Linux terminal, and the SUSE Linux Enterprise Server terminal. To display command output with control over scrolling, type the CLI command and append the pipe symbol followed by more.

For example, type: omreport system summary | more or omreport servermodule summary | more

210

The multiscreen system summary displays the first screen. When you want to see the next screen of command output, press the spacebar.

Writing Command Output To A File

When redirecting command results to a file, you can specify a filename (and a directory path if necessary) to which you want to write the command result. When specifying the path to which you want to write the file, use the appropriate syntax for the operating system.

You can save command results in two ways. You can overwrite any file that has the same name as the output file you specify, or you can keep adding results of commands to a file of the same name.

Saving Command Results To A File That Is Overwritten

Use the -outc option when you want to overwrite data stored in previously written files. For example, at

11:00 A.M. you capture fan probe RPM readings for fan probe 0 on the system and write the results to a file called fans.txt. You type: omreport chassis fans index=0 -outc fans.txt

or omreport mainsystem fans index=0 -outc fans.txt

Partial results written to the file are:

Index

Status

Probe Name

Reading

Minimum Warning Threshold

Maximum Warning Threshold

Minimum Failure Threshold

Maximum Failure Threshold

: 0

: OK

: System Board Fan 1 RPM

: 2380RPM

: 600RPM

: 5700RPM

: 500RPM

: 6000RPM

Four hours later, you repeat the command. You have no interest in the 11:00 A.M. snapshot as written to fans.txt. You type the same command: omreport chassis fans index=0 -outc fans.txt

or omreport mainsystem fans index=0 -outc fans.txt

The 3:00 P.M. data overwrites the 11:00 A.M. data in the fans.txt file.

Fans.txt now reads as follows:

Index

Status

: 0

: OK

211

Probe Name

Reading

Minimum Warning Threshold

Maximum Warning Threshold

Minimum Failure Threshold

Maximum Failure Threshold

: System Board Fan 1 RPM

: 3001RPM

: 700RPM

: 5500RPM

: 500RPM

: 6000RPM

You cannot refer to the previous command results to compare the earlier fan probe 0 output with the present output because in using the -outc option, you overwrote the fans.txt file.

Append command results to an existing file

Use the -outa option when you want to append new command results to data stored in a previously written file. For example, at 11:00 A.M. you capture fan probe RPM readings for fan probe 0 on the system and write the results to a file called fans.txt. To compare these results with output for the same probe obtained four hours later, you can use the -outa command to append the new output to fans.txt.

Type: omreport chassis fans index=0 -outa fans.txt

or omreport mainsystem fans index=0 -outa fans.txt

Fans.txt now reads as follows:

Index

Status

Probe Name

Reading

Minimum Warning

Threshold

Maximum Warning

Threshold

Minimum Failure

Threshold

Maximum Failure

Threshold

: 0

: OK

: System Board Fan 1 RPM

: 2380RPM

: 600RPM

: 5700RPM

: 500RPM

: 6000RPM

Index

Status

Probe Name

Reading

: 0

: OK

: System Board Fan 1 RPM

: 3622RPM

212

Minimum Warning

Threshold

Maximum Warning

Threshold

Minimum Failure

Threshold

Maximum Failure

Threshold

: 900RPM

: 3500RPM

: 500RPM

: 6000RPM

You can use a text editor to insert the time that each block of data was captured. In comparing the two snapshots for fan probe 0, you can see that the second report shows several changes. The reading of fan

RPM has increased by 621 RPM but is still within normal range. Someone has raised the minimum warning threshold by 200 RPM and has decreased the maximum warning threshold by 2000 RPM.

Selecting A Format For The CLI Command Output

You can specify a format for the CLI command results. The format determines how the command output is displayed. If the command results are directed to a file, the format is captured by the file to which you write the command results.

The available formats include:

• List (lst)

• Semicolon-separated values (ssv)

• Table (tbl)

• Custom delimited format (cdv)

The syntax for the formatting option is:

<command> -fmt <format option>

For example, type: omreport system summary -fmt tbl or omreport servermodule summary -fmt tbl where -fmt tbl specifies table format.

You can combine the formatting option with the option to direct output to a file. For example, type: omreport system summary -fmt tbl -outa summary.txt

or omreport servermodule summary -fmt tbl -outa summary.txt

where -fmt tbl specifies table format and -outa specifies that you append the command results to a file named summary.txt .

213

List (lst)

The default format is lst or list format. Use this format when you want to optimize output for simple readability. You need to specify a format for the command output only if you want a format other than the lst format.

To see the following example command output in lst format, type: omreport system summary or omreport servermodule summary

No special formatting option is required because list format is the default display format. The network data part of the example system summary is displayed as follows:

--------------

Network Data

--------------

Network Interface 0

IP Address : 143.166.152.108

Subnet Mask : 255.255.255.0

Default Gateway : 143.166.152.1

MAC Address : 00-02-b3-23-d2-ca

Table (tbl)

Use the tbl or table formatting option to have the data formatted in table rows and columns. To see the following example command output in table format, type: omreport system summary -fmt tbl or omreport servermodule summary -fmt tbl

The example output displays as follows:

------------------------------

Network Interface 0

------------------------------

| ATTRIBUTE | VALUE

| IP Address | 143.166.152.108

| Subnet Mask | 255.255.255.0

| Default Gateway | 143.166.152.1

| MAC Address | 00-02-b3-23-d2-ca

Semicolon-Separated Values (ssv)

Use the ssv formatting option to deliver output formatted in semicolon-separated value format. This format also allows you to import the command output results into a spreadsheet program such as

Microsoft Excel, or into a database program. To see the following example command output in semicolon-separated value format, type: omreport system summary -fmt ssv or omreport servermodule summary -fmt ssv

214

The example output displays as follows:

------------------------------

Network Data

------------------------------

Network Interface 0

IP Address;143.166.152.108

Subnet Mask;255.255.255.0

Default Gateway;143.166.152.1

MAC Address;00-02-b3-23-d2-ca

Custom delimited format (cdv)

Use the cdv formatting option to report exported data in custom delimited format. You can specify this option with any omreport command. For example, to generate a system summary in custom delimited format, type: omreport system summary -fmt cdv or omreport servermodule summary -fmt cdv

You can also set preferences for the custom delimited format with the omconfig command. The valid values for delimiters are: exclamation, semicolon, at, hash, dollar, percent, caret, asterisk, tilde, question, colon, comma, and pipe.

The following example shows how to set the delimiter for separating data fields to asterisk: omconfig preferences cdvformat delimiter=asterisk

215

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents