logging local
logging local <log-level> Sets the minimum severity of log messages to be saved in log files on local persistent storage. | ||
Syntax Description | log-level |
|
Default | info | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging local info | |
Related Commands | show logging | |
Notes |
|
logging local override
logging local override [class <class> priority <log-level>] Enables class-specific overrides to the local log level. | ||
Syntax Description | override | Enables class-specific overrides to the local log level |
class | Sets or removes a per-class override on the logging level. All classes which do not have an override set will use the global logging level set with "logging local <log level>". Classes that do have an override will do as the override specifies. If "none" is specified for the log level, MLNX-OS will not log anything from this class. Classes available:
| |
log-level |
| |
Default | Override disabled | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging local override class mgmt-front priority warning | |
Related Commands | show logging | |
Notes |
logging <syslog-ip-address>
logging <syslog-ip-address> [trap {<log-level> | override class <class> priority <log-level>}] Enables (by setting the IP address) sending logging messages, with ability to filter the logging messages according to their classes. | ||
Syntax Description | syslog-ip-address | IPv4 address of the remote syslog server |
class | Sets or removes a per-class override on the logging level. All classes which do not have an override set will use the global logging level set with "logging local <log level>". Classes that do have an override will do as the override specifies. If "none" is specified for the log level, MLNX-OS will not log anything from this class. Classes available:
| |
log-level |
| |
Default | Remote logging is disabled | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging local info | |
Related Commands | show logging | |
Notes |
logging receive
logging receive Enables receiving logging messages from a remote host. | ||
Syntax Description | N/A | |
Default | Disabled | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging receive | |
Related Commands | show logging | |
Notes |
|
logging format
logging format {standard | welf [fw-name <hostname>]} Sets the format of the logging messages. | ||
Syntax Description | standard | Standard format |
welf | WebTrends Enhanced Log file (WELF) format | |
fw-name | Specifies the firewall hostname that should be associated with each message logged in WELF format. If no firewall name is set, the hostname is used by default | |
Default | Standard | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging format standard | |
Related Commands | show logging | |
Notes |
logging fields
logging fields seconds {enable | fractional-digits <f-digit> | whole-digits <w-digit>} Specifies whether to include an additional field in each log message that shows the number of seconds since the Epoch or not. | ||
Syntax Description | enable | Specifies whether to include an additional field in each log message that shows the number of seconds since the Epoch or not |
fractional-digits | The fractional-digits parameter controls the number of digits to the right of the decimal point. Truncation is done from the right. Possible values: 1, 2, 3, or 6. | |
whole-digits | The whole-digits parameter controls the number of digits to the left of the decimal point. Truncation is done from the left. Except for the year, all of these digits are redundant with syslog's own date and time. Possible values: 1, 6, or all. | |
Default | Disabled | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging fields seconds enable ufmapl [ mgmt-sa ] (config) # logging fields seconds whole-digits 1 | |
Related Commands | show logging | |
Notes | This is independent of the standard syslog date and time at the beginning of each message in the format of "July 15 18:00:00". Aside from indicating the year at full precision, its main purpose is to provide subsecond precision. |
logging level
logging level {cli commands <log-level> | audit mgmt <log-level>} Sets the severity level at which CLI commands or the management audit message that the user executes are logged. This includes auditing of both configuration changes and actions. | ||
Syntax Description | cli commands | Sets the severity level at which CLI commands which the user executes are logged |
audit mgmt | Sets the severity level at which all network management audit messages are logged | |
log-level |
| |
Default | CLI commands and audit message are set to notice logging level | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging level cli commands info | |
Related Commands | show logging | |
Notes |
logging files delete
logging files delete {current | oldest [<number-of-files>]} Deletes the current or oldest log files. | ||
Syntax Description | current | Deletes current log file |
oldest | Deletes oldest log file | |
number-of-files | Sets the number of files to be deleted | |
Default | N/A | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging files delete current | |
Related Commands | show logging | |
Notes |
logging files rotation
logging files rotation {criteria { frequency <freq> | size <size-mb>| size-pct <size-percentage>} | force | max-number <number-of-files>} Sets the rotation criteria of the logging files. | ||
Syntax Description | frequency | Sets rotation criteria according to time. Possible options: Daily, Weekly, Monthly |
size | Sets rotation criteria according to size in megabytes. Range: 1-9999. | |
size-pct | Sets rotation criteria according to size in percentage of the partition where the logging files are kept in. The percentage given is truncated to three decimal points (thousandths of a percent). | |
force | Forces an immediate rotation of the log files. This does not affect the schedule of auto-rotation if it was done based on time: the next automatic rotation will still occur at the same time for which it was previously scheduled. Naturally, if the auto-rotation was based on size, this will delay it somewhat as it reduces the size of the active log file to zero. | |
max-number | The number of log files will be kept. If the number of log files ever exceeds this number (either at rotation time, or when this setting is lowered), the system will delete as many files as necessary to bring it down to this number, starting with the oldest. | |
Default | 10 files are kept by default with rotation criteria of 5% of the log partition size | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging files rotation criteria size-pct 6 | |
Related Commands | show logging | |
Notes |
logging files upload
logging files upload {current | <file-number>} <url> Uploads a log file to a remote host. | ||
Syntax Description | current | The current log file. The current log file will have the filename "messages" if you do not specify a new name for it in the upload URL. |
file-number | An archived log file. The archived log file will have the name “messages<n>.gz” (while “n” is the file number) if you do not specify a new name for it in the upload URL. The file will be compressed with gzip. | |
url | Uploads URL path. FTP, TFTP, SCP, and SFTP are supported. Example: scp://username[:password]@hostname/path/filename. | |
Default | N/A | |
Configuration Mode | config | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # logging files uplaod 1 scp://admin@scpserver | |
Related Commands | show logging | |
Notes |
show logging
show logging Displays the logging configurations. | ||
Syntax Description | N/A | |
Default | N/A | |
Configuration Mode | Any configuration mode | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # show logging Local logging level: info Override for class mgmt-front: warning Default remote logging level: notice No remote syslog servers configured. Allow receiving of messages from remote hosts: no Number of archived log files to keep: 10 Log rotation size threshold: 5.000% of partition (43 megabytes) Log format: standard Subsecond timestamp field: enabled Subsecond timestamp precision: 1 whole digit; 3 fractional digits Levels at which messages are logged: CLI commands: info Audit messages: notice | |
Related Commands | logging fields | |
Notes |
show log
show log [continues | files [<file-number>] ] [ [not] matching <reg-exp>] Displays the log file with optional filter criteria. | ||
Syntax Description | continues | Displays the last few lines of the current log file and then continues to display new lines as they come in until the user hits Ctrl+C, similar to LINUX "tail" utility |
files | Displays the list of log files | |
file-number | Displays an archived log file, where the number may range from 1 up to the number of archived log files available | |
[not] matching <reg-exp> | The file is piped through a LINUX "grep" utility to only include lines either matching, or not matching, the provided regular expression | |
Default | N/A | |
Configuration Mode | Any configuration mode | |
History | 1.5 | |
Example | ufmapl [ mgmt-sa ] (config) # show log matching INFO Feb 1 10:57:04 switch clusterd[2659]: [4.193] [clusterd.INFO]: master browse reply: add service 0x20000 mxyzzy--0002c95ea5d8 _tms_cluster._tcp. local. Feb 1 10:57:04 switch clusterd[2659]: [4.199] [clusterd.INFO]: master resolve reply via browse: name mxyzzy--0002c95ea5d8 type _tms_cluster._tcp. domain local. addr 172.30.2.2 port 60102 ifindex 1 31072 Feb 1 10:57:07 switch SX[2785]: TID 1208106288: [7.746] [hwd.INFO]: hwd_kernel_interrupt_sim: Entry Feb 1 10:57:07 switch SX[2785]: TID 1208106288: [7.747] [hwd.INFO]: hwd_kernel_interrupt_sim: err=0 Feb 1 10:57:07 switch mgmtd[2599]: [7.748] [mgmtd.INFO]: Handling EVENT request (session 26) Feb 1 10:57:07 switch mgmtd[2599]: [7.749] [mgmtd.INFO]: EVENT: /system/chassis/events/hw-isr-event Feb 1 10:57:07 switch mgmtd[2599]: [7.750] [mgmtd.INFO]: EVENT: [0] mask = 0 (uint32) Feb 1 10:57:07 switch health[2900]: TID 1208104656: [7.751] [health.INFO]: Received ISR event with mask 0 Feb 1 10:57:07 switch mgmtd[2599]: [7.754] [mgmtd.INFO]: Sending externally: type event session 36 id 1732128 Feb 1 10:57:07 switch mgmtd[2599]: [7.755] [mgmtd.INFO]: Event sent by user i:2785-0-0 has been handled | |
Related Commands | logging fields | |
Notes |