upload log

upload log [ ipaddress | hostname] {vr vr_name} {block-size block_size} filename {messages [memory-buffer | nvram] } {severity severity {only}} {match regex} {chronological}

Description

Uploads the current log messages to a TFTP server.

Syntax Description

ipaddress Specifies the ipaddress of the TFTP server.
hostname Host name of server to send log information to.
vr_name
Specifies the virtual router that can reach the TFTP server.
Note: User-created VRs are supported only on the platforms listed for this feature in the ExtremeXOS and Switch Engine 31.7 Feature License Requirements document.
block_size Specifies the data block size, excluding TFTP header. Data block size ranges from 24-65000 bytes.
filename Specifies the file name for the log stored on the TFTP server.
messages Specifies the location from which to display the log messages.
memory-buffer Show messages stored in volatile memory.
nvram Show messages stored in NVRAM.
severity Specifies the minimum severity level to display (if the keyword only is omitted).
only Specifies that only the specified severity level is to be displayed.
regex Specifies a regular expression. Only messages that match the regular expression will be displayed.
chronological Specifies uploading log messages in ascending chronological order (oldest to newest).

Default

The following defaults apply:
  • messages—memory buffer.
  • severity—none (displays everything stored in the target).
  • match—no restriction.
  • chronological—if not specified, show messages in order from newest to oldest.

If you do not specify block size, the default value is 1400 bytes.

Usage Guidelines

This command is similar to the show log command, but instead of displaying the log contents on the command line, this command saves the log to a file on the TFTP server you specify. For more details on most of the options of this command, see the command show log.

Host Name and Remote IP Address Character Restrictions

This section provides information about the characters supported by the switch for host names and remote IP addresses.

When specifying a host name or remote IP address, the switch permits only the following characters:
  • Alphabetical letters, upper case and lower case (A-Z, a-z).
  • Numerals (0-9).
  • Period ( . ).
  • Dash ( - ) Permitted only for host names.
  • Underscore ( _ ) Permitted only for host names.
  • Colon ( : ).

When naming or configuring an IP address for your network server, remember the requirements listed above.

Remote Filename Character Restrictions

This section provides information about the characters supported by the switch for remote filenames.

When specifying a remote filename, the switch permits only the following characters:
  • Alphabetical letters, upper case and lower case (A-Z, a-z).
  • Numerals (0-9).
  • Period ( . ).
  • Dash ( - ).
  • Underscore ( _ ).
  • Slash ( / ).

When naming a local or remote file, remember the requirements listed above.

Example

The following command uploads messages with a critical severity to the filename switch4critical.log on TFTP server at 10.31.8.25:

upload log 10.31.8.25 switch4critical.log severity critical

The following command uploads messages with warning, error, or critical severity to the filename switch4warn.log on TFTP server at 10.31.8.25:

upload log 10.31.8.25 switch4warn.log severity warning

History

This command was first available in ExtremeXOS 10.1.

Block size support was added in ExtremeXOS 15.7.1.

Platform Availability

This command is available on ExtremeSwitching X435, X440-G2, X450-G2, X460-G2, X465, X590, X620, X670-G2, X690, X695, X870, 5320, 5420, and 5520 series switches.