//����JFIF��� "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777����"����H !1AQ"2aq�B�#R���3b�$Cr�4Ss�����%�Tt&c����$!1AQ"a#2B��?� ��}X����uAo)��8��^�� IƟ�������`v�U�p��9�jY0Ǧw)��E���허2jU`S���EK����w��5]kS������no���!�]���:?j�c����غV7�/��9N+�{����t����#��8zd/��3���F/��=����ź�3��GN����quV��"��/��4:�{���z�%��ۣ�I�'����D@%��8���8^�f}VV��)S_2��e��d�^Mx����"����͟?�U��C6�2��Q�%чm��O͓ ��cq���0r��ŖJ���Õ��_S��ݶ��'�|�G.��q�D��U�����]nP�����%�EF���>˲E�"���d�&�'�f2�s6�H��]�4�w�� I�S˶4�VbaQ+9]X��t�N���x:M0J�Nx�ϙ��⟟"{nr���;|{%�vo�z-wc,�*|���k��}�����-m�5��5o����4�W9ؓ���w�߱�Y�zk�� �.�=��/o�ϡȴ^9���ҧʹa�m��t��QԬZ��]4�?����e���g��jr�Q������}�+)Ml��eE�]��M�P���En������!�`IK2R�UEwVIoͷ�c��p�;����l�ś��e7������΄uN �;����rПV�������8�|��e��9Y-���V_�G���.)X����Ԣ�Ov�<;��_"ڜ�]����ߙ�Er���݊�'K���{Ku��B��J�}K�I��}�2�4|�"�v)/�ʻo�5�����)�������6-Tj����d7�.C�]�Q&lU�,�Yk1�P�4�~U�K�Z�s|�$kX��6��+������屷CU�q��+N�(������j��l���G�rp�G&UB�3#k�39�q�f���g�7�O�8�K�i���m(AJO�O~����C#e`i���0w�Ħ��ij����$�cW�h���<��d�t������Qߺ���"���NO�tG+Z�Ǫ]b�5%�]��v5��$���)�u|q�Z�柡�����s-rۖ�u$MKڎC��mN��_��V'����/�1���u,�2���1�����p��vlc>қ���eN���n��ֺ�|���b�kl��=�l�ǷN�O���ʣl���z���*]��»v���Ȏ��[�)�j�[�fs[]:s��#m6Qt6���*�Q+�������`�};ß�j[F_��jc��v���`����r�#��w���}�|k<�ڞ��/�r53N���8>��Kh����q�_��-��_��??��@���e�n�ſE�ܥ�D�YAE�o+ޟd�}IcY7+t{=ɩ��>�}i�����J�fx�z��VdSz��ᔢ���]Q^C�J�ի��ice���itM�M�5��hڦg'�)�^ ��et#ۯ���"ÿ�fF�->4i���ؤ��2ݷ����6�#�p6�����^-R̫gE�T�j^I���.��k���ӽ�U�p~D9[��:/>��h>�������g�J��|�ۿؘ>m�l���9�jMK���=�+�*2�i=�0�RiͶۗV���{�����"�u]I�H`��9���J_˹���K��ƼK$�X�-�|=v�e/� �������bjx���w����.�9i�%NqV��J��c�F��Y����K�cT�t�O��,�F�;%��6��7��vYb�8֝qq��0���t�U�t�=���D�����va��wsS���~����~Edzr���^F�-v��{c�++ݔ�|9��Iy � �#�nO�����av��OY��=3690��T���c�����r������i�lwa����˓m�$��?�箵S��6��U��� c(��.���~R���7s�u���M��h�q��cM��On�Ko��c���*ȣȩE����d���'��J��ܜk��*�_�q�}%�M��/�7c�����.|;���trddbsd���������cJ�ev�8�5̤�i�W�� �Ę� 8C#.�딖�e$��s��k80���^��J众2���)N�m~|Id��j�����_�� O+6���ǻ��#�(�M�Iz�4Qo��:օ��Y�,�:�q]�̌"��lK�}�{F]��ζ���)���h���>�ʶ� ^�u�e�7�8_G#���rq��v�$���wk�k�[���Q ��c��+վ����+ĸZΝ��F��B���]V�zo���iJRke&�Kg�o����m_7W�ef_7,�o�����sJɽE%��lzB��t>m��R�������s�)v8'��P��0ֲt����rOg4�p_2`��GlhY�ڦD��F/ӚK�m��t�m'P�2�k��qU7��6���5fJ���Y:�y؊.ox���%�8�V�_ִ̌ܞjp��q��w��ЮQ�;�i�U�cNo�O��o�ٸc�Y w�*��4soӵk�q�f�$��?�-��jy�~0�{�>�?Da�L��8�X�L��/�ɞ����o+'�8� {ʸx���գj���#Dy���)wk̘����e��۩+%����}���~;ڼ���5�xek|y-%�ڱ-ʜe:��EE���S��cÚ5z|r'��&�I�&���яF��*��F�7�|�[n�RF��=��(��4�ۖ�@.� �n7@x��x:N��^�8��B<�m�F&�W�=�mt�/�ex����%�Ռm3+2n�����o�;LՅf�w��,So��H�C�ȕ��n���lis&�{&��1��P�<�Ҝ�]>g%u��/���ny6&��d������R�{�?8��U_����Q6��Z߯�-��oh.��N�R��]}� qi6��~H�(����j���7*uF&l&��o8�t���s�]/P�89��:j�W*��$�w���Ӌ�F�x�ps��CJ�i.�������7N ���q4�W�U����_}�7����*M��#�qW�iص��n����k'4ݍ��l���*t^����c�<'d�:��~�͗�e�n�FQR������z�9��v��~������d��d�o�TZ��̚����k7��X���(����w�UswO̙fո�ҁ���Օ[�$��IAI>W���W~Ī��EѢ�Noe�u�t�Yߑ-��E�ix�ι��p�x�q{F�ny�f�R�r�j��q�����U��]>�����wPU�8�)Y-�7W�b�q㛋w:�7�����ܣ]�.����j�%K�:����y�4���] %����9�$���I�%��p�����T(�����V��q�i��Y�ٓ���4y�~5���S/�X��TDZ�M2lȪ��;� ��S��~���K�x�:��(�Mn0�'����;���-{*�qV��&�|W<�rί���7���������� �f;�*Qo�r�4�1�*�/�����3��S+֔a�{��R{�s=�l�Y�m�N����9Fn�&��o�'��}Vi��(� ?*q�V���5��ѼC�Ns��M��饏z��ߴ�$�����^������O6�9��@ ,�$y���|���j�E�;g�W/u|M?3+ZՕ��N������86�����յ��w%|���QO����㏏��S��E#�ddsg�l�+Scl�3�~�~C��ԕQ���ľ�?5�_z���߿t����11�OĶ0�>�oB9E/S����OSk��+�b�&�Yn>���$�����툧�e��g�) �"�!�܉(1 �uB���o�J)��/�t���/��,:�=�7M+1ܺ��#�Cm�S���^Nz� 6[�������u&]+|Dfj:uZ5��-Z�^�Tj����Mtm>���c��ȳ ��N��dT��_,M�#E�x;�pt۴�ͮ�#!���N �iK�l�!�z����Pծ�~$��1����Si��O}�H�I��&g ����Bf����)b��%K�o�̧kum���En�ص��;V�?j>nlt�OM�Vۆ�l�>.W�u��eY��a�w2�+�q���K�,?u��Hiqq�SM�}�~��gu�3����x��bc��W�S���y�/X�c�{%�sZ�]uaU�M;���7�:�����c��b����5�G�9�7'�7�þյW�,�;$ܛ����y�V����j�l��y�7S���;�o���6��g�f��.T�г�[7/�i1��Z^r�E� cUF'�P����1-�?���%���u&����q����{fw�~�27���ޡ ��^w$��?S�w��P[�=R3�Y�7��3� 4��x(K�k�&�r��L�ȫ���MKn�:R�j��c����I?3��Al`�v��ض���[��POĖ�SY�u�j�j6��v��+�-�[x��ҵ��=�~��zNN>�ɲQ�/u�u����f�����o*��e�6�l�����;31붏�.�>�w6=7#7�dFD�c����%�ƶ��T��bd;�2/�=?A�s�r! ~ZS�S~I"���9�y]�Hn�,�Ċ�J7�S��}c��K�"am�Cg3�y��P=�RQ�ɤ�W��}t�;-{F+v�+R���ɔ�ڎ�B?����º������{�SV�묖��k�ۏ�mK~%.��Q;�O�fE�f�_�Y�/�F�-�V���-�M���d�D��)m.Z��Ս��8�Y*��h��[���g�/�6yd���m�Cc[��rdf���ʾ䖗g��d���$^֍�^ʅѻ��L�|<[��݉�����߯�Ri�JU��o���'�;�œN?B� sm�S��ܹk���س,����m���RE��^�ѣl�J&��.�ċ�YO���:������fZ'H�CѯU[��ʩ���1f������f����4S-٥�Y�xT��IGLi��ыr� }L)ed�ׂ�*���l��|�ٚuox�ӿ�nWk�Tb�b���V�mz���T_���'�"x�����5��V�ި������xo1���ج^�F��q6��Sd3����w�s'/ڞ���6�m������?��}�1�O�sR�G�ݝ�+�,�~��ڬ%^��p��1�e�f��5�c���25��v��q~��﹉���ă�������[r�-��e��q]����� ����8+/E���S�j��}?��m����U�E.�x�����Y�K�3"oƔ������^��Y9I��]�I� ޑ"�� &��*4.�J�â�}����ټQb��X��K���J���nc�g�`�+�ri���ܭ��_�'��Bֽ�p����%�b�X�'�7cB�}��W�P������m�|���z�H�ָLJ�h��j���~E>i~���Z�$����297���|�_h���yΕ&�s��}���ZϷ *�j�]:����v.H��K<�SP�8�`�Pƣ)r� �,�}�8W�k[Ar�H��gn=о7:����J]T�T�P>�O���O���j J_��K�y���B���Ԥ��r�m�嬷ȫ�r{�ݙ5R�(FR�Ъ�6���q�}KLm�R�'��e��ޖ��z�6���[Y�ތe�����s�Y��YL5T��r�7�s^�r��ؙ����V�컬��j5<�W����hڥ>d��?yk'�����b���S �}�k�r�a�^ߚ�RH�)�[sg.f��L��M����u�=��v��J�Q]rVkZ����u��o�N���}#G�?y�����jO�%|i��2���f����K��o���Ӱღ�C P_Ϳ6Zr�{���e/m����$i����}9 G��2���')�Y�G����9K�Y>�|����1�ӫ��+�v+i;hQ�@˿L�ӭ���n��˖ ��7�c�k>���Vr�.D0)�h�C����<�˄��4�"0[eԬݭ����e+l�����2s�3s�s��o���X��]��1r��]+�VK� vI��;�mZ'��)�R�6�e5=��/�i���@�]��H�^����Z۬��՝�E�����W.�jƆ���f��{8�m�X�MV���~�_̝���������z^VR}T�6���3}�}�k��3��+k���3�:j�1P��h�l�p��i�{�欍BȽ�}6���w7�3G�t�UZv>4eUj$� xz�$���$�D�/����߇�ߟ�I�"uk��̜�������aƪ���*�ke��/F:d�һ_P������E1������ݡ��k�p(��5��ʏ-ɮ����{Y�llԧ�g�!ܝ �g]i�-�um�εŸxOê^=�P�R##X�e�M��y%�2���L~���Hm ����ݙ2t��_�ƶ�z��7��'Z���4T�<��"�AM��-��&xa�C]�a���5.h�uQ۫�$c�M�μ|h;.�J�.�o�߸���sE�-�z�U{d]��;��|��YLS�MvSE�n�eNK�r�1�B[]�Ne��on�Nߪ$4̘�FPr�k��x�ޱ=�0l����r7Q�%�=�$K�Q�;0r*�XK�dGۃ*�]w-��np�ᬶ���t��t��4�>�D�c�[Ou�o3/����)-��W��Ҵ�xs7��1��e�Ԥm�*ٖ웗H''�.C���nmy�]��݊K���r������a[9)Y�#��2�U���6d7���t�f����.[R.��Gd�E>#���O�_�.+-K����`�{����Ko�nR_��Õ����M/)?�:F��,�Xo�1�ƽ�Rmz�8���C�]l��D��%�(��x�+�d�2��Ah�+����C�CLJ��!���D�65x�����ȼ���v)������Nr����p�*�[Y���ُfL*���PyVΚ��u���W�A�� K��4h�yY��dw��ih���NI�y������#u��b�?4���NDϐ��'�4� :n��F�e(�o��%ve@�@x�l����-k%��Qƭ�RP����&��kεMŪ���-���Ys2�u]�����T!}�8��*���T�Qn��Z}v �=~�mԧ�yD�M���&����8�K�����>��2�|�Bn�u��gܷ��.wvCs���̼�5F^���ubE�S�7ݢ�M&4�Ź�-~m�Kx1�(����(s��r�!M5�u��y��q)�oy|���a��)ˣ����,�A?w"�T�휳2��F}P�R�-<�2��%`�~�4Z�5�W"�(U����S�kG��p�T�(�~Q�����j>ɰ쏳��Ǔ��S��K�Kx'��s��]�nE�f������'.�i�ݙL>�M�oƹ��k�������7ݭ�[.�г��6�lk<;?)#E��]�xF����U�7�'���>vF%���R��;t:��Җ��s�}N�S�B���W�X���=Y8��ث�}�~G��)S�^^�ƽwR[)/Fm�-ڞ��T����K~�˓��Z���]U�;R��Q�=��M��/"�N�ԝP[��-Y9�t_��8�V�+}P������?U�e{M�/�O�&��W��W�K�v�c#�r���'���KM'��p���[±v�tpRC�/W|7�K�2�����������R��f������m;lj��m�%�Z]�^T�����[�6������}6i�TC� }L[u�x��g7�(�Z}���.���S�R���I)jҞ��zȶ�쳢�o�Y����R��w$�ŷ"J�ǭw{u'RtaF{;�3�h�HB���RP����(�*�Z�Q]�y;�;k٥�nWbG��Kv�-V?��ND�Ҟ�k�d��9����@���z�LJ�}K��c��9�C*�?�V-��*[�*�۸�-�0��.���|ߗ���Z�K��#��%�_O�FGF�$k�C��$[�����NNJ�7Yn[k~Xzc�+Sʲ������uh�s�w�^��^4+�n�El�b�Ʈ��K�D���,�}YLV��=�i���=|���p|��_�=b5��m�ȵ(~,�em�����#Xƥ��.���s���V��o��Ea��W�X�c�.l��Y�� u��G�m'��;'*�ӆ���}��|˯�U���fQB���v�o}���/"zw� + qv�Mr���Q[��[��Ad�U���2ٽ��CG�gjؖ�S~Ev����%���9���"��>���$�_2�Sߚ%ѽ��7jX���(�t��#21�r{��̬F����]b�(��)?r��[�Rı)W�[O��/�6��]���X�L��9����v��uLh-�Ȃ9"'7���f���!Փ���䮿B�f}��[la��g�֧��]?P����c#D��9�������E��mf�K7��o*�}��)��+�n�!]qIo�^��FrNVNo�!Eƃ�d�#��OP�?�%ۋ�(m�P��u�����93�ۣ�{��}��2�&�����$�%�c��Z߯�L��ҚY��)�;���Uaf�Զ�d,���*'�6��_?B:R�~��}�^̬�~m�J+v�C}Ѩe�"MY+�mi�����:���s��쥸�;�i��J�e��Y��vBd�deK���|��#5��/m��z�����R]F2J���H��U��U ���)��/S�{���I�����c���$�=: W)>�}��@��0��#URs�R�����=w"��L{�+���ɞ��)�d������|������*qq�2�>��[�nƨDۋ�-�G���[6��½��J���|��������{��Ѿ��4��M��w��y������G���-�ΣZe�{ug>�2�|�'zΤ�2%�x�Ց��*<�<�eu���SO�{T�H�l���o"�T��,ۏfD�E+{&�]v����}��Վ�r��I�|�>�Q�̥T��'��)u�L�����kj�n(z�F-J�O�R}w��n�~F�V5�z�q�2���m�'��^�VS��=7Y^�R��df����eO���)>�E�p�X붚�w����*�r�����*����w˿^������kڴ��{��J��;K�۔���������sR�Ŷ�U]p�zn@dx���6[+y�e�H[�_m������_/��I�&�m��v|M����5&&�-G"v۴�^�{v��g�8���Y�(K�_�~�h��0e�� �Ax��f����r�z�ڬk��h�S/V�y�1ϯ��d�W�3�'��}�{���'V-:����MW(V�/ͷ�*�E�7s����Em������E��W�}�b��Ur����'�k,P�{9?B֫� #[u��N�r����B��,�wo�^{f�d�F(5tRf�.2J����-/:����~� t�0�M"�d_/����c^��32�*�q]yLl���^2�[ݥ�Z�c�*v��tm2��13r'�tSuM-Խ#o�/H�F�������+��2�VEpmǦޟS�?�R������s+�t���:��uG8��n,����Ԛ��f,���hY8�S��X�*��rK�f���>����+c��p��r��u����ɬ=D���Mr��X�gϸ:�~���ɲ ~]�'�5��'�k��Elw�=ڞ��AG&�')�G�9R_���̝1K��;nP�g�&������T(ի[^J�ҟ"qo��Ӹ���.��W}3mF�>��'$��<���U����6�-�~?��x?�B����~{����^�xk��pv-v�l����ߣ�e���빹�j���(�ښsuu6��l�H��(�q��o��aY���t���?�x��8}Ie����� �'����@��b��%�T�ݲ����y�g�V.+O���9/W��4Ms�C�����M��u����F��jYz���G.�{�d���s�.��k�(��>���G~��K�?ni-�=R� r�����}�r���� ?�s�̥���%���l��5Ϛ�9I�N6~��۩�R�ĢW��N�ʾ�E�[��|�nb���.H���Y��קW�k��r�1�ҺշM��N�Dp)�^¸��R���:���w��;�u����1����������12�]��T�/��U�iʹ�d��%���2OC����2�K*r���5�S]g�凫5�� U��Q��.ȫ� �/i91nj��F�k��Q�x�uJ1rn�%���XDžy�?��s˗�վ�uMGƋ�/�m���^�J*��Rs����F�)��)u�F,'l�{=����|�nF�m9:�N%�����u#���t��nXE���-�>e�2Y0�Pũ��������jU��ȨEŭ��|����'��eʹ[��o{��Ց������ms��%CG�g��/}t���|sn�����zr�vm��g�}cÊ94��P��v����g��'<���u�7M�Q�W=fح��ϗd�n����D���|�u�r��-�s����v�,icr�U.ej鷪e�; �+#"�o��w�戾!ȱf�:��S��K�dN>L�}ّ��g�궮Ա������ߢO��^f.��W�����-���sT���]��M���˔��ې��е<^Н�'�Ku�Nn<�FL|Nk��w6_Vl�8��*Kж^ x�s�uW�5���1�-�ᅱ�Fz�ƉT��-k�Y����/9�����w��z�Dޯ/��X�lW)�g�yp�ǚ�j�D�����ɨ~�{ݤ��H�Ci�m�.��[>�rq���E�_Uر��x�/>��|�L6�4%��aj;��fx����ӱ���F���(�K��֓���J��9�՞� �-K>�I�_5En���n��´���&�=O��c%�������o���̟��IJ�ZF$۲��5�I���9Wݚ� �n.��WTu����Ѳ��ӏ[��4�U�/9.���2z��X�5������j���3ĎEsM����q������4�%����9.d�[7�јc9e�N�����a+s�j��E';%��s�#�ɤ`�ףS<��E?�����U�u-_)�j��d���l���/��,��A��}Ω#��q�!�y���*q���r+�V��e��~��}�P���A)No�Kv���Þ�8�[���&3�}��ު=�m�:S��ɥ茍;'PɎ>=�WI쫢.M�v:�����j/��[3���:�rTF_��zt:�.��z%u�d��W%�]xܮVz$�Vŗ�4�9�[^�y.խ�N���~��M�&m�x�+w���G�<��e��캙C�J�Y����*��勱�����o������Q��7$��F�e�Zb��E�[��)J�3j_ �D6d��n�k�y�[s���3z���:���b�K�2�7���.�m��c�JK��-��yG��#�<��o��|Ö�~�� �4���^�O�c�'}�����ap���V&2S��[�X}�����L�3�8F뱩�ص�]q_�E�m�רeٛ�(�u�s����s��sg���[�.�i�,'�h�����p�捗�u;0�x�Kތ_�/�5�Ἵ�#N|�]���O�{O��th��{��f��Kn� ='N�K���%]��ܕ�u�bda�Q�[]U�v�,�v���||*����������<�:c���_XƦ���W3�/�o�����֚_uIF��$����Kx�K&~�#H^o̒Ѯ�'�]��pgq�?ژ��-"90��9����-�����Y��`��ٱck_�Ķ�Z���˶��dz�lk���{���㼷�^���Zw�����K�x}Wg�i��Ųq�>�R�~_4KC[ʻ:v>�0�3߶�v����9x�����-�Mȧ$�c��:l������r�C��Wje����g�%��ֹ�_�Nh�՝���Qɏ���j�^�ϛ�r���^.>��W�h��l��E�5�y���ֵ6�W^�确]*���г����c��&�^��NI��[�����oCDn.�ߑ!�����,m&M_/�'�M�n��$�s�r^��8��|�uSZ���Z1�|L��V<�(���z�q����x����m���ٚZƏ%��.��Ԁ���s^2�𱸒���O#&�,�s��[�mײ9��k���ޖ�C���oS���q&��俙�q�x�P��.��N�]2�U�ǎ�sM2�����i�N.���f����� �r�[��m��cQ��Z�mF�ُ�E{��������#����[TbҔ*s��f�a�S��r���n�^���8�N<����_�'M��arJ6���E�����Q���ғ�|�F[S'[��~q~k��m����n[�_�x?B� �f��5��Q����١�X�=�g(�����~[��Cx}�G�O�ĺ�o��'e)����~���dq(Ot`�����s�N=��~���h�����e�u�:���:�m��'�C�jj�>~5���V����柙c�y�QD%u��q�E��c{[l��^U�O�]b����~e�Ŧ�ۑ'��W3���&�'2��V��.^��D�%��GS�6���wY���NO�$���. �O+�^�ŵG�~haE��s����^=1���*��b�I����C���zFF��4����O�#�,�Wu3허e�k�B���I'tWM��ߩ�OG��3i�������F���z��{rg���e�M�9g� r] ���i��3gk�&u�1r��/��1��k��Vg�R�-ɿu�������F����.�^���;��<��b�����&+˺�x�9B+e�00�W���7�H�af5SQ���x��Ka?X�����IԔz$�܇ȫ&�,��l�y�kȟ�8��Ʀ�B�q����7���G�����oo!���j2"6:��*�uE6�v�{7�U��S�*r�����Se�5|Ll 11a��o&�%�cAľƣTV������<�k���K��>�3��;�?3��큦b�N��̂�r�4��ovMkڞ�}���[:,IV��G�<};*�-�2"���,�>��K��%�bK2�Ƨ[���w��!)�ˤ���;���d?4%�Ul2������ږe�c4�����#��ō������Iw�^R_/TFX�+�����*���F��M[F��|�a�'��������ߚ2S�I�M�eVGn� �~�&���Y��Ym(?��ԛ���]�������,=�|с�G�����4y�j�k"Q�^��~���ԗ^�c��,�q���q����rg��^-����:�U�c[E���8�>��>k�|��n��S�.����.��LBI��c���>3�i��|��ZE����Z��X��A���qm� nuOm<;�� ��X~�mrK�=~� Ʊr���SN<��U!F����W���S��/|���t?K)zd���} ,��C"��ov���x?b�բ�s3�mX3桭�X����֖�˦��k�Fdd����h��g}��$gg�S�o�5��j��L�*N�����dJi�s��$���� �E�����Q������v=0Hxzy��W��~F�T�_��Ƶ�ccg�,<���l7R�O�?S~״�i�6v���/��k�|�̪�.�IIE���]��4��n�,��I��N�U�LϛN=a9t��������Jp������.�]���62�v�ՙ�'�I�d�i�c;Iбo�R�4�|��;��)-����1�卍���뾉)�5�d�뱉�`U����'�R�]۔���l�6s���@��c���h���H)R�t�,w�>&=_�V���������(��%�����k���q+_�÷�O������'�����[_�[Uڽ�v� F� ���$���Ξ9n����5EN���/4�Yy/%*���}�� .����jΔ`�V_6�VͲo���hzfOg�ޯzpj}y�}�v:3��4�WH��;+x�7�ӻu<��ݦ�"�mJ���/�=>�e�o�D֣c�4��k�X�W��-��[��}٬6�;t[N�a�_�� _�5���i5˗�s�ٴ�]+e�����;�Joj�㼶ۙy�Lumo��5�&�F�)F�������� {�(s�m�����_M����>g������z��cr�)�����K�U�̠��Ħ=�����VDd�'��h�;-aŤ�9�����K�ٰ�q��Q�ܫ�ަ���azM�p����4�b���k9 ��U��X.ͮ�]�Ke�S���5Uq[�¹X�0��ɦ6]r����o���Fj��ʧ2���6�/��C6�eQ���E5�K��Ӱ�msFnIz&`�z��팡-��ٯ��.i������xy�ك?����c�2��/��/�z6��������M���4W[�]��_"?���Õ[�?���������Vf�vӳ�q]���I5(�d��|�Mʝ�z���cC*�m�N�>�B2�g�D���+�����><��e�:G�h%U�kW%zJ8���k�_���ˠ=KF�R�����f��w�{sŖ�^��q�/��{�v����[����Ω��}�g�L�j�T[�t�_ޕg6G~���r��k���k�M�cS�R��K�բ����5��4���?SAû����O��1��o%[>��5�/R�~C�io��N���dN�ʛć���h���>�f����6�H8c�/��<�1xd��[ŦC�E��k.�9"��ej?�w&O6^�ژ��R[v��rQ���.�z����㎩��f6:V�8���}����h�i����2�z��~���s�-�w�]+|I9s�_C~>-�S&����9Z�FVL�f�7�-d'���p��ՠp�����l�����J#�mm��؎�s(�?Ʋ?�/A�%_�����s��X�uGN���nR�}_dq>1ʍ�|У��3���]�N�X�YZ��ʷ/&ܛ彖��L�S? 6��]"_�t�5�q��P�5�K�q]�^m�����91�j��W���暹U�����6-5WU������澦M�������0˵��f�2��Ӫ�Ǯ.P~���?� �_nE�J�TcT���ei��)ٳrۣ�%x����%g���s��}7���l9'�t�b���~d���X��st�#� r�?��}W���eaq��>=�+��t�����o)7،��E*�v�n�������e_��,�NF�x�c��i�v��z����]t�M˼���?Oԝ2��Z�r�λ�s-�ĺ��Eton��I�I��f�m��/��9^�[�^�E���B�U��jOn�r�6vI��&�l�]%���0"��)2���䒶-+R��*��z�yX���<�> -���X�9G����Uo^�xY�Q8ι��vi�xٔa�t)�hv}ьո�VU�~��t��������K�,�=�_w����L����L�a?T���YIo�]$`N6c��bi��?#7;M�R�t����<�.��~Q�-��m�o�����b�\g���5���췍�������� ڌ��_?�8nf���J�N�/Y�͢n3���?�_�s�ϩ����{H�i�ְ�Po'yS?���?_�j���ߡ�Wi5q? MW�Ȳ)�����8�a]�l����Lˏ-�-b[TX�lΫRy;�o�5�뜾$H�W.m��m?����շG���[Ƀ�� ���se�o5Q�}���Le����%�*�،«~�u�U{��R$t����^����%�!�w��eX��:G(�'6WupTS&����~�8�������=����j��o?2�������_PϖE�[n��f�6�Tٯ;�G��L��W�)NM�[��o*�j�%.g�b����|��䭹n���o���O�X����:�1�R�)UT�j���7�4˓]D���_�bʝk����zN�I.��9|�^G`Ke��Q���{m��O���jX��/sR�������7�e�vd�g�i7�����q�m�}ތW�&��4�=~���|�YY)�?��7����O�j�}xXkF×4c.l����?�����i|�b�[�5�Ή5�j-�[�Y����z���<���茲�Z$�������Ff&o��;g�Erǩ��ݦ̪/q[&[�/��9u�u���z�i;��������P��S^�_/?������]=�ΕqK~�ӛ����5'N��M�����[�m�_Ϲc'[����oӯE�#g���߂�v�v�GNRo϶�o5Ǩ[�ɉto�v��2��~i<7�i�SȜ�N(G���5����+/�����ٛ�����MTܣ�ukj��鷣/$�1˒!�Mxr��ߤ����s1Z�����uM�Q�Ȍ^�]c$C��X�r�j�����#��N/��˦�Ķ��9���]N�zê5�z�i����;�W,v��!ŧ�D�6z��ğ7�uR5��^�MW}��>igl2���U2�nX��o{}_��������w�]&���vt�e�Z��3�MEEe/ ����2s㗼S�_���bIղ���T�I}�|�[Y��e�/���c]*�̪9u/����Dm�yNxS�D������g�i����`�Z?�.R�F�j����۪���'�~�.�[K�Vb����o��濡�t�o?E�#����[��.�^�y���=��q4���F8ڎ����/���GX.�Y��W!��Z�.��ѕt��t:�?gYYy�U����%��U�w~r����i��>���ȦK��h�g,5�/=�>V��?T�rN�4aW��O�,oӕ���7��-����S���R����i�*"�dܽ�p����u��aV�����QÞ��d-�#J���2Nr�:#�``ѧ�W��R��-�F�?��I-��T��-cO�T�2pr?þ�ז�g�E�I�j���~L9�%�E�MoџU��ؙt8_�eY�ΧW�j�U����}e9y9z/��#��TT-����2��d��L���t3H=���ڼ��cKb'���"�uIٓ'���[�[��߱F~�2]�r�%C�]�^V�����CL��jm���[�cJNr�y�f��}ջ�.[DE�oRՒ��b'>f�Vy���_�c��6�[�K4N�a5>���{ɳ�aw/Uj��.�Զ_K���~���?I�e�J�7�O��Q���x�3�I����gFc���*ج���Ɋǽ-���o��3�Ӭp� �/� ]7V�*���EN�����ܜ[�r/���tO�JΉ���w*ʨ*��J��F�N^.WZe��L�g�U����w��Ki/�M9y8��d�����kOᛊ�H�x�GĶM��*&��#��h��/��U�|�6����D��(�uFyE�5�hYxi�S�EV��m�^D|,ۿC�j�;���<�*��o��uO�kYp�Δ����2{x�-���L�] !k2��ا#I���M���'a7:��M}M1��Y儭�M�n�k�[��/�;����4��U�wk����k�ɫ%����a��ɔo��X�V�V$���m;2Z4i�9:>�����Yů=� ?[��{�t���6,~!���c�`Un��+�dW.g����K��yI�B]��l�+�3�k�ض����(��M�Z�}�>�k����C�~閹l[ů��]VNt�Ƹr몮X�+�U�>�v'��n�v�{y7�s[�г��̭9C�tv���t�%� G�qT��8=�wa���(��������6��Rd柮YWv��^F�d�^�+緉,+=-^��S"�k:N�V�u o�[�_TIѝ�椯�b�F���/G�㿏�dΙ?�T�}�K�������-�T�)W>�s?3M�)V�*����,�;P��,}B u{r��Dex�ڥVFf�w}��47���w}]Դ1d�m��k1��V%/���'T�:���F���ǒ�_TEe[�l���/�l��/�ٯ��c{����Ƀ�[~��`���z�j��⾥r��}V�ܪ{M8�Qv��]$m�U]�8J2�Mngc�xY?�鑞����.9H��jx�S����y.��fS(�|�]��M����gcK�2$(���jR��Q��3��X��O����|<��f�����:J�q�4�&� �fw��|�$��N� )A8�ת99�������mF�NM��*��Dϒ� ��No�I��a9i9�y�?���:�D⻧�߇��7ɧ�����]�������mu��"�-˥5/w̨��_��� �7�DK��[�'�[�2�"��(�%���xzT�*���G�T���"�+<,�yX���.�l����EJr�fo�?��.4�N;l�����>jm�Z�ߣ5���FdB��3�r��,t,./S�]Q{tm���5l��ӕ�����T�~��A� �[��fv7���Iہc��:�� ��ΪN7I]������2(|�o�$��NLW�"��#��~�Dͭ���=v-�Mv{��-lqn{�I3x�n��'��6��.���=�DƟ���ܖަ�~deQV;k�����2�E��i[�b����Ӵ�1_�]����O��h��Zl朠��&�t�3x��k���ei+c'�ZԪ���'�h����K�梿�X����@��cTԫ����#e�m���Iz6e��^i?���8�� ���N��Bc̆�����f����+M��ׇd��C�]��Y���Sd��%��lώ8��-c7��eι/�}��_c�on�/n���o��핍~[WN�R�e�X�Mo��+اn�����?#Ͷ-A����U�FN1V4�!��y���,��{��1��a����$S�﹑�;�Ǚr����"�__��[o�)�� �x��k�}7E�I/�r��iw�ؙ��7�m�R���}�`��|yr�E�Vdo��/B���#uٳi�NQK�Q�kᑑ^d���@��/=ˑɒ�7�����68fsuo�r9=7�ף��ܹ�ճ��p��M�r��-�$1uy���SOZ���N?đrqզ9F� q��=��.!������T��?ػ b��f{¯���q=�$��^�:�!�E�S�߿���� ���FuO���S,8�e��^��U��וS�^h�F����4���BQƺȪw�-��k�F��39�������@X�0��6� F�v=��Q��^��|�ƞ�5}�2tnmG��_��|�����Λ(��|%]��(�-5�>��Kȁ�N���$�=6����l��q).�����1����2� V6m�$ׇl���Oc�ҫܸ� �K{�;ľ>+���Q�?R��x�-K���eu u���������M����y$��i B}G���*���h�$���Q �-��W[�-&��a�"�[i��}~E�k�$�<�~�c{Mff�S� �e�S.��#�^�lMiy�t�ު]���9��S{u��4� {D���FޅS����ź}��R �]���R$y����<��b��;M�5Z�զ`ߕ7��Pm~���Þ�5�C��c"�:���^��D�٧/��d�ݽ��gQ�q�;X��C^��t��F�����|��_�=�p� �[N/���FG�-�K���*�m����0�h�ǯ��Mq�"�QE�6G�R2��EE/��/֨�}V���W��C/3g����8�[�_�#�K�(�sW]����L����eu���L��|�m�-Ml���R�)�ؼ]��|�W��3������x3K�Ϣ�f[W5��cNOvV����������I��N�n�yB�����s���>;r����/P���̙��3n��i�XM�t;����&���!rxw���ZFm�Q"wL�{^۔K&/g�r:�m=���2%�5���������bwE��"��^��e[��$���ɟPi!������U_r����d����S2��d�?=�[!(I�.�r����C� �Q�ZEim�%����}|���Ym�zZ_����ά�<ۡL���QM|��`ybP�����ȏ�}��?�]E�u[`��k�ҫ�g�F��b�~F}Q��8N��P>5���l�ӳ^-�K�%�Q}�$���sx7S�v�n������f�T����Ƹ�|K�zd'_ⰽ�ח�$4���L��Y?q�y32�t� ��j���2�e�� ������Ȝr���J�{mب�h�ۍ��U�U'p�#8�y'ѝ�=�i���+Tĩo7WYyČ�k��L�5؝�M��=�%��"����N�t�}���eXW�)N.~s��v5pɮ s�SQ[���+-�/�}�kVk�'FEɩ�9S�������E&����T�=��&��緵� -���-��t��f��.9Ѳ4�_##�_�ɱ�T�����F����V���؞~��Y�Td�d���S������&s=䟚F��b�1.���_�5���}����~g���M���'p�#,�Uh�s-�-�X�G�w��t�����Թ�Ti��7M:G���Y�K5�'^���W���?��C��>_�G�q��/�S��&d|��k�_g�O� ӊi�Je��H�U G�_Ê�g#),�}�-�:��5�>V��1��em�q}��t}�q?m��e�K����U�:��Bq��JeiP�ɗ#$�sI}��Z生��ƫ�����oo�=�V=pV�cU���g�"%����w��E��m�叡���v��Id����hr���Ȕ����~F]p�58�_�.���,�O�|�'�Ɇ^L��!c��6OWӷ������{x������9�?����F�p�?ceO�u�T�+�Uɵݹ&��gx9���i퓃sx��GI������m}�_3�Ī�r#:�ԣ��?4ב�c[����jö�#��B7K�ʌWNo)�=+c�� �}Yv�P{�lv^�r+��<�i�}���l��k�&ߧY5��Z�ƍ���m�Ŗ���N��Y�9KM�I���d�GOR>�5Vx��x�_���:~=�̌���Q����}CTy+�Wh����鸚f$101뢊�F[#--��Y��i��@����l��)W8��/�E��>�8n��l�j/kt�O��ľ�����,��q*�[s�E��[�]:?�ZeQ����v��Ŕ�ɺ|�j(��Wx����,LW=:�S��?κ��q%8���1c)���jJvO�DLi�W,{96vr�-2��}-��E�H��,����}�%�3k��#l5�g����l~x�_���_W Sڎ �8Y��JQ�vA�=Q���IW��ju��6-��X�9�$�k�WЩ�CI�4�U��W������d��'&O�/C�f���=�P���i�/�#+>���n���$���K�Y�st܅�y4ʷ�D���^~%�~m�yj�,�s_4�Q�}��C����ή;S�W�����:�h=�Ff�{����.��B/in�ȇ���o���=�-�T���O��Y�2}h�l��K}�������.m7-z�?���,f-�/^����b�Q����W��s/���_͔/3I�n��[�6���M;l� �y�gؼ!W���UË_�)D���9����Y�L�4�����_��>f�}ϵ3h�V5����Oѣ��(�l�8�?L�4蹥���������[��-��Э=��7�V{���&�ʢP�������ʼ���*�3�c���Mz>���u��4�@�[�oM���� g�K����S[jy��"����L��ھz�ɵ�f�x)����GE���`ֿ.=k�J>/iˢ[��j�-�qץQ���C B@�o�����V��(��ʯ������G���?B�����ܻ�I���>�=K-��]���.���(�vO�E�.�5�=�/���P��f��^&�$��c�aY�����9{��3�މ�%�Y�O�����xZ�~�6�Z�;�������;�ԗ.�NJ�zş/�YϖĜ%ѿO��^���t�Y$��ν��4|e}2�ɶ��U9A��h˺�L�r�Im%�J�.�|I�]��k�G��|<��j��P��3,�9Uq�7��i�>�DzUk�4'(��T9߱^!z�-:�mW^������ <= �<�^�2�*;����Se���q(��6ª��s��H����f��5ʸO���{��Il�r~G����u�JY^k�5X�_���y���;��5�'�59O@�ƣ�̶>��p�����n��COvN��wX���4�o�����U��Uf����]Џe%�MV�9�X��m�9���]�x�'Q�=���82z�)c�/~1���~�L�S���ow�>�ﺍ�ƻ��U�q���������l~�Sqo����羘s�k���}V�j�G7���1�kY��ؽ��]b��4qnM�ӡ��; �w@̇I��L㿗�����[4�3)]�=�v*)EH���'��a��ҎT�k������x���uXG���K�& Z��I����R���(M8?�:�i�x�Jp��-�d��mck��pu*%N^-7E����3<��uc�>�����='��ce���E�&�'�;��_��J'��M�w��Y9�+�d9����+>���!���e��������_Sn|���VX� �-��TZ�u]��Ģ���/�6�ck�r��/ޗ��/���z��[y.N�:*k�$ �}Yǭ�}GU�m�^-��%d�m�;K��_#c��t�B���[ss�g2�:8r�z���-�VE|���T�w��.�}w9NEP�Gn���oCe�8�/&3�qT�}MJ̙M���ۗ~��哳�,-�WI�_�Bs����h�+~�͛vN����{�Z�����dYK�ݲ�k�����r%�+lo�*r�e�-ه?�:vYqF��fC�s�q�M���XR�ķ{y�q�g�r�x�.�o��Ǔ��x�d���ڗ_Z�C9�W������o��mX|Km��V��_%U�J�ܷr���$��drȳ���L��~Mo�K����yY�L���i�c�J�q�<�1$�U�u�ٯTד374s�<���������ĕ96�춉r9�� ��p��������Gc�9�=�p�^�:)ZJb�&��V�ӝ��Xٽ 0�/���X�& ۳�*_ԙ���Ə.5�J����6<����$��$��6����B0��d�����_��d?h�q���d>X�Ce-� wO�@p�g:�.>$�.Ϣ~L��|,{-ɪ2��.u�/Ds-[ُiVIW��K����5�M#F��ܭ3?x�����.)�ۣ�,�w���J)�Ȳڣ-�#��fbdq&�T�ͧ�8�����Q�,�YqQ�)�/�R��?�k��˔��[��p�_�+�og��z����P��[��6�r��^��o���}�����_��k�T�}J�i��J;���<�ivE������H8�wI�@�MO�P�ʊ�#��+��$��
![]() Server : Apache System : Linux vpshost1491.publiccloud.com.br 4.4.79-grsec-1.lc.x86_64 #1 SMP Wed Aug 2 14:18:21 -03 2017 x86_64 User : aloic1 ( 10003) PHP Version : 8.0.14 Disable Function : apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system Directory : /sbin/ |
#!/bin/bash # # cbq.init v0.7.3 # Copyright (C) 1999 Pavel Golubev <pg@ksi-linux.com> # Copyright (C) 2001-2004 Lubomir Bulej <pallas@kadan.cz> # # chkconfig: 2345 11 89 # description: sets up CBQ-based traffic control # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # # To get the latest version, check on Freshmeat for actual location: # # http://freshmeat.net/projects/cbq.init # # # VERSION HISTORY # --------------- # v0.7.3- Deepak Singhal <singhal at users.sourceforge.net> # - fix timecheck to not ignore regular TIME rules after # encountering a TIME rule that spans over midnight # - Nathan Shafer <nicodemus at users.sourceforge.net> # - allow symlinks to class files # - Seth J. Blank <antifreeze at users.sourceforge.net> # - replace hardcoded ip/tc location with variables # - Mark Davis <mark.davis at gmx.de> # - allow setting of PRIO_{MARK,RULE,REALM} in class file # - Fernando Sanch <toptnc at users.sourceforge.net> # - allow underscores in interface names # v0.7.2- Paulo Sedrez # - fix time2abs to allow hours with leading zero in TIME rules # - Svetlin Simeonov <zvero at yahoo.com> # - fix cbq_device_list to allow VLAN interfaces # - Mark Davis <mark.davis at gmx.de> # - ignore *~ backup files when looking for classes # - Mike Boyer <boyer at administrative.com> # - fix to allow arguments to be passed to "restart" command # v0.7.1- Lubomir Bulej <pallas at kadan.cz> # - default value for PERTURB # - fixed small bug in RULE parser to correctly parse rules with # identical source and destination fields # - faster initial scanning of DEVICE fields # v0.7 - Lubomir Bulej <pallas at kadan.cz> # - lots of various cleanups and reorganizations; the parsing is now # some 40% faster, but the class ID must be in range 0x0002-0xffff # (again). Because of the number of internal changes and the above # class ID restriction, I bumped the version to 0.7 to indicate # something might have got broken :) # - changed PRIO_{U32,FW,ROUTE} to PRIO_{RULE,MARK,REALM} # for consistency with filter keywords # - exposed "compile" command # - Catalin Petrescu <taz at dntis.ro> # - support for port masks in RULE (u32) filter # - Jordan Vrtanoski <obeliks at mt.net.mk> # - support for week days in TIME rules # v0.6.4- Lubomir Bulej <pallas at kadan.cz> # - added PRIO_* variables to allow easy control of filter priorities # - added caching to speed up CBQ start, the cache is invalidated # whenever any of the configuration files changes # - updated the readme section + some cosmetic fixes # v0.6.3- Lubomir Bulej <pallas at kadan.cz> # - removed setup of (unnecessary) class 1:1 - all classes # now use qdisc's default class 1:0 as their parent # - minor fix in the timecheck branch - classes # without leaf qdisc were not updated # - minor fix to avoid timecheck failure when run # at time with minutes equal to 08 or 09 # - respect CBQ_PATH setting in environment # - made PRIO=5 default, rendering it optional in configs # - added support for route filter, see notes about REALM keyword # - added support for fw filter, see notes about MARK keyword # - added filter display to "list" and "stats" commands # - readme section update + various cosmetic fixes # v0.6.2- Catalin Petrescu <taz at dntis.ro> # - added tunnels interface handling # v0.6.1- Pavel Golubev <pg at ksi-linux.com> # - added sch_prio module loading # (thanks johan at iglo.virtual.or.id for reminding) # - resolved errors resulting from stricter syntax checking in bash2 # - Lubomir Bulej <pallas at kadan.cz> # - various cosmetic fixes # v0.6 - Lubomir Bulej <pallas at kadan.cz> # - attempt to limit number of spawned processes by utilizing # more of sed power (use sed instead of grep+cut) # - simplified TIME parser, using bash builtins # - added initial support for SFQ as leaf qdisc # - reworked the documentation part a little # - incorporated pending patches and ideas submitted by # following people for versions 0.3 into version 0.6 # - Miguel Freitas <miguel at cetuc.puc-rio.br> # - in case of overlapping TIME parameters, the last match is taken # - Juanjo Ciarlante <jjo at mendoza.gov.ar> # - chkconfig tags, list + stats startup parameters # - optional tc & ip command logging (into /var/run/cbq-*) # - Rafal Maszkowski <rzm at icm.edu.pl> # - PEAK parameter for setting TBF's burst peak rate # - fix for many config files (use find instead of ls) # v0.5.1- Lubomir Bulej <pallas at kadan.cz> # - fixed little but serious bug in RULE parser # v0.5 - Lubomir Bulej <pallas at kadan.cz> # - added options PARENT, LEAF, ISOLATED and BOUNDED. This allows # (with some attention to config file ordering) for creating # hierarchical structures of shapers with classes able (or unable) # to borrow bandwidth from their parents. # - class ID check allows hexadecimal numbers # - rewritten & simplified RULE parser # - cosmetic changes to improve readability # - reorganization to avoid duplicate code (timecheck etc.) # - timecheck doesn't check classes without TIME fields anymore # v0.4 - Lubomir Bulej <pallas at kadan.cz> # - small bugfix in RULE parsing code # - simplified configuration parsing code # - several small cosmetic changes # - TIME parameter can be now specified more than once allowing you to # differentiate RATE throughout the whole day. Time overlapping is # not checked, first match is taken. Midnight wrap (eg. 20:00-6:00) # is allowed and taken care of. # v0.3a4- fixed small bug in IF operator. Thanks to # Rafal Maszkowski <rzm at icm.edu.pl> # v0.3a3- fixed grep bug when using more than 10 eth devices. Thanks to David # Trcka <trcka at poda.cz>. # v0.3a2- fixed bug in "if" operator. Thanks kad at dgtu.donetsk.ua. # v0.3a - added TIME parameter. Example: TIME=00:00-19:00;64Kbit/6Kbit # So, between 00:00 and 19:00 the RATE will be 64Kbit. # Just start "cbq.init timecheck" periodically from cron # (every 10 minutes for example). DON'T FORGET though, to run # "cbq.init start" for CBQ to initialize. # v0.2 - Some cosmetic changes. Now it is more compatible with old bash # version. Thanks to Stanislav V. Voronyi <stas at cnti.uanet.kharkov.ua>. # v0.1 - First public release # # # README # ------ # # First of all - this is just a SIMPLE EXAMPLE of CBQ power. # Don't ask me "why" and "how" :) # # This script is meant to simplify setup and management of relatively simple # CBQ-based traffic control on Linux. Access to advanced networking features # of Linux kernel is provided by "ip" and "tc" utilities from A. Kuznetsov's # iproute2 package, available at ftp://ftp.inr.ac.ru/ip-routing. Because the # utilities serve primarily to translate user wishes to RTNETLINK commands, # their interface is rather spartan, intolerant and requires quite a lot of # typing. And typing is what this script attempts to reduce :) # # The advanced networking stuff in Linux is pretty flexible and this script # aims to bring some of its features to the not-so-hard-core Linux users. Of # course, there is a tradeoff between simplicity and flexibility and you may # realize that the flexibility suffered too much for your needs -- time to # face "ip" and "tc" interface. # # To speed up the "start" command, simple caching was introduced in version # 0.6.4. The caching works so that the sequence of "tc" commands for given # configuration is stored in a file (/var/cache/cbq.init by default) which # is used next time the "start" command is run to avoid repeated parsing of # configuration files. This cache is invalidated whenever any of the CBQ # configuration files changes. If you want to run "cbq.init start" without # caching, run it as "cbq.init start nocache". If you want to force cache # invalidation, run it as "cbq.init start invalidate". Caching is disabled # if you have logging enabled (ie. CBQ_DEBUG is not empty). # # If you only want cqb.init to translate your configuration to "tc" commands, # use "compile" command which will output "tc" commands required to build # your configuration. Bear in mind that "compile" does not check if the "tc" # commands were successful - this is done (in certain places) only when the # "start nocache" command is used, which is also useful when creating the # configuration to check whether it is completely valid. # # All CBQ parameters are valid for Ethernet interfaces only, The script was # tested on various Linux kernel versions from series 2.1 to 2.4 and several # distributions with KSI Linux (Nostromo version) as the premier one. # # # HOW DOES IT WORK? # ----------------- # # Every traffic class must be described by a file in the $CBQ_PATH directory # (/etc/sysconfig/cbq by default) - one file per class. # # The config file names must obey mandatory format: cbq-<clsid>.<name> where # <clsid> is two-byte hexadecimal number in range <0002-FFFF> (which in fact # is a CBQ class ID) and <name> is the name of the class -- anything to help # you distinguish the configuration files. For small amount of classes it is # often possible (and convenient) to let <clsid> resemble bandwidth of the # class. # # Example of valid config name: # cbq-1280.My_first_shaper # # # The configuration file may contain the following parameters: # ### Device parameters # # DEVICE=<ifname>,<bandwidth>[,<weight>] mandatory # DEVICE=eth0,10Mbit,1Mbit # # <ifname> is the name of the interface you want to control # traffic on, e.g. eth0 # <bandwidth> is the physical bandwidth of the device, e.g. for # ethernet 10Mbit or 100Mbit, for arcnet 2Mbit # <weight> is tuning parameter that should be proportional to # <bandwidth>. As a rule of thumb: <weight> = <bandwidth> / 10 # # When you have more classes on one interface, it is enough to specify # <bandwidth> [and <weight>] only once, therefore in other files you only # need to set DEVICE=<ifname>. # ### Class parameters # # RATE=<speed> mandatory # RATE=5Mbit # # Bandwidth allocated to the class. Traffic going through the class is # shaped to conform to specified rate. You can use Kbit, Mbit or bps, # Kbps and Mbps as suffices. If you don't specify any unit, bits/sec # are used. Also note that "bps" means "bytes per second", not bits. # # WEIGHT=<speed> mandatory # WEIGHT=500Kbit # # Tuning parameter that should be proportional to RATE. As a rule # of thumb, use WEIGHT ~= RATE / 10. # # PRIO=<1-8> optional, default 5 # PRIO=5 # # Priority of class traffic. The higher the number, the lesser # the priority. Priority of 5 is just fine. # # PARENT=<clsid> optional, default not set # PARENT=1280 # # Specifies ID of the parent class to which you want this class be # attached. You might want to use LEAF=none for the parent class as # mentioned below. By using this parameter and carefully ordering the # configuration files, it is possible to create simple hierarchical # structures of CBQ classes. The ordering is important so that parent # classes are constructed prior to their children. # # LEAF=none|tbf|sfq optional, default "tbf" # # Tells the script to attach specified leaf queueing discipline to CBQ # class. By default, TBF is used. Note that attaching TBF to CBQ class # shapes the traffic to conform to TBF parameters and prevents the class # from borrowing bandwidth from its parent even if you have BOUNDED set # to "no". To allow the class to borrow bandwith (provided it is not # bounded), you must set LEAF to "none" or "sfq". # # If you want to ensure (approximately) fair sharing of bandwidth among # several hosts in the same class, you might want to specify LEAF=sfq to # attach SFQ as leaf queueing discipline to that class. # # BOUNDED=yes|no optional, default "yes" # # If set to "yes", the class is not allowed to borrow bandwidth from # its parent class in overlimit situation. If set to "no", the class # will be allowed to borrow bandwidth from its parent. # # Note: Don't forget to set LEAF to "none" or "sfq", otherwise the class will # have TBF attached to itself and will not be able to borrow unused # bandwith from its parent. # # ISOLATED=yes|no optional, default "no" # # If set to "yes", the class will not lend unused bandwidth to # its children. # ### TBF qdisc parameters # # BUFFER=<bytes>[/<bytes>] optional, default "10Kb/8" # # This parameter controls the depth of the token bucket. In other # words it represents the maximal burst size the class can send. # The optional part of parameter is used to determine the length # of intervals in packet sizes, for which the transmission times # are kept. # # LIMIT=<bytes> optional, default "15Kb" # # This parameter determines the maximal length of backlog. If # the queue contains more data than specified by LIMIT, the # newly arriving packets are dropped. The length of backlog # determines queue latency in case of congestion. # # PEAK=<speed> optional, default not set # # Maximal peak rate for short-term burst traffic. This allows you # to control the absolute peak rate the class can send at, because # single TBF that allows 256Kbit/s would of course allow rate of # 512Kbit for half a second or 1Mbit for a quarter of second. # # MTU=<bytes> optional, default "1500" # # Maximum number of bytes that can be sent at once over the # physical medium. This parameter is required when you specify # PEAK parameter. It defaults to MTU of ethernet - for other # media types you might want to change it. # # Note: Setting TBF as leaf qdisc will effectively prevent the class from # borrowing bandwidth from the ancestor class, because even if the # class allows more traffic to pass through, it is then shaped to # conform to TBF. # ### SFQ qdisc parameters # # The SFQ queueing discipline is a cheap way for sharing class bandwidth # among several hosts. As it is stochastic, the fairness is approximate but # it will do the job in most cases. If you want real fairness, you should # probably use WRR (weighted round robin) or WFQ queueing disciplines. Note # that SFQ does not do any traffic shaping - the shaping is done by the CBQ # class the SFQ is attached to. # # QUANTUM=<bytes> optional, default not set # # This parameter should not be set lower than link MTU, for ethernet # it is 1500b, or (with MAC header) 1514b which is the value used # in Alexey Kuznetsov's examples. # # PERTURB=<seconds> optional, default "10" # # Period of hash function perturbation. If unset, hash reconfiguration # will never take place which is what you probably don't want. The # default value of 10 seconds is probably a good one. # ### Filter parameters # # RULE=[[saddr[/prefix]][:port[/mask]],][daddr[/prefix]][:port[/mask]] # # These parameters make up "u32" filter rules that select traffic for # each of the classes. You can use multiple RULE fields per config. # # The optional port mask should only be used by advanced users who # understand how the u32 filter works. # # Some examples: # # RULE=10.1.1.0/24:80 # selects traffic going to port 80 in network 10.1.1.0 # # RULE=10.2.2.5 # selects traffic going to any port on single host 10.2.2.5 # # RULE=10.2.2.5:20/0xfffe # selects traffic going to ports 20 and 21 on host 10.2.2.5 # # RULE=:25,10.2.2.128/26:5000 # selects traffic going from anywhere on port 50 to # port 5000 in network 10.2.2.128 # # RULE=10.5.5.5:80, # selects traffic going from port 80 of single host 10.5.5.5 # # # # REALM=[srealm,][drealm] # # These parameters make up "route" filter rules that classify traffic # according to packet source/destination realms. For information about # realms, see Alexey Kuznetsov's IP Command Reference. This script # does not define any realms, it justs builds "tc filter" commands # for you if you need to classify traffic this way. # # Realm is either a decimal number or a string referencing entry in # /etc/iproute2/rt_realms (usually). # # Some examples: # # REALM=russia,internet # selects traffic going from realm "russia" to realm "internet" # # REALM=freenet, # selects traffic going from realm "freenet" # # REALM=10 # selects traffic going to realm 10 # # # # MARK=<mark> # # These parameters make up "fw" filter rules that select traffic for # each of the classes accoring to firewall "mark". Mark is a decimal # number packets are tagged with if firewall rules say so. You can # use multiple MARK fields per config. # # # Note: Rules for different filter types can be combined. Attention must be # paid to the priority of filter rules, which can be set below using # PRIO_{RULE,MARK,REALM} variables. # ### Time ranging parameters # # TIME=[<dow>,<dow>, ...,<dow>/]<from>-<till>;<rate>/<weight>[/<peak>] # TIME=0,1,2,5/18:00-06:00;256Kbit/25Kbit # TIME=60123/18:00-06:00;256Kbit/25Kbit # TIME=18:00-06:00;256Kbit/25Kbit # # This parameter allows you to differentiate the class bandwidth # throughout the day. You can specify multiple TIME parameters, if # the times overlap, last match is taken. The fields <rate>, <weight> # and <peak> correspond to parameters RATE, WEIGHT and PEAK (which # is optional and applies to TBF leaf qdisc only). # # You can also specify days of week when the TIME rule applies. <dow> # is numeric, 0 corresponds to sunday, 1 corresponds to monday, etc. # ### # # Sample configuration file: cbq-1280.My_first_shaper # # -------------------------------------------------------------------------- # DEVICE=eth0,10Mbit,1Mbit # RATE=128Kbit # WEIGHT=10Kbit # PRIO=5 # RULE=192.128.1.0/24 # -------------------------------------------------------------------------- # # The configuration says that we will control traffic on 10Mbit ethernet # device eth0 and the traffic going to network 192.168.1.0 will be # processed with priority 5 and shaped to rate of 128Kbit. # # Note that you can control outgoing traffic only. If you want to control # traffic in both directions, you must set up CBQ for both interfaces. # # Consider the following example: # # +---------+ 192.168.1.1 # BACKBONE -----eth0-| linux |-eth1------*-[client] # +---------+ # # Imagine you want to shape traffic from backbone to the client to 28Kbit # and traffic in the opposite direction to 128Kbit. You need to setup CBQ # on both eth0 and eth1 interfaces, thus you need two config files: # # cbq-028.backbone-client # -------------------------------------------------------------------------- # DEVICE=eth1,10Mbit,1Mbit # RATE=28Kbit # WEIGHT=2Kbit # PRIO=5 # RULE=192.168.1.1 # -------------------------------------------------------------------------- # # cbq-128.client-backbone # -------------------------------------------------------------------------- # DEVICE=eth0,10Mbit,1Mbit # RATE=128Kbit # WEIGHT=10Kbit # PRIO=5 # RULE=192.168.1.1, # -------------------------------------------------------------------------- # # Pay attention to comma "," in the RULE field - it denotes source address! # # Enjoy. # ############################################################################# export LC_ALL=C ### Command locations TC=/sbin/tc IP=/sbin/ip MP=/sbin/modprobe ### Default filter priorities (must be different) PRIO_RULE_DEFAULT=${PRIO_RULE:-100} PRIO_MARK_DEFAULT=${PRIO_MARK:-200} PRIO_REALM_DEFAULT=${PRIO_REALM:-300} ### Default CBQ_PATH & CBQ_CACHE settings CBQ_PATH=${CBQ_PATH:-/etc/sysconfig/cbq} CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbq.init} ### Uncomment to enable logfile for debugging #CBQ_DEBUG="/var/run/cbq-$1" ### Modules to probe for. Uncomment the last CBQ_PROBE ### line if you have QoS support compiled into kernel CBQ_PROBE="sch_cbq sch_tbf sch_sfq sch_prio" CBQ_PROBE="$CBQ_PROBE cls_fw cls_u32 cls_route" #CBQ_PROBE="" ### Keywords required for qdisc & class configuration CBQ_WORDS="DEVICE|RATE|WEIGHT|PRIO|PARENT|LEAF|BOUNDED|ISOLATED" CBQ_WORDS="$CBQ_WORDS|PRIO_MARK|PRIO_RULE|PRIO_REALM|BUFFER" CBQ_WORDS="$CBQ_WORDS|LIMIT|PEAK|MTU|QUANTUM|PERTURB" ### Source AVPKT if it exists [ -r /etc/sysconfig/cbq/avpkt ] && . /etc/sysconfig/cbq/avpkt AVPKT=${AVPKT:-3000} ############################################################################# ############################# SUPPORT FUNCTIONS ############################# ############################################################################# ### Get list of network devices cbq_device_list () { ip link show| sed -n "/^[0-9]/ \ { s/^[0-9]\+: \([a-z0-9._]\+\)[:@].*/\1/; p; }" } # cbq_device_list ### Remove root class from device $1 cbq_device_off () { tc qdisc del dev $1 root 2> /dev/null } # cbq_device_off ### Remove CBQ from all devices cbq_off () { for dev in `cbq_device_list`; do cbq_device_off $dev done } # cbq_off ### Prefixed message cbq_message () { echo -e "**CBQ: $*" } # cbq_message ### Failure message cbq_failure () { cbq_message "$@" exit 1 } # cbq_failure ### Failure w/ cbq-off cbq_fail_off () { cbq_message "$@" cbq_off exit 1 } # cbq_fail_off ### Convert time to absolute value cbq_time2abs () { local min=${1##*:}; min=${min##0} local hrs=${1%%:*}; hrs=${hrs##0} echo $[hrs*60 + min] } # cbq_time2abs ### Display CBQ setup cbq_show () { for dev in `cbq_device_list`; do [ "`tc qdisc show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: queueing disciplines\n" tc $1 qdisc show dev $dev; echo [ "`tc class show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: traffic classes\n" tc $1 class show dev $dev; echo [ "`tc filter show dev $dev| wc -l`" -eq 0 ] && continue echo -e "### $dev: filtering rules\n" tc $1 filter show dev $dev; echo done } # cbq_show ### Check configuration and load DEVICES, DEVFIELDS and CLASSLIST from $1 cbq_init () { ### Get a list of configured classes CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ -not -name '*~' -printf "%f\n"| sort` [ -z "$CLASSLIST" ] && cbq_failure "no configuration files found in $1!" ### Gather all DEVICE fields from $1/cbq-* DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ -not -name '*~' -print0 | xargs -0 sed -n 's/#.*//; \ s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*\(,[^,]*\)\?/ \ { s/.*=//; p; }'| sort -u` [ -z "$DEVFIELDS" ] && cbq_failure "no DEVICE field found in $1/cbq-*!" ### Check for different DEVICE fields for the same device DEVICES=`echo "$DEVFIELDS"| sed 's/,.*//'| sort -u` [ "`echo "$DEVICES"| wc -l`" -ne "`echo "$DEVFIELDS"| wc -l`" ] && cbq_failure "different DEVICE fields for single device!\n$DEVFIELDS" } # cbq_init ### Load class configuration from $1/$2 cbq_load_class () { CLASS=`echo $2| sed 's/^cbq-0*//; s/^\([0-9a-fA-F]\+\).*/\1/'` CFILE=`sed -n 's/#.*//; s/[[:space:]]//g; /^[[:alnum:]_]\+=[[:alnum:].,:;/*@-_]\+$/ p' $1/$2` ### Check class number IDVAL=`/usr/bin/printf "%d" 0x$CLASS 2> /dev/null` [ $? -ne 0 -o $IDVAL -lt 2 -o $IDVAL -gt 65535 ] && cbq_fail_off "class ID of $2 must be in range <0002-FFFF>!" ### Set defaults & load class RATE=""; WEIGHT=""; PARENT=""; PRIO=5 LEAF=tbf; BOUNDED=yes; ISOLATED=no BUFFER=10Kb/8; LIMIT=15Kb; MTU=1500 PEAK=""; PERTURB=10; QUANTUM="" PRIO_RULE=$PRIO_RULE_DEFAULT PRIO_MARK=$PRIO_MARK_DEFAULT PRIO_REALM=$PRIO_REALM_DEFAULT eval "`echo "$CFILE"| grep -E "^($CBQ_WORDS)="`" ### Require RATE/WEIGHT [ -z "$RATE" -o -z "$WEIGHT" ] && cbq_fail_off "missing RATE or WEIGHT in $2!" ### Class device DEVICE=${DEVICE%%,*} [ -z "$DEVICE" ] && cbq_fail_off "missing DEVICE field in $2!" BANDWIDTH=`echo "$DEVFIELDS"| sed -n "/^$DEVICE,/ \ { s/[^,]*,\([^,]*\).*/\1/; p; q; }"` ### Convert to "tc" options PEAK=${PEAK:+peakrate $PEAK} PERTURB=${PERTURB:+perturb $PERTURB} QUANTUM=${QUANTUM:+quantum $QUANTUM} [ "$BOUNDED" = "no" ] && BOUNDED="" || BOUNDED="bounded" [ "$ISOLATED" = "yes" ] && ISOLATED="isolated" || ISOLATED="" } # cbq_load_class ############################################################################# #################################### INIT ################################### ############################################################################# ### Check for presence of ip-route2 in usual place [ -x $TC -a -x $IP ] || cbq_failure "ip-route2 utilities not installed or executable!" ### ip/tc wrappers if [ "$1" = "compile" ]; then ### no module probing CBQ_PROBE="" ip () { $IP "$@" } # ip ### echo-only version of "tc" command tc () { echo "$TC $*" } # tc elif [ -n "$CBQ_DEBUG" ]; then echo -e "# `date`" > $CBQ_DEBUG ### Logging version of "ip" command ip () { echo -e "\n# ip $*" >> $CBQ_DEBUG $IP "$@" 2>&1 | tee -a $CBQ_DEBUG } # ip ### Logging version of "tc" command tc () { echo -e "\n# tc $*" >> $CBQ_DEBUG $TC "$@" 2>&1 | tee -a $CBQ_DEBUG } # tc else ### Default wrappers ip () { $IP "$@" } # ip tc () { $TC "$@" } # tc fi # ip/tc wrappers case "$1" in ############################################################################# ############################### START/COMPILE ############################### ############################################################################# start|compile) ### Probe QoS modules (start only) for module in $CBQ_PROBE; do $MP $module || cbq_failure "failed to load module $module" done ### If we are in compile/nocache/logging mode, don't bother with cache if [ "$1" != "compile" -a "$2" != "nocache" -a -z "$CBQ_DEBUG" ]; then VALID=1 ### validate the cache [ "$2" = "invalidate" -o ! -f $CBQ_CACHE ] && VALID=0 if [ $VALID -eq 1 ]; then [ "`find $CBQ_PATH -maxdepth 1 -newer $CBQ_CACHE| \ wc -l`" -gt 0 ] && VALID=0 fi ### compile the config if the cache is invalid if [ $VALID -ne 1 ]; then $0 compile > $CBQ_CACHE || cbq_fail_off "failed to compile CBQ configuration!" fi ### run the cached commands exec /bin/sh $CBQ_CACHE 2> /dev/null fi ### Load DEVICES, DEVFIELDS and CLASSLIST cbq_init $CBQ_PATH ### Setup root qdisc on all configured devices for dev in $DEVICES; do ### Retrieve device bandwidth and, optionally, weight DEVTEMP=`echo "$DEVFIELDS"| sed -n "/^$dev,/ { s/$dev,//; p; q; }"` DEVBWDT=${DEVTEMP%%,*}; DEVWGHT=${DEVTEMP##*,} [ "$DEVBWDT" = "$DEVWGHT" ] && DEVWGHT="" ### Device bandwidth is required if [ -z "$DEVBWDT" ]; then cbq_message "could not determine bandwidth for device $dev!" cbq_failure "please set up the DEVICE fields properly!" fi ### Check if the device is there ip link show $dev &> /dev/null || cbq_fail_off "device $dev not found!" ### Remove old root qdisc from device cbq_device_off $dev ### Setup root qdisc + class for device tc qdisc add dev $dev root handle 1 cbq \ bandwidth $DEVBWDT avpkt $AVPKT cell 8 ### Set weight of the root class if set [ -n "$DEVWGHT" ] && tc class change dev $dev root cbq weight $DEVWGHT allot 1514 [ "$1" = "compile" ] && echo done # dev ### Setup traffic classes for classfile in $CLASSLIST; do cbq_load_class $CBQ_PATH $classfile ### Create the class tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \ bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED || cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!" ### Create leaf qdisc if set if [ "$LEAF" = "tbf" ]; then tc qdisc add dev $DEVICE parent 1:$CLASS handle $CLASS tbf \ rate $RATE buffer $BUFFER limit $LIMIT mtu $MTU $PEAK elif [ "$LEAF" = "sfq" ]; then tc qdisc add dev $DEVICE parent 1:$CLASS handle $CLASS sfq \ $PERTURB $QUANTUM fi ### Create fw filter for MARK fields for mark in `echo "$CFILE"| sed -n '/^MARK/ { s/.*=//; p; }'`; do ### Attach fw filter to root class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_MARK handle $mark fw classid 1:$CLASS done ### mark ### Create route filter for REALM fields for realm in `echo "$CFILE"| sed -n '/^REALM/ { s/.*=//; p; }'`; do ### Split realm into source & destination realms SREALM=${realm%%,*}; DREALM=${realm##*,} [ "$SREALM" = "$DREALM" ] && SREALM="" ### Convert asterisks to empty strings SREALM=${SREALM#\*}; DREALM=${DREALM#\*} ### Attach route filter to the root class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_REALM route ${SREALM:+from $SREALM} \ ${DREALM:+to $DREALM} classid 1:$CLASS done ### realm ### Create u32 filter for RULE fields for rule in `echo "$CFILE"| sed -n '/^RULE/ { s/.*=//; p; }'`; do ### Split rule into source & destination SRC=${rule%%,*}; DST=${rule##*,} [ "$SRC" = "$rule" ] && SRC="" ### Split destination into address, port & mask fields DADDR=${DST%%:*}; DTEMP=${DST##*:} [ "$DADDR" = "$DST" ] && DTEMP="" DPORT=${DTEMP%%/*}; DMASK=${DTEMP##*/} [ "$DPORT" = "$DTEMP" ] && DMASK="0xffff" ### Split up source (if specified) SADDR=""; SPORT="" if [ -n "$SRC" ]; then SADDR=${SRC%%:*}; STEMP=${SRC##*:} [ "$SADDR" = "$SRC" ] && STEMP="" SPORT=${STEMP%%/*}; SMASK=${STEMP##*/} [ "$SPORT" = "$STEMP" ] && SMASK="0xffff" fi ### Convert asterisks to empty strings SADDR=${SADDR#\*}; DADDR=${DADDR#\*} ### Compose u32 filter rules u32_s="${SPORT:+match ip sport $SPORT $SMASK}" u32_s="${SADDR:+match ip src $SADDR} $u32_s" u32_d="${DPORT:+match ip dport $DPORT $DMASK}" u32_d="${DADDR:+match ip dst $DADDR} $u32_d" ### Uncomment the following if you want to see parsed rules #echo "$rule: $u32_s $u32_d" ### Attach u32 filter to the appropriate class tc filter add dev $DEVICE parent 1:0 protocol ip \ prio $PRIO_RULE u32 $u32_s $u32_d classid 1:$CLASS done ### rule [ "$1" = "compile" ] && echo done ### classfile ;; ############################################################################# ################################# TIME CHECK ################################ ############################################################################# timecheck) ### Get time + weekday TIME_TMP=`date +%w/%k:%M` TIME_DOW=${TIME_TMP%%/*} TIME_NOW=${TIME_TMP##*/} ### Load DEVICES, DEVFIELDS and CLASSLIST cbq_init $CBQ_PATH ### Run through all classes for classfile in $CLASSLIST; do ### Gather all TIME rules from class config TIMESET=`sed -n 's/#.*//; s/[[:space:]]//g; /^TIME/ { s/.*=//; p; }' \ $CBQ_PATH/$classfile` [ -z "$TIMESET" ] && continue MATCH=0; CHANGE=0 for timerule in $TIMESET; do TIME_ABS=`cbq_time2abs $TIME_NOW` ### Split TIME rule to pieces TIMESPEC=${timerule%%;*}; PARAMS=${timerule##*;} WEEKDAYS=${TIMESPEC%%/*}; INTERVAL=${TIMESPEC##*/} BEG_TIME=${INTERVAL%%-*}; END_TIME=${INTERVAL##*-} ### Check the day-of-week (if present) [ "$WEEKDAYS" != "$INTERVAL" -a \ -n "${WEEKDAYS##*$TIME_DOW*}" ] && continue ### Compute interval boundaries BEG_ABS=`cbq_time2abs $BEG_TIME` END_ABS=`cbq_time2abs $END_TIME` ### Midnight wrap fixup if [ $BEG_ABS -gt $END_ABS ]; then [ $TIME_ABS -le $END_ABS ] && TIME_ABS=$[TIME_ABS + 24*60] END_ABS=$[END_ABS + 24*60] fi ### If the time matches, remember params and set MATCH flag if [ $TIME_ABS -ge $BEG_ABS -a $TIME_ABS -lt $END_ABS ]; then TMP_RATE=${PARAMS%%/*}; PARAMS=${PARAMS#*/} TMP_WGHT=${PARAMS%%/*}; TMP_PEAK=${PARAMS##*/} [ "$TMP_PEAK" = "$TMP_WGHT" ] && TMP_PEAK="" TMP_PEAK=${TMP_PEAK:+peakrate $TMP_PEAK} MATCH=1 fi done ### timerule cbq_load_class $CBQ_PATH $classfile ### Get current RATE of CBQ class RATE_NOW=`tc class show dev $DEVICE| sed -n \ "/cbq 1:$CLASS / { s/.*rate //; s/ .*//; p; q; }"` [ -z "$RATE_NOW" ] && continue ### Time interval matched if [ $MATCH -ne 0 ]; then ### Check if there is any change in class RATE if [ "$RATE_NOW" != "$TMP_RATE" ]; then NEW_RATE="$TMP_RATE" NEW_WGHT="$TMP_WGHT" NEW_PEAK="$TMP_PEAK" CHANGE=1 fi ### Match not found, reset to default RATE if necessary elif [ "$RATE_NOW" != "$RATE" ]; then NEW_WGHT="$WEIGHT" NEW_RATE="$RATE" NEW_PEAK="$PEAK" CHANGE=1 fi ### If there are no changes, go for next class [ $CHANGE -eq 0 ] && continue ### Replace CBQ class tc class replace dev $DEVICE classid 1:$CLASS cbq \ bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED ### Replace leaf qdisc (if any) if [ "$LEAF" = "tbf" ]; then tc qdisc replace dev $DEVICE handle $CLASS tbf \ rate $NEW_RATE buffer $BUFFER limit $LIMIT mtu $MTU $NEW_PEAK fi cbq_message "$TIME_NOW: class $CLASS on $DEVICE changed rate ($RATE_NOW -> $NEW_RATE)" done ### class file ;; ############################################################################# ################################## THE REST ################################# ############################################################################# stop) cbq_off ;; list) cbq_show ;; stats) cbq_show -s ;; restart) shift $0 stop $0 start "$@" ;; *) echo "Usage: `basename $0` {start|compile|stop|restart|timecheck|list|stats}" esac