*SOLVED* Newbie questions about traffic throttling and control panel
I'm looking for a way to limit the VPS's to 1Mbit/second. I saw http://www.serverpowered.com/openvz-bandwidth-accounting.php but it has broken links all over it so I don't think it's supported anymore. I'm also looking for a control panel for the end user to be able to re-install, reboot, stop, start, etc. If you can help me out on any of these that'd be great! Thanks.
Re: Newbie questions about traffic throttling and control panel
Hello, You can limit traffic of VE using tc. For details look at http://wiki.openvz.org/Traffic_shaping_with_tc article. As concerns panels. I've remember some topics here on forum from persons who had created their own control panels. You can use search to find this posts and modify presented panels for your needs. For example search gave me the following link: http://forum.openvz.org/index.php?t=tree&goto=5449&& amp;srch=control+panel#msg_5449 HTH, vass
Hi there, So I tried to use tc and I get this error when running the command; DEV=eth0 tc qdisc del dev $DEV root tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit tc class add dev $DEV parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 10.0.15.101 flowid 1:1 tc qdisc add dev $DEV parent 1:1 sfq perturb 10 Error: RTNETLINK answers: No such file or directory Unknown qdisc "cbq", hence option "avpkt" is unparsable Error: Qdisc "cbq" is classless. Unknown filter "u32", hence option "match" is unparsable Unknown qdisc "sfq", hence option "perturb" is unparsable
I suspect, that you didn't load appropriate kernel modules. For example, in order to use CBQ qdisc you should load sch_cbq qdisc: [HN]# modprobe sch_cbq [HN]# tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth [HN]# tc qdisc show qdisc cbq 1: dev eth0 rate 100000Kbit (bounded,isolated) prio no-transmit HTH, vass.
[root@vz101 ~]# modprobe sch_cbq [root@vz101 ~]# tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth [HN]# tc qdisc show Unknown qdisc "cbq", hence option "avpkt" is unparsable
[root@vz101 ~]# tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth [HN]# tc qdisc show ^^^^^^^^^^^^^^^^^^^^ This is a scrap from other command Should be so: [HN]# tc qdisc del dev eth0 root [HN]# tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 100mbit HTH, vass.
[root@vz101 ~]# tc qdisc del dev eth0 root RTNETLINK answers: No such file or directory [root@vz101 ~]# tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 100mbit Unknown qdisc "cbq", hence option "avpkt" is unparsable [root@vz101 ~]#
Hmmm... for me, if required modules are loaded, it works? Can you provide me an access to your node? Thanks.
During PMing, we investigate, that the problem seems to be in tc in CentOS 4.4. Attached patch solves the problem.
then..what must i do with that file???let laugh to me lol...
Hi! Don't panic! I've never applied a diff either..but will shortly...if I must. Basically...this is what must happen: 1) Download diff 2) Download source code to tc 3) Apply diff to source code 4) Compile tc from the modified source It's not as difficult as you might think..but there can be problems. I'll report back later with more. Bryon