Fortinet white logo
Fortinet white logo

CLI Reference

statistics

statistics

Use these commands to show, save, clear, and load detailed mail statistics, such as how many email were infected with a virus this month, or how many IBE secure email were sent.

Syntax

diagnose statistics set autoupdate {on | off}

diagnose statistics get {total | all | minute | hour | day | month | year}

diagnose statistics save <file-name_str>

diagnose statistics clear

diagnose statistics load <file-name_str>

diagnose statistics set flat

diagnose statistics set random <email-samples_int> <interval-seconds_int>

diagnose statistics mailstats reset display_name {<user_email> | ALL}

Variable

Description

Default

{on | off}

Select either:

  • on — Update statistics data before displaying it.

  • off — Display statistics data as-is. Due to statistics processing at intervals, if the FortiMail is very busy, the data may be somewhat outdated.

{total | all | minute | hour | day | month | year}

Select which time period of mail statistics to display.

<file-name_str>

Enter a file name.

<email-samples_int>

Enter how many email sample statistics to generate.

This can be useful for demonstration purposes, to simulate the statistics graph in a lab environment before deploying FortiMail.

<interval-seconds_int>

Enter the average interval in seconds between each sample statistic.

{<user_email> | ALL}

Select which display name associations with email addresses to reset in the statistics, either:

  • <user_email> — A specific email address.

  • ALL

Example

FortiMail # diagnose statistics get total

System Time:  2025-05-27 13:42:40 EDT (Uptime: 3d 23h 44m)
Total mail statistics:
First update at 2025-05-01 15:35:04 -0400(1746128104)
Latest update at 2025-05-27 13:42:40 -0400(1748367760)
Latest dump at 2025-05-27 11:03:02 -0400(1748358182)
Anti-Virus(drop/discard)       | 0                   |
CT_UNDEFINED                   |        1072   24    |
...
Session Limit                  | 3486                |
...
Policy Match-AntiSpam          |        56338  6688  |
...
Total(67682)                   | 3487   57483  6712  |

Related topics

system mailserver

policy access-control delivery

policy access-control receive

policy ip

profile antispam

profile antivirus

profile content

profile tls

statistics

statistics

Use these commands to show, save, clear, and load detailed mail statistics, such as how many email were infected with a virus this month, or how many IBE secure email were sent.

Syntax

diagnose statistics set autoupdate {on | off}

diagnose statistics get {total | all | minute | hour | day | month | year}

diagnose statistics save <file-name_str>

diagnose statistics clear

diagnose statistics load <file-name_str>

diagnose statistics set flat

diagnose statistics set random <email-samples_int> <interval-seconds_int>

diagnose statistics mailstats reset display_name {<user_email> | ALL}

Variable

Description

Default

{on | off}

Select either:

  • on — Update statistics data before displaying it.

  • off — Display statistics data as-is. Due to statistics processing at intervals, if the FortiMail is very busy, the data may be somewhat outdated.

{total | all | minute | hour | day | month | year}

Select which time period of mail statistics to display.

<file-name_str>

Enter a file name.

<email-samples_int>

Enter how many email sample statistics to generate.

This can be useful for demonstration purposes, to simulate the statistics graph in a lab environment before deploying FortiMail.

<interval-seconds_int>

Enter the average interval in seconds between each sample statistic.

{<user_email> | ALL}

Select which display name associations with email addresses to reset in the statistics, either:

  • <user_email> — A specific email address.

  • ALL

Example

FortiMail # diagnose statistics get total

System Time:  2025-05-27 13:42:40 EDT (Uptime: 3d 23h 44m)
Total mail statistics:
First update at 2025-05-01 15:35:04 -0400(1746128104)
Latest update at 2025-05-27 13:42:40 -0400(1748367760)
Latest dump at 2025-05-27 11:03:02 -0400(1748358182)
Anti-Virus(drop/discard)       | 0                   |
CT_UNDEFINED                   |        1072   24    |
...
Session Limit                  | 3486                |
...
Policy Match-AntiSpam          |        56338  6688  |
...
Total(67682)                   | 3487   57483  6712  |

Related topics

system mailserver

policy access-control delivery

policy access-control receive

policy ip

profile antispam

profile antivirus

profile content

profile tls