
252
The device supports multiple diagnostic log files. Each diagnostic log file has a maximum capacity. The
diagnostic log files are named as
diagfile1.log
,
diagfile2.log
, and so on. When the capacity of
diagfile1.log
is reached, the system compresses
diagfile1.log
as
diagfile1.log.gz
and creates a new log
file named
diagfile2.log
. You can download the compressed diagnostic log files. The maximum number
of diagnostic log files varies by device model. When the last diagnostic log file is full or the storage
device runs out of space, the system deletes the oldest diagnostic log file and creates a new one.
To enable saving diagnostic logs to a diagnostic 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 saving diagnostic logs
to a diagnostic log file.
info-center diagnostic-logfile
enable
By default, saving diagnostic logs
to a diagnostic log file is enabled.
4.
(Optional.) Configure the
maximum size of a diagnostic
log file.
info-center diagnostic-logfile quota
size
By default, the maximum size of a
diagnostic log file is 5 MB.
To ensure normal operation, set the
size
argument to a value between
1 MB and 10 MB.
5.
(Optional.) Specify the
directory to save diagnostic
log files.
info-center diagnostic-logfile
directory
dir-name
By default, diagnostic log files are
saved in the
diagfile
directory
under the root directory of the
storage device.
This command cannot survive a
reboot or an active/standby
switchover. (In standalone mode.)
This command cannot survive an
IRF reboot or a global
active/standby switchover in an
IRF fabric. (In IRF mode.)
6.
Save the diagnostic logs in the
diagnostic log file buffer to a
diagnostic log file.
•
Configure the interval to
perform the saving operation:
info-center diagnostic-logfile
frequency
freq-sec
•
Manually save the diagnostic
logs in the buffer to a
diagnostic log file:
diagnostic-logfile save
The default saving interval is
86400 seconds.
The
diagnostic-logfile save
command is available in any view.
Configuring the maximum size of the trace log file
The device has only one trace log file. When the trace log file is full, the device overwrites the oldest trace
logs with new ones.
To set the maximum size of the trace log file: