FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
vsahu
Staff
Staff
Article Id 270211
Description

 

This article describes how to use scripts to monitor a FortiGate that is suffering from high CPU or high memory usage. If the device goes into conserve mode or high CPU, the logs obtained will help isolate the issue when shared with TAC.

 

Scope

 

FortiGate v6.4 and later.

 

Solution

 

To run the script, follow the steps below.

 

  1. Download Tera Term from this page or this page.
  2. Run Tera Term from a PC connected to the LAN and log in to the firewall (using ttermpro.exe).

 

Capture.PNG

 

  1. Start logging from Tera Term (Navigate to File -> Log, then choose the path and file name to log).

 

Capture1.PNG

 

Capture2.PNG

 

  1. Run the script by navigating to Control -> Macro and selecting the script (the file with a .ttl extension).

 

Capture4.PNG

 

Capture5.PNG

 

Note:

Do not close the logging or script window.

 

Capture6.PNG

 

Capture3.PNG

 

  1. Change the terminal width. Navigate to Setup -> Terminal and let the script run. 

 Capture7.PNG

 

Capture8.PNG
Note:

Once the script is in place, monitor the CPU and Memory. If a high CPU or memory is seen, let the script run for 10-15 minutes more, then stop it and upload the logs to the corresponding TAC case. 

 

Note:   

If the script gets logout automatically, adjust the login timeout period following this command:

 

    config system global
        set admin-ssh-grace-time <number_of_seconds> <<max 3600 seconds
    end


Note:
Customize the script based on the requirement, the script attached to the document is for general troubleshooting.
TTL command reference (osdn.jp)