The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Webalizer not showing August statistics

Discussion in 'General Discussion' started by dxer, Aug 7, 2006.

  1. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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
     
  2. iCARus

    iCARus Well-Known Member

    Joined:
    Apr 8, 2003
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Try to run
    Code:
    /scripts/fixwebalizer <username>
    iCARus
     
  3. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    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.
     
  4. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    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.
     
  5. chilihost

    chilihost Well-Known Member

    Joined:
    Mar 1, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  6. rikgarner

    rikgarner Well-Known Member

    Joined:
    Mar 31, 2006
    Messages:
    75
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    /dev/null
    Have you checked in Stats config that your server is keeping up with stats processing?

    Rich
     
  7. Specks

    Specks Well-Known Member

    Joined:
    Jul 3, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    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 "";
    }
    
     
Loading...

Share This Page