Description | This article describes how to deal with a Kernel panic. |
Scope | FortiGate. |
Solution |
A Kernel panic is a safety measure taken by the Kernelof the operating system if it cannot handle further operations to prevent further data loss. As a result the system may shut down (freeze) or reboot.
To investigate a Kernel panic, kernel debugging needs to be enabled before the issue occurs in order to print verbose Kernel back traces to the console at the time of the Kernel panic. To diagnose the cause of the Kernelpanic, collect the information outlined by this article when the issue occurs and send the debug output to the support team for investigation.
There are 2 methods to collect Kernel debug messages.
diagnose debug reset diagnose debug console timestamp enable diagnose debug kernel level 8
diagnose debug duration 0
diagnose debug enable
The Kerneldebug level 8 might produce too many log messages. Sometimes it is required to lower the debug level to 4 instead:
diagnose debug reset diagnose debug console timestamp enable diagnose debug kernel level 4
diagnose debug duration 0
diagnose debug enable
In some cases, it might be required to enable additional debug commands to enable the NMI watchdog, the comlog feature, or debug logging for the IPM sensor daemon:
diagnose sys nmi-watchdog enable diagnose debug comlog enable diagnose debug app ipmc -1
In other cases, it might be advised to run the top command to periodically print data to the console to avoid any idle timeouts:
diagnose sys top 2 80
config global
The command diag sys top should keep the session active automatically, but will add additional data to the Kernel log lines, which can make it more difficult to read the Kernel debug messages.
Use monitoring tools for system outages.
The NMI button is typically on the front left of the system:
On devices with the comlog feature, print the outputs of the comlog buffer:
diagnose debug comlog read
Additionally, it might be helpful to print the outputs of the crash log:
diagnose debug crashlog read
Alternatively, collect a complete debug report which also contains the crashlog read command:
diagnose debug report
Gather system event logs. If the system is a cluster, gather the logs from all cluster nodes. Attach all diagnostics to the TAC support case.|
After obtaining all necessary information, disable debug logging (optional):
diagnose debug reset diagnose debug disable
The comlog feature can be cleared and/or disabled. In general, it is advised to keep the comlog feature enabled to capture future kernel panics in case they are observed again.
diagnose debug comlog disable diagnose debug comlog clear |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.