+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
*nix Thread, Squid - Log Analysis in Technical; Originally Posted by Geoff There are cron jobs setup by default for daily/weekly/monthly. Your web server folder will be populated ...
  1. #16

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Quote Originally Posted by Geoff View Post
    There are cron jobs setup by default for daily/weekly/monthly. Your web server folder will be populated with reports automagically. The only thing you need to keep an eye on is the amount of reports, I had my proxy die from the hard drive being full of sarg reports once
    Ok, for some reason I haven't got these Cron jobs and therefore I'm not getting fresh logs.

    Can somebody post me their cron jobs for these so I can add them how they should be please.

    Thanks ,

  2. #17

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    as far as im aware the cron just runs the generate.pl script.

    So locate that (on mine its in /etc/webmin/sarg/)

    then just create a cron to run that once a day/week whatever ?

  3. #18

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Quote Originally Posted by RabbieBurns View Post
    as far as im aware the cron just runs the generate.pl script.

    So locate that (on mine its in /etc/webmin/sarg/)

    then just create a cron to run that once a day/week whatever ?
    Thanks, still a bit unsure so could you send me your cron please?

  4. #19

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    as i use webmin it is all configured in there.

    but to create a cron, I would just use nano to create something like this and call it like sarg.sh or something:

    Code:
    #/bin/bash
    perl /etc/sarg/generate.pl
    then chmod +x to make it executable

    and then stick it in the /etc/cron.daily folder.

    Youll need to change it to whatever the location of the generate.pl is for you

    (slocate is a good util i use all the time, if its installed just type "locate generate.pl" and it will show you where it is)
    Last edited by RabbieBurns; 24th February 2009 at 05:03 PM. Reason: to give the .sh file a name

  5. #20

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227
    My mistake, I seem to have this in my crontab instead.

    Code:
    # use /bin/bash to run commands, instead of the default /bin/sh
    SHELL=/bin/bash
    MAILTO="it_support@carrhill.lancs.sch.uk"
    
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
    
    00 08-18/1 * * * /root/sarg-reports today > /dev/null 2>&1
    00 00 * * * /root/sarg-reports daily > /dev/null 2>&1
    00 01 * * 1 /root/sarg-reports weekly > /dev/null 2>&1
    30 02 1 * * /root/sarg-reports monthly > /dev/null 2>&1
    You can get the sarg-reports script here:

    $PAGETITLE

  6. Thanks to Geoff from:

    Hightower (24th February 2009)

  7. #21

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Quote Originally Posted by Geoff View Post
    My mistake, I seem to have this in my crontab instead.

    Code:
    # use /bin/bash to run commands, instead of the default /bin/sh
    SHELL=/bin/bash
    MAILTO="it_support@carrhill.lancs.sch.uk"
    
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
    
    00 08-18/1 * * * /root/sarg-reports today > /dev/null 2>&1
    00 00 * * * /root/sarg-reports daily > /dev/null 2>&1
    00 01 * * 1 /root/sarg-reports weekly > /dev/null 2>&1
    30 02 1 * * /root/sarg-reports monthly > /dev/null 2>&1
    You can get the sarg-reports script here:

    $PAGETITLE
    That's what I was looking for - THANKS!



SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Performance Analysis
    By kiran in forum MIS Systems
    Replies: 1
    Last Post: 24th January 2009, 12:28 PM
  2. Peformance analysis
    By lancaster.david in forum MIS Systems
    Replies: 0
    Last Post: 24th May 2007, 02:17 PM
  3. CMIS Analysis
    By Kained in forum MIS Systems
    Replies: 0
    Last Post: 25th April 2007, 10:41 AM
  4. Format of Squid log time stamp
    By ITWombat in forum Web Development
    Replies: 6
    Last Post: 2nd July 2006, 08:36 PM
  5. Logfile analysis
    By iking in forum How do you do....it?
    Replies: 20
    Last Post: 28th December 2005, 04:54 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •