Debian Lenny: unexpected stops and error script

All languages are allowed, guests are free to write and create topics

Debian Lenny: unexpected stops and error script

Postby RickAr » Thu Feb 25, 2010 6:20 pm

Hi, I wish say you that Webhtb is a amazing helper!!! Congrats Daniel!!!
I have installed Webhtb on Debian Lenny Krnl 2.6.30.1 (added layer7 modules) and really I don't have problems, it works fine...

Only that it have unexpected stops.
It Mean that after I set all NICs, classes, clients and save the QOS and start Webhtb, it runs well... But, after many hours when I check (tc -s class show dev ethx) the service QOS has stopped unexpectedly...

Another: I have set webhtb like service at SO start with chkconfig. But when I had execute chkconfig -a webhtb or when I execute webhtb from command line (/etc/init.d/webhtb), the script show a error message screen: "./webhtb: line 26: unexpected EOF while looking for matching `"' and
"./webhtb: line 30: syntax error: unexpected end of file"

.... However if I runs "chkconfig -l", webhtb remains runs as service on 2 3 4 5 runlevels...

Any idea of all that???
Regards
RickAr
 
Posts: 13
Joined: Thu Feb 25, 2010 5:48 pm

Re: Debian Lenny: unexpected stops and error script

Postby RickAr » Thu Feb 25, 2010 6:45 pm

Add a new question... :P

I have seted the valor of bandwith and rate expressed on kiloBYTE, but when I check it from "tc -s class show dev ethx" the valor appears in BITE...

Please, I'm so confused about this...
What I must setting?
On ROOT, I must setting BITS??? (for ex. 3145128 bits, it mean 3 MegaBITS (NOT BYTES)
On CLASS and CLIENT, I must setting kiloBITS or kiloBYTES???

Please Could you do a issue about this in howto??

Thanks and regards :lol:
RickAr
 
Posts: 13
Joined: Thu Feb 25, 2010 5:48 pm

Re: Debian Lenny: unexpected stops and error script

Postby daniel » Thu Feb 25, 2010 9:06 pm

quetion2 - yes is ok in tc show will see in kbps

question1 - see if you are corect path of "dir", for me are: dir="/var/www/html/webhtb"

try to comment that: touch /var/lock/subsys/webhtb
and that: rm -f /var/lock/subsys/webhtb

the original script are:

[root@server ~]# cat /etc/init.d/webhtb
#!/bin/sh
# description: WebHTB startup daemon
# chkconfig: 2345 99 00

php=`which php`
dir="/var/www/html/webhtb"
startup="startup.php"
shutdown="shutdown.php"

cd ${dir}

case "$1" in
'start')
${php} ${startup}
touch /var/lock/subsys/webhtb
;;
'stop')
${php} ${shutdown}
rm -f /var/lock/subsys/webhtb
;;
'restart')
${php} ${shutdown}
rm -f /var/lock/subsys/webhtb
${php} ${startup}
touch /var/lock/subsys/webhtb
;;
*)
echo "Usage: $0 { start | stop | restart }"
;;
esac
exit 0

that debian are selinux or you use root jail ?

webhtb must be started and stoped as root

try this, go to webhtb dir and if you started before, put this:
php startup.php

see exact:

[root@server webhtb]# php startup.php
WebHTB started on eth0
[root@server webhtb]#

so in xml dir i have only eth0-qos.xml, so if you have many xml`s there webhtb will start qos for all
daniel
Site Admin
 
Posts: 68
Joined: Wed Nov 04, 2009 11:40 am
Location: Medgidia, Constanta, Romania

Re: Debian Lenny: unexpected stops and error script

Postby RickAr » Thu Feb 25, 2010 10:42 pm

quetion2 - yes is ok in tc show will see in kbps


OK, but the tc command (tc -s class show dev ethx) shows in units of bits NOT in kilobits...
My confussion is front the fact that BIT is not same that BYTE and I guess must be very rigorous at setting this valor. My confussion is front the fact that BIT is not same that BYTE and I guess must be very rigorous at setting this valor. So, I ask you precisions about this matter that isn't documented.

-- 1) On ROOT text box "bandwith" and "rate", settings appears for default 1024000. iT'S BITS??? or BYTES??? (i know that this valor I can change it, but is only an example)... What should I calculate, convert (eventually) and set?? BITS or BYTES, and this expressed in KILOBITS OR KILOBYTES??? Or I should make the same that show for default, it say, it setted on units of BITS (1024000 or 2048000 or 3072000... etc) ???

-- 2) On bandwith and rate in CLASSES and CLIENTS: What I must setting ON BANDWITH AND RATE? KILOBYTES or KILOBITS.

Because, if it were set in KILOBITS, and the bandwith of a class or client were, for ex. el 20 % del bandwith of the root (1024000 bits), ON TEXT BOX OF cLASS/CLIENT SETTINGS I should set 204800 BITs, or 204 KILOBITS, or 25600 BYTES, or 25 KILOBYTES ??

question1 - see if you are corect path of "dir", for me are: dir="/var/www/html/webhtb"

try to comment that: touch /var/lock/subsys/webhtb
and that: rm -f /var/lock/subsys/webhtb ...............................


About the quoted above, I'm not sit front to the server Debian now , later I'll check things you ask me.

Thanks for your attention and patient, and congrats for your nice job...
RickAr
 
Posts: 13
Joined: Thu Feb 25, 2010 5:48 pm

Re: Debian Lenny: unexpected stops and error script

Postby daniel » Fri Feb 26, 2010 11:42 am

1024000 meens 1Gb lan card bandwidth, if you use 10/100 change that value

what you see with "tc -s class show dev ethx" not important, unit may be converted

in webhtb for BANDWIDTH and RATE 8 = 1kbps, so any bandwidth or rate value must be multiple of 8, when webhtb parse to TC, that values are converted into kbps, example for default class bandwith become 1 from 8
daniel
Site Admin
 
Posts: 68
Joined: Wed Nov 04, 2009 11:40 am
Location: Medgidia, Constanta, Romania

Re: Debian Lenny: unexpected stops and error script

Postby RickAr » Fri Feb 26, 2010 6:27 pm

... example for default class bandwith become 1 from 8...


Nice solution and very friendly... Thanks...

About "question 1", it's has solved: were a quote and now works nice at SO start.
I have set a copy of webhtb script on /etc/initd, and have sets (with chkconfig) that it start at 2 3 4 5 run levels, and have set on variable DIR="/var/www/webhtb" (in Debian/Apache2 the dir wwwroot default is /var/www, and NOT /var/www/html).
It's well?
RickAr
 
Posts: 13
Joined: Thu Feb 25, 2010 5:48 pm

Re: Debian Lenny: unexpected stops and error script

Postby daniel » Sat Feb 27, 2010 10:35 am

yes, about this i talking
daniel
Site Admin
 
Posts: 68
Joined: Wed Nov 04, 2009 11:40 am
Location: Medgidia, Constanta, Romania


Return to WebHTB

Who is online

Users browsing this forum: No registered users and 1 guest

cron