sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
I noticed that some of our clients who use their hosting plan as an FTP-only storage space, have zero bandwidth usage!!!

I logged into their cPanel (Logs->Bandwidth), confirmed that their bandwidth for FTP traffic is zero in all the graphs.

Interestingly, below the graphs, there is a detailed analysis and FTP bandwidth is about 1GB per month, but that still doesn't reflect the truth (client does about 1GB in ftp traffic per week).

We are using the latest STABLE of cPanel/WHM.

Any help would be appreciated.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Which FTP daemon are you using? Are you looking at the incoming, out-going or both?

We recently overhauled the bandwidth reporting in EDGE, we'll double check the FTP stats however.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
We are using pure-ftpd (from latest STABLE branch).

I can't say for sure if its in/out bandwidth, the FTP bandwidth graph is completely empty! On the vertical scale it goes from 0.0 to 1.0 and on the horizontal scale it reports weeks, like "Week 10, Week 11" etc. The entire graph is empty, not a single dot or line.

I checked the past 12 months just to make sure, they are all empty.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
We've got another client who only uses FTP and Email in his hosting plan, i checked the past several months of their bandwidth statistics, and guess what!!! FTP is not counted, as well as SMTP traffic.

All the graphs for FTP and SMTP are completely empty, the only graph that has data is for POP3 (i know his client doesn't use any other services, so HTTP and IMAP are empty as they should be).

Interesting... so SMTP is also a problem....
 

heinst

Registered
Oct 28, 2005
4
0
151
Same problem here ...
No SMTP/FTP bandwidth usage since end of january.

This seems to be a recurrent cpanel problem...
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
We updated to the latest STABLE which was recently released, no change, ftp bandwidth is still not counted.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
Due to a stupid manager, we have a policy that the servers aren't to be accessed by 3rd parties. So I'm not supposed to let cPanel tech support access to fix the problem.

Is there some other way we can solve the problem?

I've attached an example report from cPanel bandwidth page, it shows how everything is properly counted except ftp, its always zero. Same with the line graphs. Note, that IMAP is not being used by this client so ignore it completely.
.
 

Attachments

Last edited:

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
I'm trying to debug this by hand, so far i've found out that pure-ftpd.conf is saving bandwidth statistics under the file:

/usr/local/apache/domlogs/ftpxferlog

Unfortunately, that file is 0 bytes, which probably means that the problem is with the ftp daemon and not cPanel, but i'll have to run some more tests to make sure (its possible that the last log run reset the file).
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
here is an update on the above observation:

1) /var/log/messages correctly reports the ftp login and ftp upload/download with amount of bytes transfered:

Apr 29 04:43:35 server pure-ftpd: ([email protected]@xxx.xxx.xxx.xxx) [NOTICE] /home/userdomain/public_html/test//image.png uploaded (24046632 bytes, 91.33KB/sec)

2) /usr/local/apache/domlogs/ftpxferlog correctly reports the file transfer as well:

Wed Apr 29 04:43:35 2009 257 xxx.xxx.xxx.xxx 24046632 /home/userdomain/public_html/test/image.png b _ i r [email protected] ftp 1 * c

3) /usr/local/apache/domlogs/ftp.userdomain.com-ftp_log also reports the same after a few seconds:

Wed Apr 29 04:43:35 2009 257 xxx.xxx.xxx.xxx 24046632 /home/userdomain/public_html/test/image.png b _ i r [email protected] ftp 1 * c

4) /var/cpanel/bandwidth/userdomain-ftp.rrd is interesting, because its last modification date is in 2007 !!!!

Thats about it, the counters in cPanel Bandwidth page is still zero and hasn't counted any of the above, even after re-running the "process statistics" from WHM.

Maybe the problem is in cPanel after all...
 
Last edited:

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
My investigation continues, i looked at the bandwidth monitor that cPanel uses, its a script called "bandmin" which apparently has disappeared (domain is dead, etc). The script saves bandwidth counters under /var/log/bandwidth/ and uses IP addresses to separate them.

Looking at the bandmin files, i see something like this:

xxx.xxx.xxx.xxx-all-in=983204
xxx.xxx.xxx.xxx-all-out=3670725
xxx.xxx.xxx.xxx-icmp-in=0
xxx.xxx.xxx.xxx-icmp-out=0
xxx.xxx.xxx.xxx-tcp-in=974001
xxx.xxx.xxx.xxx-tcp-in-110=0
xxx.xxx.xxx.xxx-tcp-in-25=0
xxx.xxx.xxx.xxx-tcp-in-80=376
xxx.xxx.xxx.xxx-tcp-out=3670725
xxx.xxx.xxx.xxx-tcp-out-110=0
xxx.xxx.xxx.xxx-tcp-out-25=0
xxx.xxx.xxx.xxx-tcp-out-80=280
xxx.xxx.xxx.xxx-udp-in=9203
xxx.xxx.xxx.xxx-udp-out=0

