How to configure the switch to record executed commands in logs

3

To enable the switches to record the executed commands in logs, run the following command in the system view:
info-center source SHELL channel logbuffer log level debugging state on
You can run the display logbuffer command to view commands executed after the switch starts.

Other related questions:
Why are executed commands recorded in log files but cannot be displayed by the display logbuffer command
Information in the log buffer differs from information in log files because they use different channels of the information center. Log files record more information than the log buffer. The log buffer has a higher information level and records more important than log files. As logs have a lower information level, they are not saved in the log buffer. You can use the following command to set a lower level for the logs sent to the log buffer: [HUAWEI] info-center source SHELL channel logbuffer log level informationalRun some commands and use the display logbuffer command to check the logs in the log buffer. These commands will be displayed.

Why the compare configuration command fails to be executed
In earlier versions of V100R005, the compare configuration command compares the current configuration file with a configuration file saved in the storage device. If the configuration file used for last startup is empty, the compare configuration command fails to be executed. You can use the display startup command to check the configuration. After you configure a device that is powered on for the first time, run the save command to save the configuration and restart the device. In V100R005 and later versions , the compare configuration command compares the current configuration with the next startup configuration file, so this problem will not occur.

Are all logs recorded in the log buffer
Only some logs are recorded in the log buffer. Logs that can be recorded in the log buffer are restricted. -By default, only logs at levels lower than the warning logs (level 4) are recorded in the log buffer. Therefore, logs at levels 0 to 4 are recorded to the log buffer and logs at levels 5 and 7 are not recorded. You can run the info-center source { module-name | default } channel { channel-number | channel-name } log { state { off | on } | level severity } command to set the levels of logs that can be recorded to the log buffer. -The log buffer space is limited. If the number of logs in the log buffer reaches the maximum value, new logs will replace the existing logs that are placed earlier in the log buffer until all the new logs are stored. By default, the log buffer can hold a maximum of 512 logs. You can run the info-center logbuffer size size command to set the maximum number to 1024.

Can AR router send the NAT translation table to the log server?
The configuration of NAT Elog does not need to enable firewall function, configuration is as follows: Nat log-format eLog Firewall log session enable Firewall log session NAT enable Info-center source channel 2 log level FW-DEBUG notification Then is the normal configuration of info-center. Refer to the product manual configuration: configure NAT log output

What logs are recorded by CE series switches
The device records the following logs during running: - User logs: recording user operations and information such as port and protocol status, which are saved in the log.log file. - Diagnostic logs: recording key process or event information, which are usually used for fault location. Diagnostic logs are saved in the diag.log file.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top