Webalizer not showing August statistics

dxer

Well-Known Member
Sep 9, 2002
308
0
166
Europe
One client pointed that he can not see August statistics for his site. I went to his cPanel and I see webalizer is showing 12 months statistics and now with July it is 12 months. I went to some other accounts and all are having the same problem, all accounts which are on server longer than 12 months. So what action should I perform to fix this so Webalizer will work further ?

I mean if this is the case in the first place. If Webalizer should provide statistics for more than 12 months in the listing than please tell me what could be the problem and how to fix it.

Thanks
 

dxer

Well-Known Member
Sep 9, 2002
308
0
166
Europe
iCARus said:
Try to run
Code:
/scripts/fixwebalizer <username>
iCARus
But like I already wrote, it seems that August is not present on all accounts on server. So how ti fix webalizer for all accounts.

I tried this what you said but I did not completed this as I received warning that this could erase all webalizer data. I would need solution which could save all previous data and that solution must be for webalizer in general as this is affecting all users. This actually might started after PHPsuexec was installed on my server couple of weeks ago.
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
dxer said:
all accounts which are on server longer than 12 months. So what action should I perform to fix this so Webalizer will work further ?

I mean if this is the case in the first place. If Webalizer should provide statistics for more than 12 months in the listing than please tell me what could be the problem and how to fix it.
Make sure that the cpanellogd process is running on your server.
Go to /usr/local/apache/domlogs/ and see if there are any files over 2GB, or completely blank.
 

chilihost

Well-Known Member
Mar 1, 2005
72
0
156
this happened to me too, I did this to get it fixed:
/scripts/runstatsonce

and then set my stats to run once every 12 hours instead of 24 hours via WHM, tweak settings.
 

rikgarner

Well-Known Member
Mar 31, 2006
74
1
158
/dev/null
Have you checked in Stats config that your server is keeping up with stats processing?

Rich
 

Specks

Well-Known Member
Jul 3, 2004
68
0
156
fixallwebalizer

Here. I scripted a fixall for webalizer using some of the fixwebalizer code. I found a file that I think contains all the user names since it says "trueuserdomains". Took a look at it and saw that it did list all the users and their domains. I'm sure someone will point me to a better file if there is one.

Enjoy.

Code:
#!/usr/bin/perl

use strict;
use warnings;

print "Warning! This will destroy all webalizer data for ALL USERS!\n";
print "Continue with process?(Y/n)";

my chomp($answer = <STDIN>);

if ($answer eq 'n' or $answer eq 'N') {
    exit;
}

open(USER, "< /etc/trueuserdomains") or die "Can't open file trueuserdomains: $!\n";
while (<USER>) {
    chomp;
    my (undef, $user) = split(/:\s/, $_, 2);
    my $homedir = gethomedir($user);
    if ($homedir eq "") {
        print "$user skipped because I can't find the homedir.\n";
        next;
    }
    system("rm -fv $homedir/tmp/webalizer/webalizer.*");
    system("rm -fv $homedir/tmp/webalizer/*.db");
    system("/scripts/runweblogs","$user");
}
close(USER);

sub gethomedir {
    my($user) = $_[0];
    my($homedir);
    open(PASSWD,"/etc/passwd");
    while(<PASSWD>) {
        if (/^$user:/) {
            (undef,undef,undef,undef,undef,$homedir,undef) = split(/:/, $_,  7);
            return $homedir;
        }
    }
    close(PASSWD);
    return "";
}