CBand Help

Discussion in 'HOWTO-Related Questions' started by sf004, Jun 19, 2007.

  1. sf004

    sf004 New Member

    I recently installed mod_cband, following the instructions on the How To Forge. I have the mod installed, I have the global settings in place, and I have something similar to this for all virtual hosts:

    <VirtualHost 192.168.1.4>
    ServerName subdev.servername.com
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/subdev/
    CBandSpeed 1024 10 30
    CBandRemoteSpeed 512 2 5
    CBandLimit 250M
    CBandExceededSpeed 128 5 10
    CBandScoreboard /var/www/cband/subdev.score
    CBandPeriod 30D
    ErrorLog logs/subdev-error_log
    CustomLog logs/subdev-access_log combined
    ProxyRequests Off
    ProxyVia Off
    </VirtualHost>

    I have 7 virtual hosts on this test machine, and I have entered similar Cband entries for each with the CBandScoreboard entry changing for each virtual host. Basically, the CBandScoreboard has a different file name for each virtual host.

    Here is my conundrum. I can visit the virtual hosts, view the separate httpd log files for each virtual host to verify what content was served and the size of the content; however, when I visit the mod_cband status page the total usage is no where near the actual usage from the log files.

    More specifically, I can place 10's of dozens of large images on one of the virtual hosts, view each of the images via the browser, the log file will show 75KB transferred, 895KB transferred, etc. However, when I view the cband status page it shows 2KB usage for the virtual host.

    I have ran this test 15 times with clearing my cache, clearing any server cache (both the test server and my desktop browser are on the same LAN).

    Anyone have any thoughts or suggestions?

    Thanks,
    -Marc
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Are you sure that the 2KB are referring to the traffic? Maybe it's the bandwidth.
     
  3. sf004

    sf004 New Member

    First Falko, thank you SOOO much for responding, seriously. I have been beating my head against the wall with this problem for 10 days and I have posted questions and sent emails to multiple boards, and you are the very first response I have received.

    To answer your question, from my understanding of the status screen, it is the bandwidth. However, I have attached a screen shot in the event I am mistaken.

    [​IMG]

    If you look within the highlighted area, that is the virtual server for which in my original post I pasted the configuration. It shows 7KB under the total column, and that is after I have been actively using the site for two days. From the AWSTATS log, that same virtual server shows 8.7 MB of bandwidth used in the same period of time.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    The highlighted area seems to refer to the traffic, but I'm not sure why it doesn't show the correct amount of traffic. Maybe there's something in Apache's error log? And are you sure you're watching the correct vhost?
     
  5. sf004

    sf004 New Member

    Other thoughts

    ...week three of attempting to get CBand working...

    In the random thought category: does anyone know if the exact version of Apache matters? I am using Apache 2.0.46.61. I am reaching for straws, but it was a thought.

    Falko, to your last post: there are no errors in the httpd error log nor the individual vhost error log. I am also watching the correct vhost, in my most recent test, I stripped the server down to only having one vhost.

    I have even gone as far as to place multiple 1 MB to 20 MB files on the server and download all of them. The vhost access log shows the files, the proper sizes and file:

    "GET /dev/files/testfile.zip HTTP/1.1" 200 3245713 "http://dev.company.net/dev/files.jsp" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3 (MultiLang)"

    In the above example, I d/l'ed a 3.2 MB file; however, afterwards CBand showed 4KB transferred.

    I have attemtped removing CBand, repeating the install, etc. Everything goes smoothly for the install - there are no error, no problems.

    <VirtualHost 192.168.1.3>
    ServerName dev.company.net
    ServerAdmin [email protected]
    ServerAlias dev.company.net
    DocumentRoot /var/www/html/dev
    CBandLimit 250M
    CBandExceededSpeed 128 5 10
    CBandSpeed 1024 10 30
    CBandRemoteSpeed 20kb/s 3 3
    CBandScoreboard /var/www/html/dev/dev.scoreboard
    CBandPeriod 30D
    ErrorLog logs/dev-error_log
    CustomLog logs/dev-access_log combined
    ProxyRequests Off
    ProxyVia Off
    </VirtualHost>


    Also interesting, by my understanding the above config should limit users to 20kbps via the line: CBandRemoteSpeed 20kb/s 3 3. In my most recent d/l tests including the 1MB to 20MB files it allowed the d/l to be at 585kbps.

    It is almost like CBand isn't doing anything.

    Thanks for any feedback or thoughts.
    -Marc
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Which distribution are you using? Just a shot in the dark, but is SELinux enabled on your system?
     

Share This Page