Fortinet Document Library

Version:

Version:


Table of Contents

Download PDF
Copy Link

Recording console output

On some FortiGate hardware models, the console output log (COMlog) can record up to 4MB of console output after it is enabled.

This information can be used for troubleshooting if unexpected behavior starts to occur. For example, if the device suffers a freeze, kernel panic, or reboot, the COMlog can help investigate the cause of the issue.

The captured logs are saved in flash memory, which is physical independent of the FortiGate's main drives. This means that the information will persist through rebooting, upgrading, and BIOS reformatting.

Tooltip

It is best practice to use an SSH connection to read the COMlog because the console connection speed is limited, and displaying the log can take a significant amount of time.

If the COMlog is displayed through a console connection, the log function will be disabled to avoid the log being overwritten by displaying it on the console. It is automatically re-enabled after the output is finished or interrupted.

To enable the COMlog:
diagnose debug comlog enable
To view the COMlog status, including speed, file size, and log start and end:
diagnose debug comlog info
To clear the COMlog from the system management controller (SMC):
diagnose debug comlog clear
To read the COMlog from the SMC:
diagnose debug comlog read

Recording console output

On some FortiGate hardware models, the console output log (COMlog) can record up to 4MB of console output after it is enabled.

This information can be used for troubleshooting if unexpected behavior starts to occur. For example, if the device suffers a freeze, kernel panic, or reboot, the COMlog can help investigate the cause of the issue.

The captured logs are saved in flash memory, which is physical independent of the FortiGate's main drives. This means that the information will persist through rebooting, upgrading, and BIOS reformatting.

Tooltip

It is best practice to use an SSH connection to read the COMlog because the console connection speed is limited, and displaying the log can take a significant amount of time.

If the COMlog is displayed through a console connection, the log function will be disabled to avoid the log being overwritten by displaying it on the console. It is automatically re-enabled after the output is finished or interrupted.

To enable the COMlog:
diagnose debug comlog enable
To view the COMlog status, including speed, file size, and log start and end:
diagnose debug comlog info
To clear the COMlog from the system management controller (SMC):
diagnose debug comlog clear
To read the COMlog from the SMC:
diagnose debug comlog read