The system logs contain important information for debugging and maintaining the switch. After the current log file reaches the configured maximum size, the system creates a new log file for logging. The system transfers old log files to a remote host. You can configure up to 10 remote hosts, which creates long-term backup storage of your system log files.
Of the 10 configured remote hosts, 1 is the primary host and the other 9 are redundant. Upon initiating a transfer, system messaging attempts to use host 1 first. If host 1 is not reachable, system messaging tries hosts 2 to 10.
If log file transfer is unsuccessful, the system keeps the old log files on internal flash. The system attempts to transfer old log files after the new log file reaches the configured maximum size. The system also attempts to transfer old log files periodically (once in one hundred log writes) if the disk space on the flash is more than 75% full.
You can log system log messages to external system log hosts with both IPv4 and IPv6 addresses with no difference in functionality or configuration.
With enhanced secure mode enabled, authorized users can use SFTP to transfer files to a remote server with the content encrypted.
You can specify the following information to configure the transfer criteria:
The maximum size of the log file.
The IP address of the remote host.
The name prefix of the log file to store on the remote host.
The system appends a suffix of .xxxxxxxx.sss to the file name. The first six characters of the suffix contain the last three bytes of the chassis base MAC address. The next two characters are 01. The last three characters (sss) denote the sequence number of the log file. For example, if you configure the name prefix as mylog, a possible file name is mylog.90000001.001.
The user name and password, if using File Transfer Protocol (FTP) for file transfer. Use the following commands to configure the user name and password:
boot config host user WORD<0–16>
boot config host password WORD<0–16>
Be aware of the following restrictions to transfer log files to a remote host:
The remote host IP address must be reachable.
If you transfer a log file from a host to the system, (for example, to display it with a show command), rename the log file. Failure to rename the log file can cause the system to use the recently transferred file as the current log, if the sequence number in the extension is higher than the current log file. For example, if bf860005.002 is the current log file and you transfer bf860005.007 to the system, the system logs future messages to the bf860005.007 file. You can avoid this if you rename the log file to something other than the format used by system messaging.
If your TFTP server is a UNIX-based machine, files written to the server must already exist. For example, you must create dummy files with the same names as your system logs. This action is commonly performed by using the touch command (for example, touch bf860005.001).
Three parameters exist to configure the log file:
the minimum acceptable free space available for logging
the maximum size of the log file
the percentage of free disk space the system can use for logging
Although these three parameters exist, you can only configure the maximum size of the log file. The switch does not support the minimum size and percentage of free disk space parameters. The internal flash must be less than 75% full for the system to log a file. If the internal flash is more than 75% full, logging to a file stops to prevent exhausting disk space.
File transfers using SFTP require file permissions.
Use the command attribute WORD<1-99> [+/-] R to change the permissions of a file.
To change permissions for all log files, use the wildcard filename log.*. Using the command in the wildcard form attribute log.* [+/-]R changes permissions for log files with names that begin with the characters “log.”.
Important
You cannot use a wildcard pattern other than log.* for this command.