Welcome! Log In Create A New Profile

Advanced

Nginx_client has masses of files, should a cron job clean it daily?

Posted by Sicilian 
Nginx_client has masses of files, should a cron job clean it daily?
March 13, 2013 09:45PM
Over a year ago we had someone install Nginx on our dedicated server that hosts quite a busy Forum.

Cut a long story short I've found the nginx_client has masses of files in the directory.

At the moment I'm trying to empty the directory via terminal: -


root@server [~]# cd /home
root@server [/home]# ls
./ .cpan/ cpeasyapache/ munin/ oeallian/
../ .cpanm/ cpins/ MySQL-install/ quota.user*
aquota.user* .cpcpan/ lost+found/ nginx_client/ worldsat/
root@server [/home]# cd nginx_client
root@server [/home/nginx_client]# rm -rf ./*

The above has been now running for four hours and still not emptied the directory.

I briefly spoke to the guy who installed Nginx (who's not being very helpful now) he tell's there was a cron job in place to clean the directory.

I remember when the guy installed nginx he had to put nginx_client directory in /home, due to it filling /tmp to fast, so I think the cronjob was never setup correctly.

Crontab has the following: -

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

I've found tmpwatch in /etc/cron.daily

flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
-X '/tmp/hsperfdata_*' 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 720 "$d"
fi
done

I'm no expert coder and am very lost with this. Cleary the above is not going to empty /home/nginx_client.

Please can anybody help me empty the directory nginx_client faster, at the moment its taking hours and still not empty. Also please help me with the correct cron command to clean it daily.

Thank you in advance.
Re: Nginx_client has masses of files, should a cron job clean it daily?
March 13, 2013 09:53PM
I've done some more investigation and now not even sure if the guy who originally installed Nginx removed it at a later date. If I do 'top' command I see no nginx process running at all.

Going by this site http://library.linode.com/web-servers/nginx/configuration/basic there should be nginx configuration in /opt/, but there is not.

How can I check if the nginx_directory was just been left over?
How can I check if nginx is still installed or not?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready