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.

ftp bandwidth not counted

Discussion in 'General Discussion' started by sehh, Mar 9, 2009.

  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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.
     
  3. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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.
     
  4. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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....
     
  5. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    *bump* anyone? no solutions?
     
  6. heinst

    heinst Registered

    Joined:
    Oct 28, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here ...
    No SMTP/FTP bandwidth usage since end of january.

    This seems to be a recurrent cpanel problem...
     
  7. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    We updated to the latest STABLE which was recently released, no change, ftp bandwidth is still not counted.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Mind if we take a look at your server to see what may be causing this issue? You can have our technical analysts take a look at your server by visiting http://tickets.cpanel.net/submit
     
  9. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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.
    .
     

    Attached Files:

    #9 sehh, Apr 14, 2009
    Last edited: Apr 14, 2009
  10. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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).
     
  11. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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: (test@server.com@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 test@userdomain.com 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 test@userdomain.com 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...
     
    #11 sehh, Apr 28, 2009
    Last edited: Apr 28, 2009
  12. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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.
     
  13. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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
     
  14. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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
     
  15. randomuser2

    randomuser2 Member

    Joined:
    Dec 23, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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';
    
     
  16. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    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).
     
  17. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    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.
     
  18. marza

    marza Registered

    Joined:
    Mar 18, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Same problem with 11.25.0

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

    ...

    mr
     
  19. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Please open a support ticket so the problem can be identified and resolved.
     
Loading...

Share This Page