R3721-F3210-F3171-HP High-End Firewalls System Management and Maintenance Configuration Guide-6PW101

66
Saving system information to the log file
This feature enables the device to save generated log information to a log file. You can specify how often
the log file is saved, or you can save the log file manually.
Logs are saved into the log file buffer. The system writes the logs from the log file buffer to the log file at
the specified interval, which is usually set to 24 hours. You can also manually save the logs while the
device is not busy. After the logs in the log file buffer are saved into the log file, the system clears the log
file buffer.
The log file has a specific capacity. When the capacity is reached, the system deletes the earliest
messages and writes new messages into the log file. The directory of the log file is /logfile/logfile.log.
To save system information to a log file:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enable the information
center.
info-center enable
Optional.
Enabled by default.
3. Enable the log file
feature.
info-center logfile enable
Optional.
Enabled by default.
4. Configure the interval
for saving the log file.
info-center logfile frequency
freq-sec
Optional.
The default value is 86,400 seconds.
5. Enable logfile
overwrite-protection
info-center logfile
overwrite-protection
Optional.
Disabled by default.
6. Configure the
maximum size of the
log file.
info-center logfile size-quota
size
Optional.
By default, the maximum size of a log file is 10
MB.
To ensure normal operation, set the size to a
value between 1 MB and 10 MB.
7. Configure the directory
to save the log file.
info-center logfile
switch-directory dir-name
Optional.
By default, the log file is saved in the logfile
directory under the root directory (specified by
the device) of the storage device.
8. Manually save the log
file buffer content to
the log file.
logfile save
Optional.
By default, the system saves the log file at an
interval defined by the info-center logfile
frequency command.
Available in any view.
The configuration made by the info-center logfile switch-directory command cannot survive a system
reboot.
Saving security logs into the security log file
Security logs are very important for locating and troubleshooting network problems. Generally, security
logs are output together with other logs. It is difficult to identify security logs among all logs.