Loading ...
Sorry, an error occurred while loading the content.

Re: [webalizer] Re: incremental logs not processing

Expand Messages
  • Bradford L. Barrett
    As an alternative method, without invoking the overhead to load the perl interpreter (which is quite large), you can just use ... -- ... -- Bradford L. Barrett
    Message 1 of 5 , Jan 21, 2005
    • 0 Attachment
      As an alternative method, without invoking the overhead to load
      the perl interpreter (which is quite large), you can just use
      the 'date' command, ie:

      > bzcat /mydir/my_log.`date +%Y%m%d -d yesterday`.bz2 | ./webalizer ...

      --

      On Fri, 21 Jan 2005, Dave Patton [DCP] wrote:

      >
      > mlecha wrote:
      > >>For example, you can run webalizer from a shell script
      > >>that is run as a cron job, and do something like:
      > >>------------------------------------------------------------------
      > >># run from our Webalizer directory
      > >>cd /path/to/webalizer
      > >>
      > >># yesterday's log is named my_log.YYYYMMDD.bz2
      > >># logs are bzip compressed
      > >># yesterdayslog.pl is a Perl script that generates
      > >># the name of the logfile for "yesterday"
      > >>bzcat /mydir/`perl ~/yesterdayslog.pl` | ./webalizer -q -c my.conf
      > >>
      > >># example of processing a log manually
      > >># cd /path/to/webalizer
      > >># bzcat /mydir/my_log.20040922.bz2 | ./webalizer -q -c my.conf
      > >>------------------------------------------------------------------
      >
      > > Could you publish ~/yesterdayslog.pl ? I'll need to see how to
      > > generate the filename with the correct date.
      >
      > #!/usr/bin/perl -w
      > # determine yesterdays log filename
      > $year = (localtime(time() - 86400))[5] + 1900;
      > $month = (localtime(time() - 86400))[4] + 1;
      > $day = (localtime(time() - 86400))[3];
      > printf("my_log.%04d%02d%02d.bz2", $year, $month, $day);
      >
      > --
      > Dave Patton
      > Canadian Coordinator, Degree Confluence Project
      > http://www.confluence.org/
      > My website: http://members.shaw.ca/davepatton/
      >
      >
      >
      > Webalizer homepage: http://www.webalizer.org
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      --
      Bradford L. Barrett brad@...
      A free electron in a sea of neutrons DoD#1750 KD4NAW

      The only thing Micro$oft has done for society, is make people
      believe that computers are inherently unreliable.
    Your message has been successfully submitted and would be delivered to recipients shortly.