It is obvious that after the in/out string is the port number and that the ftp ports (20 and 21) are NOT there. I don't know if this is has any real significance.

This is also evident from the configuration file of bandmin /usr/local/bandmin/services.conf:

@SERVICES = ('80', '25', '110');

Which means that bandmin is set to count only those three ports (http, smtp, pop3), imap and ftp are missing.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
My investigation continues, i looked at the bandwidth monitor that cPanel uses, its a script called "bandmin" which apparently has disappeared (domain is dead, etc). The script saves bandwidth counters under /var/log/bandwidth/ and uses IP addresses to separate them.

Looking at the bandmin files, i see something like this:

xxx.xxx.xxx.xxx-all-in=983204
xxx.xxx.xxx.xxx-all-out=3670725
xxx.xxx.xxx.xxx-icmp-in=0
xxx.xxx.xxx.xxx-icmp-out=0
xxx.xxx.xxx.xxx-tcp-in=974001
xxx.xxx.xxx.xxx-tcp-in-110=0
xxx.xxx.xxx.xxx-tcp-in-25=0
xxx.xxx.xxx.xxx-tcp-in-80=376
xxx.xxx.xxx.xxx-tcp-out=3670725
xxx.xxx.xxx.xxx-tcp-out-110=0
xxx.xxx.xxx.xxx-tcp-out-25=0
xxx.xxx.xxx.xxx-tcp-out-80=280
xxx.xxx.xxx.xxx-udp-in=9203
xxx.xxx.xxx.xxx-udp-out=0

It is obvious that after the in/out string is the port number and that the ftp ports (20 and 21) are NOT there. I don't know if this is has any real significance.

This is also evident from the configuration file of bandmin /usr/local/bandmin/services.conf:

@SERVICES = ('80', '25', '110');

Which means that bandmin is set to count only those three ports (http, smtp, pop3), imap and ftp are missing.
FTP should be counted in bandwidth counts. I recommend updating cPanel/WHM to the latest version and if that doesn't resolve the issue to let our technical analysts assist you in this investigation so we can help resolve this issue on your server(s): http://tickets.cPanel.net/submit
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
We are already running the latest STABLE version.

Unfortunately, as i've mentioned above, administration does not allow 3rd parties to access the server.

Can you please tell me what are the correct contents of the file: /usr/local/bandmin/services.conf
 

randomuser2

Member
Dec 23, 2005
23
0
151
Code:
11.24.4-STABLE_35075
CentOS release 5.3 (Final)
Code:
#!/usr/bin/perl -I/usr/local/bandmin
#
#****************************************
#Bandmin (c)1998-2001 J. Nick Koston (BlueDraco)
# - A simple Bandwidth Monitor
#****************************************
#
# Services Config file
#
#            ('www','pop3','imap','ftp','ftp-data','ssh','telnet','smtp','cpanel','whm', 'ircd','mysql');
#@SERVICES =  ('80', '110', '143', '21', '20',      '22', '23',    '25', ,'2082'  ,'2086','6667','3306');
@SERVICES =  ('80', '25', '110');

$PORTDB{80} = 'www';
$PORTDB{110} = 'pop3';
$PORTDB{143} = 'imap';
$PORTDB{21} = 'ftp';
$PORTDB{20} = 'ftp-data';
$PORTDB{22} = 'ssh';
$PORTDB{23} = 'telnet';
$PORTDB{25} = 'smtp';
$PORTDB{2082} = 'cpanel';
$PORTDB{2086} = 'whm';
$PORTDB{6667} = 'ircd';
$PORTDB{3306} = 'mysql';
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
Yup, thats exactly like mine, except I'm running CentOS 4.7

I guess the problem is somewhere else (unless randomuser2 has the same problem as I do).
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Our bandwidth calculation and tracking received an overhaul for cPanel 11.25. These changes are currently in EDGE and will propagate to the other branches as part of cPanel 11.25.
 

marza

Registered
Mar 18, 2009
4
0
51
Same problem with 11.25.0

- no ftp count
- no smtp count
- no mailing list count

...

mr