To enable and use from the CLI.
1) Enable COMLog using the command.
# diag debug comlog enable/disable
2) To display COMLog status, including speed, file size and log start/end use the command.
# diag debug comlog info
3) To clear the COMLog on the system management controller (SMC) use the command.
# diag debug comlog clear
4) To read the COMLog from SMC, use the command.
# diag debug comlog read
This command is not visible, will not show if '?' is used, and will not auto-complete with TAB.
The last word, 'read' must be typed.
5) If the output is displayed page by page, the console output type can be changed to the 'standard' by the following steps:
# config system console
set output standard
It is recommended to use WEB GUI or SSH connection to collect the output, not the console port.
Since the console speed is limited, displaying the COMLog can take significant time.
7) If the COMLog is being displayed via the console connection, the COMLog functionality will be disabled to avoid the log being overwritten by displaying it on the console. It is re-enabled at the end of reading it, but in the event that reading COMLog fails or Ctrl+C is used to interrupt the COMLog output it remains disabled.
Starting from FortiOS 5.4.1, the COMLog status will always be restored when the command quits executing, no matter what causes it (Press Q, or Control C, or error, or finishes reading all COMLogs)
To enable from the Web-based Manager.
1) Prior to v5.4 go to System -> Config -> Advanced -> Console Log, in v5.4 go to System -> Advanced -> Debug Logs.
2) Select Update (Regenerate Console Logs in FortiOS 5.4) to copy the COMLog content from SMC hardware to the local tmp folder. The update process may take up to 10 minutes depending on the size of the COMLog.
3) Select Download to transfer COMLog content from the local tmp folder to the PC.
4) A dump utility; such as dumplog.bin; is required to read the COMLog file.
At least the following models will support this functionality (the list may be incomplete).
FortiGate-3950B Gen 2
FortiGate-5001B Gen 2
FortiSwitch-5003B Gen 2
FortiSwitch-5203B Gen 2