Skip to main content
edgar1
Staff
Staff
June 6, 2014

Technical Note: How to clear policy counters from CLI

  • June 6, 2014
  • 0 replies
  • 12721 views
Description
This document provides a  procedure from CLI to clear policy counters. Some FortiGate models do not support clear action from GUI.



Scope
All FortiGate units, Firmware 5.0 and above.

Solution
- Connect to FortiGate through SSh or Serial Console and  type the follow commands:

# diagnose firewall iprope clear 00100004 3

idx=3 pkts/bytes=0/0

 

The "groupid" is 00100004, this value is for configurable firewall policies.

The "idx" is the index number of the firewall policy as found  in ID column from  Policy GUI section

You can clear more than 1 counter just adding policies ID. That is:

# diagnose firewall iprope clear 00100004 3 12 48  4

idx=3 pkts/bytes=0/0

idx=12 pkts/bytes=0/0
idx=48 pkts/bytes=0/0
idx=4 pkts/bytes=0/0

Counters from Policies ID 3, 12, 48 and 4 has been cleared.