1 (edytowany przez Kamil10p 2014-08-14 00:16:13)

Temat: Harmonogram QOS

Witam, chciałbym stworzyć sobie harmonogram Qos w następujący sposób:
- skopiować plik konfiguracyjny do folderów slow i fast (nie wiem gdzie się znajduje).
- w cronie ustawić podmianę pliku konfiguracyjnego (nie wiem czy wystarczy copy + ścieżki)
Jeżeli, to co napisałem wyżej nie jest możliwe, proszę o komendy umożliwiające ustawienie w cronie min. i max. pasma dla każdego użytkownika, oraz całkowitego pasma.
Z góry dziękuję za pomoc.

Edit:
OK mam takie coś, będzie działać?
0 0 * * * /sbin/uci set qos_gargoyle.@download[0].total_bandwidth=8000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. min_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. min_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. max_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. max_bandwidth=4000 ; /etc/init.d/qos_gargoyle reload>/dev/null 2>&1
30 7 * * * /sbin/uci set qos_gargoyle.@download[0].total_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. min_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. min_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. max_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. max_bandwidth=2000 ; /etc/init.d/qos_gargoyle reload>/dev/null 2>&1
0 14 * * * /sbin/uci set qos_gargoyle.@download[0].total_bandwidth=8000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. min_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. min_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. max_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. max_bandwidth=4000 ; /etc/init.d/qos_gargoyle reload>/dev/null 2>&1
0 18 * * * /sbin/uci set qos_gargoyle.@download[0].total_bandwidth=4000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. min_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. min_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_1[0]. max_bandwidth=2000 && /sbin/uci set qos_gargoyle.@dclass_2[0]. max_bandwidth=2000 ; /etc/init.d/qos_gargoyle reload>/dev/null 2>&1

2

Odp: Harmonogram QOS

Zrób z tego sobie prosty skrypt i wołaj tej skrypt zamiast umieszczając wszystko od razu w cronie, czytelniej to będzie.

Tak, w taki sposób to możesz zrobić.

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

3

Odp: Harmonogram QOS

Ok, zrobiłem, lecz coś jest nie tak, bo tylko zmieniła się prędkość całkowita. Coś nie tak jest ze składnią polecenia, tylko co?

4

Odp: Harmonogram QOS

Uruchom to z palca i zobaczysz czy przestawiło dane w konfigu. Bo być może nie przestawiasz tego co chciałeś smile

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

5

Odp: Harmonogram QOS

/sbin/uci: Invalid argument

6

Odp: Harmonogram QOS

smile

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

7

Odp: Harmonogram QOS

Pytanie co jest źle...
/etc/config/qos_gargoyle
config upload 'upload'
        option default_class 'uclass_2'
        option total_bandwidth '512'

config download 'download'
        option default_class 'dclass_2'
        option total_bandwidth '4096'

config upload_class 'uclass_1'
        option name 'arek'
        option percent_bandwidth '50'
        option min_bandwidth '250'
        option max_bandwidth '250'

config upload_class 'uclass_2'
        option name 'kamil'
        option percent_bandwidth '50'
        option min_bandwidth '250'
        option max_bandwidth '250'

config upload_rule 'upload_rule_100'
        option class 'uclass_1'
        option test_order '100'
        option source '192.168.1.111'

config upload_rule 'upload_rule_200'
        option class 'uclass_2'
        option test_order '200'
        option source '192.168.1.174'

config download_class 'dclass_1'
        option name 'kamil'
        option percent_bandwidth '50'
        option min_bandwidth '2048'
        option max_bandwidth '2048'

config download_class 'dclass_2'
        option name 'arek'
        option percent_bandwidth '50'
        option min_bandwidth '2048'
        option max_bandwidth '2048'

config download_rule 'download_rule_100'
        option class 'dclass_2'
        option test_order '100'
        option destination '192.168.1.111'

config download_rule 'download_rule_200'
        option class 'dclass_1'
        option test_order '200'
        option destination '192.168.1.174'

I już taka komenda nie działa:
/sbin/uci set qos_gargoyle.@dclass_1[0].max_bandwidth=4000

8

Odp: Harmonogram QOS

uci show qos_gargoyle

i zobaczysz jak się to faktycznie nazywa

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

9 (edytowany przez Kamil10p 2014-08-14 09:16:38)

Odp: Harmonogram QOS

Trzeba było usunąć z polecenia [0] i @ - pytanie dlaczego?
W total_bandwidth z tymi znakami działa...

10

Odp: Harmonogram QOS

Bo to jest sekcja nazwa a nie bezimienna. http://eko.one.pl/?p=openwrt-uci polecam.

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

11

Odp: Harmonogram QOS

Przeczytam sobie, dziękuję za pomoc.