Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

TMPWatch Gui

Brendan Carr shared this idea 13 months ago
Needs Review

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_fpm
That 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!

How-to clean your /tmp directory with tmpwatch – cPanel

Leave a Comment
 
Attach a file