Bandwidth Usage in WHM No Longer Works?

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Can someone tell me how to fix this? It hasn't worked for several months? I'm currently running WHM 10.8.0 cPanel 10.8.2-S120.
 

innovative2001

Active Member
Jun 5, 2006
29
0
151
Hello Jeff,

Kindly explain regarding your issue that whether you want to stop browsing for the exceeded bandwidth or anything like not working proper ?
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I just want to be able to see how much bandwidth my clients are using. It used to work up until about 4-5 months ago. When I go into WHM and click on View Bandwidth Usage, it shows 0.00% for each domain and the Xfer column says 0 as well.
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
Make sure the directory /var/cpanel/bandwidth exists
Cpanel writes the bandwidth data in this directory.

Make sure your /var partition isn't full
df -h command will show drive space used
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
The directory is there and I just have one partition so disk space isn't a problem. I checked one of the files and here's part of what it contained:

01.2004=43098700524
01.2005=34867278193
01.2006=6201451005
02.2004=37323346184
02.2005=30710625992
02.2006=4049915328
03.2004=40376369600
03.2005=40255751364
03.2006=10289418273
04.2004=40509525256
04.2005=38774329462
05.2004=39545005669
05.2005=34309843622
05.2006=7324935957
06.2004=33416816906
06.2005=27116144748
07.2004=39404681457
07.2005=26336933553
08.2003=6325434259
08.2004=54599813707
08.2005=36994627283
09.2003=33703303586
09.2004=45804540491
09.2005=38991397492
1..0-all=0
1..0-ftp=0
1.1.2004-all=966832627
1.1.2004-http=966762152
1.1.2004-smtp=70475
1.1.2005-all=842580843
1.1.2005-http=838318590
1.1.2005-pop3=4065077
1.1.2005-smtp=197176
Any other ideas?
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
HTML:
1..0-all=0
1..0-ftp=0
The above lines look odd and might be a problem. Not sure.

Check WHM -> Server Config -> Tweak Settings

Under stats and logs make sure 'Number of days between processing log files and bandwidth usage (default 1, decimal values are ok):' is not set to zero. Make it 1 for every day.

You can try deleting the files in /var/cpanel/bandwidth (move them to a safe place) and see if they get re-created and if the WHM view comes back.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
The setting in WHM was set to 1.

I moved all of the files in that directory to another location so hopefully that will help. (fingers crossed :))
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Unfortunately that didn't work because now none of my sites are listed under the View Bandwidth Usage page. Any other ideas?
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
Looks like the files don't get recreated after you delete them.

/scripts/cleanbw will reset all the bandwidth files and kill/restart cpanellogd.
See if that helps.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I tried running cleanbw and this came up:

No matching processes were found

Any ideas?
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
See if this helps.

do a ps -aux and kill -9 all pids for cpanellogd

run # mysqlcheck -r eximstats

You can process a single domain with /scripts/runweblogs to see if you get any errors.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I ran ps aux but nothing came up for cpanellogd so does that mean it hasn't been running this entire time?

# ps aux | grep cpanel
cpanel 2567 0.0 0.1 3164 2096 ?? Ss 29May06 1:20.48 /usr/bin/stunnel-4.15local /usr/local/
root 28555 0.0 0.0 304 144 p0 R+ 1:36PM 0:00.00 grep cpanel
# ps aux | grep cpanellogd
root 28641 0.0 0.0 304 172 p0 R+ 1:36PM 0:00.00 grep cpanellogd
Running the runweblogs now.

Thanks again for your wonderful help.