H3C Technologies H3C MSR 5600 User Manual
Page 221
208
The log file feature saves logs from the log file buffer to a log file every 24 hours. You can adjust the
saving interval or manually save logs to the log file. After saving logs into the log file, the system clears
the log file buffer.
The router supports multiple log files. Each log file has a specific capacity. The log files are named as
logfile1.log, logfile2.log, and so on. When the capacity of logfile1.log is reached, the system compresses
logfile1.log as logfile1.log.gz and creates a new log file named logfile2.log. You can download the
compressed log files. The maximum number of log files depends on the device model. When the last log
file is full or the storage device runs out of space, the system deletes the earliest log file and creates a new
one.
To save logs to a log file:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable the information center. info-center enable
By default, the information center is
enabled.
3.
Enable the log file feature.
info-center logfile enable
By default, the log file feature is
enabled.
4.
(Optional.) Enable log file
overwrite-protection.
info-center logfile
overwrite-protection
[ all-port-powerdown ]
By default, log file
overwrite-protection is disabled.
This feature is supported only in
FIPS mode.
5.
(Optional.) Configure the
maximum size for a log file.
info-center logfile size-quota size
The default setting is 5 MB.
To ensure normal operation, set the
size argument to a value between
1 MB and 10 MB.
6.
(Optional.) Specify the
directory to save a log file.
info-center logfile directory
dir-name
By default, a log file is saved in the
logfile directory under the root
directory of the storage device.
The configuration made by this
command cannot survive a reboot.
(MSR 2600/MSR 3600.)
The configuration made by this
command cannot survive a reboot
or an active/standby switchover.
(MSR 5600.)
7.
Save the logs in the log file
buffer to a log file.
•
Method 1: Configure the
interval to perform the save
operation:
info-center logfile frequency
freq-sec
•
Method 2: Manually save the
logs in the log file buffer to a
log file:
logfile save
Use either method.
The default saving interval is
86400 seconds.
The logfile save command is
available in any view.