Description | This article describes how to collect logs when FortiGate is in conserve mode due to the IPS Engine or WAD. |
Scope | FortiGate. |
Solution |
Conserve mode is triggered when memory consumption reaches the red level, and traffic starts dropping when memory consumption reaches an extreme level. Check the following references to understand how the conserve mode is triggered: Technical Tip: How conserve mode is triggered
If the IPS Engine consumes a lot of memory :
fnsysctl df -h
Using diagnose sys top-mem <value> to find the process ID of the IPS engine daemon, using diagnose command:
diagnose sys top-mem 20 ----> list 20 processes with more Memory used.
Example:
diagnose sys top-mem 20
Then run these commands:
fnsysctl cat /proc/[process id]/status fnsysctl cat /proc/[process id]/maps fnsysctl cat /proc/[process id]/smaps
Example:
fnsysctl cat /proc/9078/status fnsysctl cat /proc/9078/maps fnsysctl cat /proc/9078/smaps
Repeat the same diagnosis commands for all ID processes with high memory values. Along with this also collect the following debugs: diagnose ips memory track-glib enable diagnose ips memory track-glib dump
diagnose ips memory track enable diagnose ips memory track-print diagnose ips memory track-size
get sys performance status diagnose hardware sysinfo memory diagnose sys session full-stat diagnose ips session status diagnose ips packet status diagnose ips memory status diagnose sys top-mem 50 diagnose sys top 1 99 10 <----- It will run for 10 seconds and then stop automatically. diagnose sys top-fd 50 diagnose test application ipsmonitor 3 diagnose test application ipsmonitor 14 diagnose test application ipsmonitor 15 diagnose test application ipsmonitor 24 diagnose sys top-sockmem fnsysctl df fnsysctl ls -al /tmp fnsysctl ls -al /dev/shm
After finishing:
diagnose ips memory track-glib disable diagnose ips memory track disable
If the WAD daemon consumes high memory, collect the output of these commands in working and non-working scenarios and contact Fortinet support to further investigation:
Note: 'fnsysctl' command requires Super Admin access to execute. FortiGate will produce an error otherwise. For further information, see Technical Tip: fnsysctl command returns Unknown action 0.
Below is an example output of the initial part of the command 'diag wad memory report', where it shows the WAD process ID and name that is consuming an abnormally significant amount of memory (In the 'diag sys top' output, only the WAD process ID is known).
If this is monitored and keeps on increasing as time goes by, then it is a possible indication of a WAD memory leak. Once observed, reach out to TAC for further checking of the issue.
WAD Debugs:
diagnose debug reset
From the output of 'diagnose test application wad 1000', note down the type number and index value of the process (PID) consuming high memory. For example: if WAD PID 290 is consuming high memory which is verified from the output of 'diag sys top 2 50', note down the type number and index value of the PID 290 from the output of 'diagnose test application wad 1000'.
Process [8]: type=user-info(5) index=0 pid=290 state=running <----- In this case, the type value is 5 and the index is 0. Use the type and index values obtained in the previous step to run the following command: 'diagnose test application wad 2y0x'. Replace y with the type number and xx with the index value.
In the above example, the command would be 'diagnose test application wad 2500'. Run the following commands:
diagnose test application wad 803 diagnose test application wad 3 For memory leak issues caused by WAD, repeat this for each WAD process identified with high memory consumption. Contact TAC and share all diagnostic commands.
Related articles: Technical Tip: How to restart the WAD process Technical Tip: How to restart a specific WAD worker process Technical Tip: How to troubleshoot high CPU usage caused by the IPS process Troubleshooting Tip: High CPU and MEMORY usage problem Technical Tip: How conserve mode is triggered Technical Tip: Collect report for WAD high memory related issue for Fortinet TAC assistance Troubleshooting Tip: FortiGate enters Conserve Mode due to WAD Virtual Server Memory Leak |
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.