[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] RaQ4 - Site Usage graphs



Richard Abrams wrote on 31.07.2001:

> Should the period covered in the Site Usage report be a 24 hour period or
> greater?

Since the analog-update it should be greater than one day:
endless. If you don't want this behaviour you might try this
shellscript:

-- reset-ftp-mail-web.sh  --
-- snip --

#!/bin/sh

rm /home/sites/site???/logs/ftp.cache*
rm /home/sites/site???/logs/ftp.stats
rm /home/sites/site???/logs/mail.cache*
rm /home/sites/site???/logs/mail.stats
rm /home/sites/site???/logs/web.cache*
rm /home/sites/site???/logs/web.stats

rm /home/sites/site??/logs/ftp.cache*
rm /home/sites/site??/logs/ftp.stats
rm /home/sites/site??/logs/mail.cache*
rm /home/sites/site??/logs/mail.stats
rm /home/sites/site??/logs/web.cache*
rm /home/sites/site??/logs/web.stats

rm /home/sites/site?/logs/ftp.cache*
rm /home/sites/site?/logs/ftp.stats
rm /home/sites/site?/logs/mail.cache*
rm /home/sites/site?/logs/mail.stats
rm /home/sites/site?/logs/web.cache*
rm /home/sites/site?/logs/web.stats

-- snap --


Place the script under /etc/cron.monthly or /etc/cron.weekly
and you'll have monthly/weekly reports now for every site on
your server (tested on RaQ4 and RaQ3 both with the latest
analog-patch).

Don't forget to chmod the script to make it executeable:
chmod 700 reset-ftp-mail-web.sh


> On the plus side, our Usage graphs now seem to be working. They weren't
> before.

Yes.

> I tail'ed some of the site logs a while ago due to a couple of the virtual
> sites running low on space. Any idea's? Help?!

This is a problem of course. On my RaQ I have a shell-script
in /etc/cron.daily:


-- logseintragenaufroot.sh --
-- snip --

#!/bin/sh
chown root.root /home/sites/site???/logs/*
chown root.root /home/sites/site??/logs/*
chown root.root /home/sites/site?/logs/*

-- snap --


This script chown's any logfile to the group "root" instead of
"site[x]". Your customer will have the whole quota just for
his own data - not one byte for logfiles.

HTH
Daniel

PS: please excuse my bad English :-)