1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to prosess old log files

Discussion in 'Plesk for Windows - 8.x and Older' started by VagaStorm, Aug 10, 2005.

  1. VagaStorm

    VagaStorm Basic Pleskian

    24
    73%
    Joined:
    Sep 7, 2004
    Messages:
    73
    Likes Received:
    0
    I've had some problems with the statistics tools which I have finaly managed to solve. But now I'd like to get statistics.exe to prosess old log entries to rebuild log statistics for the time when the statistics where not working corecly... Dos anyone know how this can be done?
     
  2. Mr.Incredible

    Mr.Incredible Guest

    0
     
    As far as I know it's impossible - statistics.exe can't process old log files :(
     
  3. vautrain

    vautrain Guest

    0
     
    Does anybody have a workaround for this? I would run awstats.pl by hand, if I knew exactly how Plesk calls it. In fact, I have a script that I can use to run awstats.pl until it "catches up" with the current date. I just haven't been able to figure out how Plesk runs awstats. I'm on 7.0.3, BTW.
     
  4. eara01

    eara01 Guest

    0
     
    If the log files can't be processed, then this begs a question:

    Why have the option to keep them around? If you can keep them around for any length of time, one would think that there would be a way to process them.

    Perhaps someone from SWsoft will read this and shed some light on it for you.
     
  5. JAFO@

    JAFO@ Guest

    0
     
    Log procession feature will be extended in later versions of Plesk, may be it will be possible to reprocess old logs...

    I'm not from SWSoft btw, these folk have told exactly the same I've just told you...
     
  6. vautrain

    vautrain Guest

    0
     
    I opened a trouble ticket with SWSoft on this. I could take care of this myself, if I knew exactly how Plesk statistics.exe calls AWStats to update the reports. Hopefully SWSoft can provide that info to me.
     
  7. jbuts

    jbuts Guest

    0
     
    Actually, old log files can't be processing again.
     
  8. vautrain

    vautrain Guest

    0
     
    Actually, I've done it with custom installations of AWStats. If I could just get someone to tell me exactly how Plesk runs AWStats, I could do it with all my Plesk sites, also.
     
  9. vautrain

    vautrain Guest

    0
     
    I have a solution for this that is working on my Windows 2003 server. It does not use Plesk at all, except to copy the "statistics" directory for a new virtual directory to put the stats pages. It requires:

    Win2003/IIS6
    PHP CLI (included with Plesk)
    robocopy (downloadable from MS/Resource Kit)

    It uses the IIS6 logs, not those generated by Plesk. It works by calling a modified version of iisweb.vbs to output a text csv file of webs, service numbers, and log file locations, and it reads that data into an array.

    Looping through the array, it determines when the last time awstats was run on the site, by attempting to read a date from a data file. It then calls awstats to update the data file(s) for each day between the last time it was run, and the day before the current day. This is how it can process old log files, and "catch up" to the current date. It takes a while to catch up, especially if you turn on DNS lookup. I tried to turn on DNS lookup, and it would have taken several days to catch up all the sites on my server (about 150 sites). I turned it off.

    It then checks for the physical directory and icons where the static pages will be stored, and creates them if they don't exist, tries to create the virtual directory. Finally, it outputs the static report pages.

    I also have a version that outputs data files for CGI (I have to use a slightly different conf file). Some of my clients need the CGI version.

    Email me if you want the files. Most of the code is not commented, but it's not difficult to follow, if you're familiar with basic scripting, and you're familiar with awstats. I can't offer any warranty or support, but if I can make it work, a monkey should be able to make it work. :)

    will at hansoninfosys dot com
     
Loading...