Skip to main content
jie
Staff
Staff
April 7, 2026

Technical Tip: How to manually clean FortiClient EMS event table and data

  • April 7, 2026
  • 0 replies
  • 191 views
Description This article describes how to manually clean the FortiClient EMS event table and data if the GUI option does not work.
Scope FortiClient EMS Linux v7.4.
Solution

If the event table is quite big or it was never cleaned up successfully before, it is possible to show 'Server Error' when trying to manually clear all events in the FortiClient EMS log settings. 

 

2.png

 

Manually clean the event table via command, and the following command can be used.


sudo psql -U postgres -h localhost -d fcm_default -c "VACUUM FULL events;"

 

1.png

 

Completely removing the event table helps if the above command still does not work.

 

sudo psql -U postgres -h localhost -d fcm_default -c "TRUNCATE TABLE events;"

 

1.png

 

Run the below command to check the event table size after the cleanup.

 

psql -U postgres -d fcm_default -h localhost -Atc "SELECT
    schemaname AS schema_name,
    tablename AS table_name,
    pg_size_pretty(pg_total_relation_size(schemaname || '.' || tablename)) AS total_size,
    pg_relation_size(schemaname || '.' || tablename) AS table_size,
    pg_indexes_size(schemaname || '.' || tablename) AS indexes_size
FROM
    pg_tables
WHERE
    schemaname NOT IN ('pg_catalog', 'information_schema','sqitch') and tablename = 'events';"

 

1.png

    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