Skip to main content
kcapecchi
Staff
Staff
August 29, 2012

Technical Tip: How to check and reset the policy counter field

  • April 16, 2026 at 12:28 PM
  • 0 replies
  • 13359 views

Description

 

This article describes the CLI commands that are available on FortiOS 3.0 and 4.0 in order to clear statistics per policy.


Solution

 
To show the statistics of policy <policy_id>:

diag firewall iprope show 100004 <policy_id>

For example:

diag firewall iprope show 100004 2
idx=2 pkts/bytes=1732/262451

 
To clear the statistics for this policy:

diag firewall iprope clear 100004 2 

diag firewall iprope show 100004 2
idx=2 pkts/bytes=0/0

Using the new GUI that was introduced in FortiOS 4.0 MR2, it is possible to right-click on the policy and use the 'Clear counters' action instead.

 

iPrope is organized in groups (according to function). These groups are identified by 'group number'. For example: 100004 is the group number for 'all forward policies'.

0010000a is the group number for multicast polices. For example:

 

diag firewall iprope show 0010000a 1

 

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT