abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Hi, I have intermittently a critical alert by mail indicating that root directory "/" is full at 95% , and when I launch the "df-h" command , I found it decreased at around 87%.
this is happening at the same time-slot, i'm suspecting some cPanel temporary files that are put somehow in root directory and deleted afterwards.
Here is my actual partition :

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 39G 34G 5G 87% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 969M 61M 858M 7% /boot
/dev/sda7 376G 122G 236G 35% /home
/dev/sda6 4.7G 2.5G 2.0G 56% /tmp
/dev/sda3 29G 18G 9.8G 65% /usr

Would you please advice what files could I remove safely in root "/" so I can empty more space ?

Thanks in advance.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
It really depends on what is consuming space in / you would need to identify that first. Typically I do something like the following:

Code:
cd /
du -h --max-depth=1
And drill down into the directories that are the biggest from there.
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Thanks Lauren , I go throw subfolder and found thoses two files eating ~10G inside /var/cpanel

4746948 eximstats_db.sqlite3
4856236 eximstats_db.sqlite3-wal

Are both files required? Is it safe to remove "-wal" or at least move it to another partition ?
 

abdelhost77

Well-Known Member
Apr 25, 2012
116
2
68
Morocco
cPanel Access Level
Root Administrator
Thanks Lauren,

The actual size is still enormous even if with 1 day exim stat retention:
4754268 eximstats_db.sqlite3
4864868 eximstats_db.sqlite3-wal

Did I miss something? Is there a way to reset stats ?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
I agree with you it is really large. To confirm you modified WHM>>Server Configuration>>Tweak Settings -> The interval, in days, to retain Exim stats in the database to 1?

How much mail are you sending daily? I keep mine for 10 days and I barely use 7MB - short of not retaining eximstats in this instance I'm afraid there's not a lot that could be done.

optimize eximstats is a script we do have present which will vacuum the database:

Code:
[[email protected] cpanel]# /scripts/optimize_eximstats --help

NAME
    scripts::optimize_eximstats

SYNOPSIS
        /usr/local/cpanel/scripts/optimize_eximstats

DESCRIPTION
    This script is used to vacuum (defragment) the eximstats database.
You might try this to see if there's any change?