26

Odp: Qos gargoyle-skrypt

to chyba masz wyłączone qos. daj /etc/.../qos_gargoyle start i wtedy puść to show i show|grep

27

Odp: Qos gargoyle-skrypt

Poszło smile, ale skrypt nie działa u mnie.
root@Gargoyle:~# /etc/init.d/qos_gargoyle show
Egress configuration on eth1
Chain qos_egress (1 references)
pkts bytes target     prot opt in     out     source               destination
    0     0 CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match !0x0 CONNMARK save mask 0x7f
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match !0x0
  358 33255 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK set 0x2
    0     0 MARK       all  --  *      *       0.0.0.0/0            192.168.1.174       MARK set 0x2
    0     0 MARK       all  --  *      *       0.0.0.0/0            192.168.1.111       MARK set 0x3
  357 33215 CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK save mask 0x7f
qdisc hfsc 1: root refcnt 2 default 2
Sent 37448 bytes 370 pkt (dropped 7, overlimits 52 requeues 0)
backlog 0b 0p requeues 0
qdisc sfq 2: parent 1:2 limit 6p quantum 1514b depth 127 headdrop divisor 256
Sent 37340 bytes 368 pkt (dropped 2, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc sfq 3: parent 1:3 limit 6p quantum 1514b depth 127 headdrop divisor 256
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
class hfsc 1: root
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 0 level 2

class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 1000Mbit ul m1 0bit d 0us m2 300000bit
Sent 108 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 351 work 37448 bytes level 1

class hfsc 1:2 parent 1:1 leaf 2: rt m1 280000bit d 20.0ms m2 140000bit ls m1 0bit d 0us m2 500000Kbit ul m1 0bit d 0us m2 140000bit
Sent 38747 bytes 368 pkt (dropped 2, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 349 work 37340 bytes rtwork 37340 bytes level 0

class hfsc 1:3 parent 1:1 leaf 3: rt m1 280000bit d 20.0ms m2 140000bit ls m1 0bit d 0us m2 500000Kbit ul m1 0bit d 0us m2 140000bit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 0 level 0

filter parent 1: protocol ip pref 49151 fw
filter parent 1: protocol ip pref 49151 fw handle 0x3 classid 1:3
filter parent 1: protocol ip pref 49152 fw
filter parent 1: protocol ip pref 49152 fw handle 0x2 classid 1:2
Ingress configuration in imq0
Chain qos_ingress (2 references)
pkts bytes target     prot opt in     out     source               destination
  545  764K IMQ        all  --  *      *       0.0.0.0/0            0.0.0.0/0           IMQ: todev 0
    0     0 CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match !0x0 CONNMARK save mask 0x7f00
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0           mark match !0x0
  549  770K MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0           MARK set 0x300
  548  771K MARK       all  --  *      *       0.0.0.0/0            192.168.1.174       MARK set 0x300
    1    78 MARK       all  --  *      *       0.0.0.0/0            192.168.1.111       MARK set 0x200
  544  762K CONNMARK   all  --  *      *       0.0.0.0/0            0.0.0.0/0           CONNMARK save mask 0x7f00
qdisc hfsc 1: root refcnt 2 default 3
Sent 557362 bytes 400 pkt (dropped 140, overlimits 918 requeues 0)
backlog 7460b 6p requeues 0
qdisc sfq 2: parent 1:2 limit 9p quantum 1500b depth 127 headdrop divisor 256
Sent 78 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc sfq 3: parent 1:3 limit 9p quantum 1500b depth 127 headdrop divisor 256
Sent 558776 bytes 400 pkt (dropped 141, overlimits 0 requeues 0)
backlog 7460b 6p requeues 0
class hfsc 1: root
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 0 level 2

class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 1000Mbit ul m1 0bit d 0us m2 3200Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 19 work 558854 bytes level 1

class hfsc 1:2 parent 1:1 leaf 2: rt m1 0bit d 0us m2 500000bit ls m1 0bit d 0us m2 500000Kbit ul m1 0bit d 0us m2 500000bit
Sent 78 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
period 1 work 78 bytes rtwork 78 bytes level 0

class hfsc 1:3 parent 1:1 leaf 3: rt m1 0bit d 0us m2 500000bit ls m1 0bit d 0us m2 500000Kbit ul m1 0bit d 0us m2 500000bit
Sent 573564 bytes 407 pkt (dropped 140, overlimits 0 requeues 0)
backlog 7460b 6p requeues 0
period 19 work 558776 bytes rtwork 558776 bytes level 0

class sfq 3:af parent 3:
(dropped 0, overlimits 0 requeues 0)
backlog 7460b 5p requeues 0
allot -272

filter parent 1: protocol ip pref 2 fw
filter parent 1: protocol ip pref 2 fw handle 0x200 classid 1:2
filter parent 1: protocol ip pref 3 fw
filter parent 1: protocol ip pref 3 fw handle 0x300 classid 1:3
filter protocol all pref 49152 flow
filter protocol all pref 49152 flow handle 0x1 map keys dst and 0x000000ff divisor 256 baseclass 2:1
root@Gargoyle:~# /etc/init.d/qos_gargoyle show | grep destination
pkts bytes target     prot opt in     out     source               destination
pkts bytes target     prot opt in     out     source               destination
root@Gargoyle:~#

28

Odp: Qos gargoyle-skrypt

Poszło, ale co takiego?
szczerze mówiąc wyczerpały mi się pomysły. Powinien cholera działać hmm

29 (edytowany przez Kamil10p 2012-11-30 17:32:35)

Odp: Qos gargoyle-skrypt

Wysłało komendę zwrotną. Teraz od nowa stawiam firmware na routerze, bo mi w qos jakieś dziwne rzeczy się robiły np ustawiłem maks.pobierania internetu na 1024 a po restarcie wyswietlalało mi 3200...
Dobra, postawiłem wszystko od nowa i teraz o dziwo wartośc krytyczna wynosi 3, qos juz się nie wyłącza samo , ale też nie wyłącza kiedy powinno.
Tak wygląda crontab:
*/3 * * * * /sbin/3gtester
*/1 * * * * /bin/autoqos.sh
0 0,4,8,12,16,20 * * * date -u  +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
A tak skrypt:

#!/bin/ash
#pisany pod AA

#ilosc linii, jaka zwroci polecenie arp przy jednym podlaczonym do routera komputerze
WARTOSC_KRYTYCZNA=3

if [ `cat /proc/net/arp | wc -l` -gt $WARTOSC_KRYTYCZNA ];then
if [ `/etc/init.d/qos_gargoyle show|grep destination|wc -l` -gt 0 ]; then
echo "Qos wlaczone. Status quo"             
else                                                                     
echo "Wlaczam Qos"             
/etc/init.d/qos_gargoyle start
fi                                 
else                                 
if [ `/etc/init.d/qos_gargoyle show|grep destination|wc -l` -gt 0 ]; then
echo "Wylaczam Qos"                                                 
/etc/init.d/qos_gargoyle stop                                       
else                             
echo "Qos wylaczony. Status qou"
fi                                   
fi
(bez tych wcięć mam)
A tak arp | wc -l przy jednym komputerze:
3

30

Odp: Qos gargoyle-skrypt

-gt $WARTOSC_KRYTYCZNA Jak już a nie  -gt $3

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

31

Odp: Qos gargoyle-skrypt

Poprawiłem, ale qos nie wyłącza się..