1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Forcing hard Bandwidht limit?

Discussion in 'Plesk for Linux - 8.x and Older' started by shastacola, Dec 1, 2005.

  1. shastacola

    shastacola Guest

    0
     
    Hello,

    Is there anyway to force a badwidth quota in plesk. I would like to be able to assign a bandwidth and if a user exceeds their bandwidth, it would display some sort of message?
     
  2. ptrost

    ptrost Guest

    0
     
    Wouldn't that be nice! The only thing I know to do is to make an event handler (through the Plesk GUI) to suspend the domain when it reaches it's traffic limit. Customers generally don't take kindly to things like that without advance notice though..
     
  3. Cranky

    Cranky Guest

    0
     
    That's why it should really be handled by a billing system rather than Plesk itself.
     
  4. yurtesen

    yurtesen Guest

    0
     
    How does one do that using the event handler exactly?

    Thanks,
    Evren
     
  5. ptrost

    ptrost Guest

    0
     
    Go to Server -> Event Handler > select Traffic Limit for Domain Reached

    User is root

    Command is:

    "/usr/local/psa/admin/bin/domainmng --turn-off --domain-name=<domain_name>"


    I'm not sure if <domain_name> is the correct parameter or not, but if it is, then when the traffic limit for the domain is excceded, it will trigger the event to turn off the domain name and that command will run with the proper domain name substituted.

    Be sure to change the path to where domainmng is on your server.
     
  6. pdreissen

    pdreissen Guest

    0
     
    I think this is a very bad idea, if you turn off domain it also turns off all e-mail / dns, if you turn it back on, it takes at least 24 hours before domain is propagated to other dns servers (worldwide)

    Better solution is to make use of mod_cband (http://cband.linux.pl/) or equivalent.
     
  7. yurtesen

    yurtesen Guest

    0
     
    I already tried this, it doesnt seem to work. Because domain_name is not a part of the traffic limit reached event.

    Please see:
    http://download1.swsoft.com/Plesk/Plesk8.0/Doc/plesk-8-admins-guide/22819.htm

    Do you know a working way of making this happen?

    Thanks,
    Evren
     
  8. pdreissen

    pdreissen Guest

    0
     
  9. yurtesen

    yurtesen Guest

    0
     
    Yes sorry my mistake, but it doesnt work. Is there any way to do this anyway?
     
  10. ptrost

    ptrost Guest

    0
     
    I'm confused, domain_name is part of "For the event 'Limit on traffic reached for domain'"

    I've never had the need to try this so I'm not sure if it works or not :(
     
  11. yurtesen

    yurtesen Guest

    0
     
    Please check the available templates
    http://download1.swsoft.com/Plesk/Plesk8.0/Doc/plesk-8-admins-guide/22819.htm

    It is not part of limit
    For the event 'Limit on traffic reached for domain' There is not domain_name.

    Domain name
    old_domain_name
    new_domain_name
    required

    Traffic limit
    old_maximum_traffic
    new_maximum_traffic

    There is old_domain_name and new_domain_name but what does old and new mean?
     
  12. pdreissen

    pdreissen Guest

    0
     
    Can be used if you rename your domain for ex. i don't know if these vars are available in all the event manager handlers.

    However as i stated before i think it is a very bad solution to disable your complete domain.

    Please look and search for mod_cband for a nice solution!
     
  13. yurtesen

    yurtesen Guest

    0
     
    Thats right, it is a bad idea. That is why I dont use plesk myself but my friend who is using plesk needs this feature and he doesnt mind that it is a bad idea.

    mod_cband looks interesting but is there any way to integrate it with plesk?

    Also, I still dont get the old domain, new domain concept. New domain should be set somewhere or how can plesk set some domain name into a variable just like that? is the old_domain variable holding the domain name of the domain which passed the limit? is there any documentation about these? something a little bit more detailed?

    Thanks
    Evren
     
Loading...