diff --git a/cheat-sheets/Fortigate-debug-diagnose-complete-cheat-sheet.adoc b/cheat-sheets/Fortigate-debug-diagnose-complete-cheat-sheet.adoc index ef56a05..d9ce76e 100644 --- a/cheat-sheets/Fortigate-debug-diagnose-complete-cheat-sheet.adoc +++ b/cheat-sheets/Fortigate-debug-diagnose-complete-cheat-sheet.adoc @@ -85,12 +85,28 @@ iprope lookup 10.10.10.1 34567 8.8.8.8 443 6 LAN1` |*get sys performance stat* |Show real-time operational statistics: CPU load per CPU, memory usage, average network/session, uptime. +|*diagnose sys top [_refresh_] [_num-of-processes_] [_iterations_]* +|Print list of running processes updated every _refresh_ seconds (default 5), for +_iterations_ times, sorted in descending order by the CPU load. This `top` command does not display all processes by +default, to show them all, set _num-of-processes_ to high number, for example +100. Press "m" to sort the processes by memory consumption. The displayed table +is in this order: `Process id`, `process state: (R)unning, (S)leep, (Z)ombie, +(D)isk Sleep, < Means higher priority`, `CPU used`, `Memory used`. + +|*dia sys kill _signal-id_ _process-id_* +|Forcefully kill the process with the id of _process-id_, sending it the given _signal-id_ (Linux signals, e.g. 9, 11). + |*diagnose debug crashlog read* | Display crash log. Records all daemons crashes and restarts. Some daemons are more critical than others. |*diagnose debug crashlog clear* | Clear the crash log. +|*dia sys top-mem [_num-processes_] [detail]* +|Show top (default 5) processes by memory usage, optionally set number of +processes to show with _num-processes_, and use `detail` to get verbose output +(a lot). + |*get hardware memory* | Show memory statistics: free, cached, swap, shared