dumpsyslog

usage: dumpsyslog [ -n <N>] [ -b ] [-m] [ -s <I | W | E | D> ] [ -d <date> ] [ -h <hour> ] [ -f <filename> ] [-q <C | S | D>] [ -t ]

This command will allow displaying and saving entries from the System Log.

The command accepts the following filter options: 

[-n <N>]

Maximum number (N) of entries to dump. By default the most recent entries in the System Log are shown.

[-b]

Will select entries from the beginning of the System Log, that is, the oldest entries instead of the most recent entries. This option is preferably used in conjunction with the -n option.

[[ -s ]]

Displays the severity type for each entry. The possible severity types are:


I

Information

W

Warning

E

Error

D

Disaster

[-d <DATE>]

Filter on a certain date or time interval. The date must be given in the format specified in the config.xml file.

If only one date is given, the display will hold entries for that date only (time 00:00:00 to 23:59:59), unless the -h option is used.

MZ>> dumpsyslog -d 1982-01-01

Will give all log entries for the specified date from 00:00:00 to 23:59:59.

If an interval is given, the entries must be enclosed within quotation marks "d1 d2":

MZ>> dumpsyslog -d "1982-01-01 2007-12-07"

Will give all log entries between the two dates, from date1 (time 00:00:00) to date2 (time 23:59:59).

[-h <HOUR>]

Filter on a certain hour or time interval. Time is given in the format hh:mm:ss and if an interval is given the times have to be enclosed within quotation marks; "h1 h2".

If only one time is given, the display will hold entries for that hour only (time 00:00:00 to 00:59:59). If giving two times, all entries in the interval will be displayed.

Note!

If both date and time intervals are entered; -d "d1 d2"   -h "h1 h2" , the displayed entries will be from date d1 at time h1 to date d2 at time h2 .

[-f <FILENAME>]

Direct output to a file (including directory path).

[-q <C|S|D>]

Displays general information about the System Log entries.


C

Number of entries.

S

Number of entries of each severity.

D

Earliest and latest date of entries.

[-t]

To include stack trace information in the System Log printout.

[-m]Sometimes log messages can get truncated, so use this flag to display full log messages. 


Return Codes

Listed below are the different return codes for the dumpsyslog command:

CodeDescription

0

Will be returned if the command was successful.

1

Will be returned if there was a problem parsing command parameters.

2

Will be returned if there was an error when trying to access the system log database.

3

Will be returned if the output file already exists, or in the event of file write errors.