Syntax Description

start-time

(Optional) Enter a start time in the format yyyymmmddhh:mm:ss. Use three characters for the month (mmm) field, digits for the year (yyyy) and day (dd) fields, and digits separated by colons for the time (hh:mm:ss) field.

end-time

(Optional) Enter an end time in the format yyyymmmddhh:mm:ss. Use three characters for the month (mmm) field, digits for the year (yyyy) and day (dd) fields, and digits separated by colons for the time (hh:mm:ss) field.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

4.0(0)N1(1a)

This command was introduced.

Examples

This example shows how to display the messages in the log file that were timestamped within the span shown:

switch# show logging logfile start-time 2008 mar 11 12:10:00

Related Commands

Command

Description

logging logfile

Configures logging to a log file.

show logging module

Use the show logging module command to display the module logging configuration.

show logging module

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

4.0(0)N1(1a)

This command was introduced.

Examples

This example shows how to display the module logging configuration:

switch# show logging module

Related Commands

Command

Description

logging module

Configures module logging.

show logging monitor

Use the show logging monitor command to display the monitor logging configuration.

show logging monitor

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

4.0(0)N1(1a)

This command was introduced.

Examples

This example shows how to display the monitor logging configuration:

switch# show logging monitor

Related Commands

Command

Description

logging monitor

Configures logging on the monitor.

show logging nvram

Use the show logging nvram command to display the messages in the NVRAM log.

show logging nvram [last number-lines]

Syntax Description

lastnumber-lines

(Optional) Enters the number of lines to display. The specified number of lines is displayed. Specify from 1 to 100 lines.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

4.0(0)N1(1a)

This command was introduced.

Examples

This example shows how to display the last 20 messages in the NVRAM log:

switch# show logging nvram last 20

show logging onboard

To display the onboard logging information based on the error type, use the show logging onboard command.

Syntax Description

Displays the OBFL logs until the specified end time.in the following format: mm/dd/yy-HH:MM:SS

environmental-history

Displays the OBFL environmental history.

exception-log

Displays the OBFL exception log.

kernel-trace

Displays the OBFL kernel trace information.

obfl-history

Displays the OBFL history information.

obfl-logs

Displays the OBFL technical support log information.

stack-trace

Displays the OBFL kernel stack trace information.

starttime

Displays the OBFL logs from the specified start time in the following format: mm/dd/yy-HH:MM:SS

status

Displays the OBFL status enable or disable.

>file

(Optional) Redirects the output to a file. See the "Usage Guidelines" section for additional information.

| type

(Optional) Filters the output. See the "Usage Guidelines" section for additional information.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

4.0(0)N1(1a)

This command was introduced.

Usage Guidelines

The date and time arguments for the starttime and endtime keywords are entered as the date month/day/year (mm/dd/yy), followed by a hyphen, and the time in 24-hour format in hours:minutes:seconds (HH:MM:SS). For example:

•starttime 03/17/08-15:01:57

•endtime 03/18/08-15:04:57

The valid values for file are as follows:

•bootflash:

•ftp:

•scp:

•sftp:

•tftp:

•volatile:

The valid values for type are as follows:

•begin [-i] [-x] [word]—Begin with the line that matches the text.

–-i—Ignores the case difference when comparing the strings.

–-x—Prints only the lines where the match is a whole line.

–word—Specifies for the expression.

•count[>file | | type]—Counts number of lines.

•egrep | grepprint-match—Egrep or Grep. Egrep searches for lines of text that match more sophisticated regular expression syntax than grep. Grep searches for lines of text that match one or many regular expressions, and outputs only the matching lines.

–-Anum—Prints the specifies number of lines of context after every matching line. Range: 1 to 999.

–-Bnum—Prints the specifies number of lines of context before every matching line. Range: 1 to 999.

–-c—Prints a total count of matching lines only.

–-i—Ignores the case difference when comparing the strings.

–-n—Prints each match preceded by its line number.

–-v—Prints only the lines that contain no matches for the word argument.

–-w—Prints only lines where the match is a complete word

–-x—Prints only the lines where the match is a whole line.

–word—Specifies for the expression.

•exclude [-i] [-x] [word]—Excludes the lines that match.

–-i—Ignores the case difference when comparing the strings.

–-x—Prints only the lines where the match is a whole line.

–word—Specifies for the expression.

•head [-nnum]—Stream Editor. The optional -nnum keyword and argument allows you to specify the number of lines to print. Range: 0 to 2147483647.

•include [-i] [-x] [word]—Include the lines that match

–-i—Ignores the case difference when comparing the strings.

–-x—Prints only the lines where the match is a whole line.

–word—Specifies for the expression.

•last [num]—Displays the last lines to print. The optional num specifies the number of lines to print. Range: 0 to 9999.

•less [-E | -d]—Quits at the end of the file.

–-E—(Optional) Quits at the end of the file.

–-d—(Optional) Specifies a dumb terminal.

•no-more—Turns-off pagination for command output.

•sed command—Stream Editor

•wc—Counts words, lines, and characters.

–-c—(Optional) Specifies the output character count.

–-l—(Optional) Specifies the output line count.

–-w—(Optional) Specifies the output word count.

–>—Redirects it to a file.

–|—Pipes command output to filter.

Use this command to view OBFL data from system hardware. The OBFL feature is enabled by default and records operating temperatures, hardware uptime, interrupts, and other important events and messages that can assist with diagnosing problems with hardware cards or modules installed in a Cisco router or switch. Data is logged to files stored in nonvolatile memory. When the onboard hardware is started up, a first record is made for each area monitored and becomes a base value for subsequent records.

The OBFL feature provides a circular updating scheme for collecting continuous records and archiving older (historical) records, ensuring accurate data about the system. Data is recorded in one of two formats: continuous information that displays a snapshot of measurements and samples in a continuous file, and summary information that provides details about the data being collected. The message "No historical data to display" is seen when historical data is not available.

Examples

This example shows how to display the OBFL boot and uptime information: