Description | This article describes how to identify the process that is causing cpu spikes. |
Scope | FortiSwitch v7.2.0, v7.4.0, v7.6.0. |
Solution |
Challenge Noticed:
Observation:
FortiSwitch CLI Command:
execute log display
2022-10-06 11:52:49 log_id=0103035242 type=event subtype=system pri=warning vd=root user="alertd" msg="[First Event] CPU_SENSOR (76.0%) cleared warning threshold of (85.0%)."
As seen above, multiple such events can be reported in the log display output. The event log ID in this case is 0103035242. Using this log ID create an automation stitch on FortiSwitch to determine which process caused the spike.
Troubleshooting: To understand what process caused the spike, a dedicated PC should be connected to the FortiSwitch via SSH or console (serial).
Important Note: The PC should remain connected to the FortiSwitch throughout the monitoring process.
Open a CLI session to FortiSwitch and log the session using the following command. (Use a terminal application that supports logging, such as PuTTY or TeraTerm).
FortiSwitch Automation Setup:
config system automation-trigger
config system automation-action
config system automation-stitch
Specify the action to run a command: Under config system automation-action, create an action named 'alertd' to run the CLI command "fn top -bn 25", which will be executed 25 times when the trigger occurs.
Create the automation stitch: Under config system automation-stitch, link the trigger and action.
Run the following commands on FortiSwitch to ensure proper monitoring:
config system global
diagnose debug console timestamp enable
Monitoring:
Then, remove the automation stitch and trigger:
config system automation-trigger
config system automation-action
|
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 2024 Fortinet, Inc. All Rights Reserved.