image image image image image

On This Page

logging local


logging local <log-level>
no logging local

Sets the minimum severity of log messages to be saved in log files on local persistent storage.
The no form disables the ability to log messages locally and remotely.

Syntax Descriptionlog-level
  • alert – alert notification, action must be taken immediately
  • crit – critical condition
  • debug – debug level messages
  • emerg – system is unusable (emergency)
  • err – error condition
  • info – informational condition
  • none – disables the logging locally and remotely
  • notice – normal, but significant condition
  • warning – warning condition
Defaultinfo
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging local info
Related Commands

show logging
logging local override

Notes
  • The commands "logging local none" and "no logging local" have the same effect.
  • Disabling the logging messages will disable all logging:
    • Local logging
    • Logging messages sent from hosts to be logged in the system
    • Remote logging (syslog)

logging local override


logging local override [class <class> priority <log-level>]
no logging local override [class <class> priority <log-level>]

Enables class-specific overrides to the local log level.
The no form of the command disables all class-specific overrides to the local log level without deleting them from the configuration, but disables them so that the logging level for all classes is determined solely by the global setting.

Syntax DescriptionoverrideEnables class-specific overrides to the local log level
classSets 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:
  • iss-modules – protocol stack
  • mgmt-back – system management back-end
  • mgmt-core – system management core
  • mgmt-front – system management front-end
  • mlx-daemons – management daemons
  • sx-sdk – switch SDK
log-level
  • alert – alert notification, action must be taken immediately
  • crit – critical condition
  • debug – debug level messages
  • emerg – system is unusable (emergency)
  • err – error condition
  • info – informational condition
  • none – disables the logging locally and remotely
  • notice – normal, but significant condition
  • warning – warning condition
DefaultOverride disabled
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging local override class mgmt-front priority warning
Related Commands

show logging
logging local

Notes

logging <syslog-ip-address>


logging <syslog-ip-address> [trap {<log-level> | override class <class> priority <log-level>}]
no 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.
The no form of the command stops sending messages to the remote syslog server.

Syntax Descriptionsyslog-ip-addressIPv4 address of the remote syslog server
classSets 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:
  • iss-modules – protocol stack
  • mgmt-back – system management back-end
  • mgmt-core – system management core
  • mgmt-front – system management front-end
  • mlx-daemons – management daemons
  • sx-sdk – switch SDK
log-level
  • alert – alert notification, action must be taken immediately
  • crit – critical condition
  • debug – debug level messages
  • emerg – system is unusable (emergency)
  • err – error condition
  • info – informational condition
  • none – disables the logging locally and remotely
  • notice – normal, but significant condition
  • warning – warning condition
DefaultRemote logging is disabled
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging local info
Related Commands

show logging
logging local override

Notes

logging receive


logging receive
no logging receive

Enables receiving logging messages from a remote host.
The no form of the command disables the option of receiving logging messages from a remote host.

Syntax DescriptionN/A
DefaultDisabled
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging receive
Related Commands

show logging
logging local
logging local override

Notes
  • This does not log to the console TTY port
  • Inband management should be enabled in order to open a channel from the host to the CPU
  • If enabled, only log messages matching or exceeding the minimum severity specified with the "logging local” command will be logged, regardless of what is sent from the remote host

logging format


logging format {standard | welf [fw-name <hostname>]}
no logging format {standard | welf [fw-name <hostname>]}

Sets the format of the logging messages.
The no form of the command resets the format to its default.

Syntax DescriptionstandardStandard format
welfWebTrends Enhanced Log file (WELF) format
fw-nameSpecifies 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
DefaultStandard
Configuration Modeconfig
History1.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>}
no 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.
The no form of the command disallows including an additional field in each log message that shows the number of seconds since the Epoch.

Syntax DescriptionenableSpecifies whether to include an additional field in each log message that shows the number of seconds since the Epoch or not
fractional-digitsThe 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-digitsThe 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.
DefaultDisabled
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging fields seconds enable
ufmapl [ mgmt-sa ] (config) # logging fields seconds whole-digits 1
Related Commands

show logging

NotesThis 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 Descriptioncli commandsSets the severity level at which CLI commands which the user executes are logged
audit mgmtSets the severity level at which all network management audit messages are logged
log-level
  • alert – alert notification, action must be taken immediately
  • crit – critical condition
  • debug – debug level messages
  • emerg – system is unusable (emergency)
  • err – error condition
  • info – informational condition
  • none – disables the logging locally and remotely
  • notice – normal, but significant condition
  • warning – warning condition
DefaultCLI commands and audit message are set to notice logging level
Configuration Modeconfig
History1.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 DescriptioncurrentDeletes current log file
oldestDeletes oldest log file
number-of-filesSets the number of files to be deleted
DefaultN/A
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging files delete current
Related Commands

show logging
show log files

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 DescriptionfrequencySets rotation criteria according to time. Possible options: Daily, Weekly, Monthly
sizeSets rotation criteria according to size in megabytes. Range: 1-9999.
size-pctSets 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).
forceForces 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-numberThe 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.
Default10 files are kept by default with rotation criteria of 5% of the log partition size
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging files rotation criteria size-pct 6
Related Commands

show logging
show log files

Notes

logging files upload


logging files upload {current | <file-number>} <url>

Uploads a log file to a remote host.

Syntax DescriptioncurrentThe 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-numberAn 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.
urlUploads URL path. FTP, TFTP, SCP, and SFTP are supported. Example: scp://username[:password]@hostname/path/filename.
DefaultN/A
Configuration Modeconfig
History1.5
Example
ufmapl [ mgmt-sa ] (config) # logging files uplaod 1 scp://admin@scpserver
Related Commands

show logging
show log files

Notes

show logging


show logging

Displays the logging configurations.

Syntax DescriptionN/A
DefaultN/A
Configuration ModeAny configuration mode
History1.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
logging files rotation
logging level
logging local
logging receive
logging <syslog IP address>

Notes

show log


show log [continues | files [<file-number>] ] [ [not] matching <reg-exp>]

Displays the log file with optional filter criteria.

Syntax DescriptioncontinuesDisplays 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
filesDisplays the list of log files
file-numberDisplays 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
DefaultN/A
Configuration ModeAny configuration mode
History1.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
logging files rotation
logging level
logging local
logging receive
logging <syslog IP address>

Notes