Overview
In some isolated situations, you may be noticing that you are running out of space in your Kerio Control installation, and upon closer inspection, you find that the 70gfiagent.log file has increased beyond the maximum file size set in the UI.
Solution
This behavior is currently expected since the 70gfiagent.log file captures the stdout directly from gfiagent process which does write everything to the stdout pipe.
The development team has determined that the behavior above has to be evaluated by our product management team before a feature can be implemented into the product, that would prevent it from happening.
In the meantime, in order to workaround this behavior, you can follow the below steps on every Kerio Control installation where you notice this behavior:
- Log in to Kerio Control using SSH: Accessing Kerio Control's Shell Using SSH
- Execute the following command to switch the disk to read-write mode:
mount -o rw,remount /
- Use the
nano
command to create a cronjob file:nano /etc/cron.d/emptygfiagentlog`
- Create the file with this content:
SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc MAILTO="" 00 01 20 */3 * root cat /dev/null > /var/log/70gfiagent.log
This cron job will trigger at 01:00 on day-of-month 20 in every 3rd month. You can further fine tune the cron to your requirement using the Crontab Guru website. - Save the file by pressing CTRL+W and reboot Control:
/etc/boxinit.d/60winroute restart
Summary
This article provides a workaround for managing the 70gfiagent.log file size in Kerio Control system. The solution involves creating a cronjob to automatically clear the log file size periodically.
FAQ
-
What is a cronjob?
A cronjob is a time-based job scheduler in Unix-like operating systems. Users can schedule jobs (commands or scripts) to run periodically at fixed times, dates, or intervals. -
What does the command 'mount -o rw,remount / ' do?
This command switches the disk to read-write mode, allowing you to make changes to the file system. -
What does the command 'nano /etc/cron.d/emptygfiagentlog' do?
This command opens the nano text editor and creates a new cronjob file named 'emptygfiagentlog' in the '/etc/cron.d/' directory.