TMPWatch Gui
I'm a system admin of about a dozen WHM/CP servers. I have had an issue where tmpwatch was not clearing out the tmp partition so daily I needed to restart PHP-FPM in order to resolve it. For some reason this has happened on multiple servers where it just doesn't run, I don't know if it's because of updates or something happened in Centos 7.
The issue was resolved by performing the following actions, which would be ideal to have a GUI for within WHM (even just something simple like changing the time interval with a simple drop down).
/scripts/restartsrv_apache_php_fpmThat is the terminal command to restart php-fpm. Also accessible from the GUI.
tmpwatch --mtime --all 168 /tmp
That is the terminal command to clear all files in /tmp that are older than 1 week (24 hours x 7 days). I set that number to 12 instead of 168 to check it every 12 hours.
crontab -e
Adding the tmpwatch command to the crontab using the above command requires a bit of knowledge of vi.
If the tmpwatch command were automatically added to crontab, and there was a simple drop down to choose the interval, it would save a huge ton of time and effort. Thanks!
Replies have been locked on this page!