Wish to know how to change default reporting time for SARG.
Currently SARG generates a report for previous day Internet useage at 3:00PM EST. How can SARG's report generator be edited to generate the daily report at a different (earlier) time?
Logged In: NO
I am not very experienced with Linux as a whole but have been messing around with squid and sarg. I could not figure out how to change the time either but I did find some sources that show you how to edit the crontab file to schedule and event to generate a report.
If you read through the sarg.conf file the syntax's that have been commented out are quite helpfull.
Using sarg -d you can generate a report with a start date and an end date
Eg: sarg -d 11/04/2008-12/04/2008
this will generate a report from 11th to the 12th of April 08
The logs are all in your squid. So even if you delete all the folders that are created on the default httpd folder, where your html files are dropped, it does not make a difference. Cus you can always generate another report to your liking.
I don't know if this helps.
The report is likely generated by a cron job. The shell script to do that may be in /etc/cron.daily or /etc/cron.d.
All the scripts in cron.daily are run once a day by an entry in /etc/crontab or by anacron (see /etc/anacrontab) if it is installed and the server was down at the time specified by /etc/crontab. You may consider changing the entry in /etc/crontab but be sure it doesn't break any other application. Cron jobs are usually run early in the morning because servers have more spare time at that time of the day.
If sarg is run by a shell script in /etc/cron.d, edit the file to change the time to run the command. I cannot explain here how to do it. Refer to a cron manual.