Saving diagnostic logs to the diagnostic log file
By default, the device saves diagnostic logs from the diagnostic log file buffer to the diagnostic log file every 24 hours. You can adjust the saving interval or manually save diagnostic logs to the diagnostic log file. After saving diagnostic logs to the diagnostic log file, the system clears the diagnostic log file buffer.
The device supports only one diagnostic log file. The diagnostic log file has a maximum capacity. When the capacity is reached, the system replaces the oldest diagnostic logs with new logs.
To enable saving diagnostic logs to the 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 the diagnostic log file. | info-center diagnostic-logfile enable | By default, saving diagnostic logs to the diagnostic log file is enabled. |
4. (Optional.) Set the maximum size for the diagnostic log file. | info-center diagnostic-logfile quota size | The default setting is 10 MB. |
5. (Optional.) Specify the directory to save the diagnostic log file. | info-center diagnostic-logfile directory dir-name | The default diagnostic log file directory is flash:/diagfile. This command cannot survive an IRF reboot or a master/subordinate switchover. |
6. Save diagnostic logs in the diagnostic log file buffer to the diagnostic log file. |
| The default saving interval is 86400 seconds. The diagnostic-logfile save command is available in any view. |