Manuals

Manuals
Working With CLI Command Results: Dell OpenManage Server Administrator Version 5.3 Command Line Interface User's Guide

Back to Contents Page

Working With CLI Command Results

Dell™ OpenManage™ Server Administrator Version 5.3
Command Line Interface User's Guide


Server Administrator Command Line Interface (CLI) users can use the command output in various ways. This section explains how to save command output to a file and how to select a format for your command results that fits different objectives.

Table 7-1. System Availability for the omreport Command

Command Level 1

Command Level 2

Applicable To

omreport

modularenclosure

Modular system

 

servermodule

Modular system

 

mainsystem

Modular system

 

system

Non-modular system

 

chassis

Non-modular system

Output Options for Command Results

CLI command output displays to standard output on your system in a command window, in an X-terminal, or on a screen, depending on the type of your 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

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 the command results to be written. When specifying the path to which you want your file to be written, use the appropriate syntax for your 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 Can Be 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 your 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

: 0

Status

: OK

Probe Name

: System Board Fan 1 RPM

Reading

: 2380RPM

Minimum Warning Threshold

: 600RPM

Maximum Warning Threshold

: 5700RPM

Minimum Failure Threshold

: 500RPM

Maximum Failure Threshold

: 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

: 0

Status

: OK

Probe Name

: System Board Fan 1 RPM

Reading

: 3001RPM

Minimum Warning Threshold

: 700RPM

Maximum Warning Threshold

: 5500RPM

Minimum Failure Threshold

: 500RPM

Maximum Failure Threshold

: 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 your system and write the results to a file called fans.txt. If you want 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

: 0

Status

: OK

Probe Name

: System Board Fan 1 RPM

Reading

: 2380RPM

Minimum Warning Threshold

: 600RPM

Maximum Warning Threshold

: 5700RPM

Minimum Failure Threshold

: 500RPM

Maximum Failure Threshold

: 6000RPM

 

 

Index

: 0

Status

: OK

Probe Name

: System Board Fan 1 RPM

Reading

: 3001RPM

Minimum Warning Threshold

: 700RPM

Maximum Warning Threshold

: 5500RPM

Minimum Failure Threshold

: 500RPM

Maximum Failure Threshold

: 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 Your CLI Command Output

You can specify a format for your 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 your command results.

NOTE: The omconfig command ignores most output format options and returns plain text messages. However, if you choose to display in an XML format, the omconfig command returns XML code.

The available formats include:

  • List (lst)

  • Semicolon-separated values (ssv)

  • Table (tbl)

  • Raw XML (xml)

  • 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 called summary.txt.

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 your 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 appears as follows:

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

Network Data

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

Network Interface Card 0 Data
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 your 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 Card 0 Data
------------------------------

| 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 your 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

The example output displays as follows:

------------------------------
Network Data
------------------------------

Network Interface Card 0 Data
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

Raw XML (xml)

Use the xml formatting option to produce output suitable for use by systems management applications or for input into other applications that use XML. To see the following example command output in raw XML format, type:

omreport system summary -fmt xml
or
omreport servermodule summary -fmt xml

The example output displays as follows:

<NICStatus>1</NICStatus><IPAddress>143.166.152.108</IPAddress><SubnetMask>255.255.255.0</SubnetMask><DefaultGateway>143.166.152.1</DefaultGateway><MACAddr>00-02-b3-23-d2-ca</MACAddr>

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


Back to Contents Page

 

Laptops | Desktops | Business Laptops | Business Desktops | Workstations | Servers | Storage | Monitors | Printers | LCD TVs | Electronics
© 2009 Dell | About Dell | Terms of Sale | Unresolved Issues | Privacy | About Our Ads | Dell Recycling | Contact | Site Map | Feedback
AT | AU | BE | BR | CA | CH | CL | CN | CO | DE | DK | ES | FR | HK | IE | IN | IT | JP | KR | ME | MX | MY | NL | NO | PA | PR | RU | SE | SG | UK | VE | ALL

snWEB1