Log in to Fortiweb SSH using the default 'admin' account, run the following command, and then hit 's' on the keyboard. Â
diagnose sys top
Find the daemon consuming more memory resources. For example, in the 'diagnose sys top' output taken from the lab unit, the daemon occupying more memory resources is 'proxyd'.
 diagnose sys top
slab:56340 buf:42760 cache:144004 dirty:96 write:0
Swap total:0 free:0
PID^^^VSZ^VSZRW RSS (SHR) DIRTY (SHR) STACK COMMAND
1159 994m 887m 1589m 20552 156m 1764 1100 /bin/proxyd
Note - On the last line above - Check the RSS column.
If it is confirmed that ‘proxyd’ or ‘ml_daemon’ is consuming the most memory, collect the ‘jemalloc’ heap files of the corresponding process.
If ‘proxyd’ or ‘ml_daemon’ is not the top memory-consuming daemon, skip Step 3 and collect the output of the commands mentioned in Step 4.
 Follow these steps to collect the ‘proxyd’ heap files. For ‘ml_daemon’, follow the same steps, replacing ‘proxyd’ with ‘ml_daemon’ in the commands.
 diagnose debug jemalloc-heap clear
 Fortiweb # diagnose debug jemalloc-conf proxyd enable
prof_active:true
prof_leak:true
lg_prof_sample:17
background_thread:true
dirty_decay_ms:0
muzzy_decay_ms:0​
 Fortiweb# diagnose debug jemalloc proxyd dump
Fortiweb# diagnose debug jemalloc proxyd dump
  Fortiweb# diagnose debug jemalloc-heap show
 Fortiweb# diagnose system jeprof proxy
 Fortiweb# diagnose debug jemalloc-conf proxyd disable
 To download jeprof.out* Files, vavigate to System -> Maintenance -> Backup & Restore -> GUI File Download/Upload to download the files.  Note: Collecting the heap files does not significantly impact memory or other system resource usage. However, if concerned, it is possible to collect them during a maintenance window or low-traffic hours.  Log in to FortiWeb using the default 'admin' account and collect the output of the following commands:
 Fortiweb# get system status
Fortiweb# get system performance
Fortiweb# diagnose hardware mem list
Fortiweb#diagnose policy total-conn-psec list
Fortiweb#diagnose policy total-traffic http list
Fortiweb# diagnose policy total-session list
Fortiweb# diagnose debug memory
Fortiweb# fnsysctl free
Note: The last command above only works in v7.0.x and v7.2.x.
Along with the above files, attach the configuration backup and the system debug file. To download the system debug file, go to System -> Maintenance -> Debug -> Debug Log and download the debug log file.   |