Append Command Results to an Existing File

Use the -outaoption 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 -outacommand to append the new output to fans.txt.

Type:

omreport chassis 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 use the xml option, the omconfig command returns XML code.

Working With CLI Command Results

189

Page 189
Image 189
Dell Command Line Interface Selecting a Format for Your CLI Command Output, Append Command Results to an Existing File