Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2005
    Posts
    2,166

    Question recovering stats with Webalizer

    Something happened on my server which caused Webalizer to lose 10 months of previous stats. However, I was able to recover the html, png files associated with those months. The index.html file inside /tmp/webalizer shows stats for only May 2005.

    My question is could I simply edit the index.html file to include links to the html files for the previous months? Here's the code inside that file:

    Code:
    <TR><TH ALIGN=left ROWSPAN=2 BGCOLOR="#C0C0C0"><FONT SIZE="-1">Month</FONT></TH>
    <TH ALIGN=center COLSPAN=4 BGCOLOR="#C0C0C0"><FONT SIZE="-1">Daily Avg</FONT></TH>
    <TH ALIGN=center COLSPAN=6 BGCOLOR="#C0C0C0"><FONT SIZE="-1">Monthly Totals</FONT></TH></TR>
    <TR><TH ALIGN=center BGCOLOR="#008040"><FONT SIZE="-1">Hits</FONT></TH>
    <TH ALIGN=center BGCOLOR="#0080FF"><FONT SIZE="-1">Files</FONT></TH>
    <TH ALIGN=center BGCOLOR="#00E0FF"><FONT SIZE="-1">Pages</FONT></TH>
    <TH ALIGN=center BGCOLOR="#FFFF00"><FONT SIZE="-1">Visits</FONT></TH>
    <TH ALIGN=center BGCOLOR="#FF8000"><FONT SIZE="-1">Sites</FONT></TH>
    <TH ALIGN=center BGCOLOR="#FF0000"><FONT SIZE="-1">KBytes</FONT></TH>
    <TH ALIGN=center BGCOLOR="#FFFF00"><FONT SIZE="-1">Visits</FONT></TH>
    <TH ALIGN=center BGCOLOR="#00E0FF"><FONT SIZE="-1">Pages</FONT></TH>
    <TH ALIGN=center BGCOLOR="#0080FF"><FONT SIZE="-1">Files</FONT></TH>
    <TH ALIGN=center BGCOLOR="#008040"><FONT SIZE="-1">Hits</FONT></TH></TR>
    <TR><TH HEIGHT=4></TH></TR>
    <TR><TD NOWRAP><A HREF="usage_200505.html"><FONT SIZE="-1">May 2005</FONT></A></TD>
    <TD ALIGN=right><FONT SIZE="-1">5959</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">3517</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">1327</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">335</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">1118</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">2208172</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">1006</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">3981</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">10551</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">17879</FONT></TD></TR>
    <TR><TH HEIGHT=4></TH></TR>
    <TR><TH BGCOLOR="#C0C0C0" COLSPAN=6 ALIGN=left><FONT SIZE="-1">Totals</FONT></TH>
    <TH BGCOLOR="#C0C0C0" ALIGN=right><FONT SIZE="-1">2208172</FONT></TH>
    <TH BGCOLOR="#C0C0C0" ALIGN=right><FONT SIZE="-1">1006</FONT></TH>
    <TH BGCOLOR="#C0C0C0" ALIGN=right><FONT SIZE="-1">3981</FONT></TH>
    <TH BGCOLOR="#C0C0C0" ALIGN=right><FONT SIZE="-1">10551</FONT></TH>
    <TH BGCOLOR="#C0C0C0" ALIGN=right><FONT SIZE="-1">17879</FONT></TH></TR>
    <TR><TH HEIGHT=4></TH></TR>
    Another issue might be the numbers, totals for each month, and the aggregate total. I'm not sure whether Webalizer will fix/update any the numbers during the next run if I edit those totals now. If it doesn't, then the numbers will always be off and create inaccurate summaries. Lastly, do I have to do anything with the webalizer.current file? Cheers.

  2. #2
    Join Date
    Dec 2004
    Posts
    223
    Hello,

    If cpanel isnt dispaying webalizer stats for the all other months but the current month, then its probably because, only the current month is listed in webalizer.history file in /tmp/webalizer/.
    You may want to edit this history file and add the other eleven/10 months details(it is actually one line corresponding to each month). You can get the other months' entries from the latest backup of webalizer.history.

    It had solved for me many times Let me know if it helps you too..

  3. #3
    Join Date
    Jan 2005
    Posts
    2,166
    My latest backup of webalizer.hist shows only one month. The numbers in the webalizer.hist file shows stats for the "Monthly Totals" only, missing the "Daily Avg." stats. I'm pretty sure the index.html file needs to be modified to make it show stats for the previous months.

  4. #4
    Join Date
    Dec 2004
    Posts
    223
    Hello,

    Does the webalizer.hist file has all the months total values in it? Or just the current months? In that case you definitely need to add the other months values.. may be from any backup taken on this month. It should look something like this:
    ............
    2 2005 3073 1959 19 59668 9 28 455 59
    3 2005 9991 2652 43 49812 1 31 776 94
    4 2005 19291 8150 88 168685 1 30 2325 148
    5 2005 6046 4071 59 31951 1 30 600 113

    And in the index.html page, you will have to add tags for all the other months.. like:
    ---------------------
    <TR><TD NOWRAP><A HREF="usage_200504.html"><FONT SIZE="-1">Apr 2005</FONT></A></TD>
    <TD ALIGN=right><FONT SIZE="-1">643</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">271</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">77</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">4</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">88</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">168685</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">148</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">2325</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">8150</FONT></TD>
    <TD ALIGN=right><FONT SIZE="-1">19291</FONT></TD></TR>
    -----------------

    You can get this from any backup taken in this month.

  5. #5
    Join Date
    Jan 2005
    Posts
    2,166
    The webalizer.hist file only contains values for May 2005:

    Code:
    5 2005 170936 104860 7989 18913504 6 30 66614 15673
    The backup file doesn't contain the values for the previous months And, will those numbers (inside index.html) such as "Totals" add up correctly the next time Webalizer updates?
    Last edited by HD Fanatic; 05-31-2005 at 02:43 AM.

  6. #6
    Join Date
    Dec 2004
    Posts
    223
    Do you have server access to run /scripts/runweblogs? Then you can run and see.. But I dont think it will update the previous month details in webalizer, coz it is taken from apache's domlogs file and that should be cropped by now.
    You can try running the script and see if it is updating. Do let me know if it works..

Posting Permissions

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