Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I started a program throttled using trickle as trickle -d 10 -u 5 program. Now I want to change change the throttling speed to -d 50 -u 40. How can I change it without closing the program ?

tricklectl sounds well but I can't use it. In the manual they says it will be ready soon but I can't see any development for the last 10 years. So I think someone else should have made it. I'm also interested in editing the .c code but I have little knowledge in C .

share|improve this question
add comment

1 Answer

I'd double check this but this article lists this as one of drawbacks to using Trickle. The lack of the feature to dynamically change the limits.

excerpt from article - Control your bandwidth with Trickle

My biggest concern with Trickle is that it can't dynamically adjust set speeds. So, if you set the upload rates at 20kbps for Firefox, but later decide to increase or decrease it, you will have to close Firefox, reset the speeds and then launch Firefox. And not just Firefox: Trickle doesn't allow dynamic speed adjustments at all. This feature has been on the to-do list for some time and it's also listed under Section 6 of the published paper at http://monkey.org/~marius/trickle/trickle.pdf.

Modifying the code?

Since no one has implemented this feature I would imagine it isn't trivial, otherwise it likely would've been added already or as part of the original set of features.

This is just my $0.02 here but a feature like adjusting it seems like a no brainer to have, and they even called it out in the original PDF that they would like to have it as well.

An alternative?

As an alternative I believe pyshaper will allow you change the throttles dynamically without a restart.

pyshaper includes a graphical user interface which you can use to conveniently view/change throttle settings in real time. Note that pyshaper runs as a daemon, so can function perfectly in non-graphical environments.

You can check out the pyshaper man page for more details.

                                            pyshaper gui

But I want this in trickle

I found the original developers Github repo where he's imported Trickle. Github has the ability to file issues against the repos, so I'd suggest you open an issue with him there. The project appears active, though the import shows it to be at version 1.07, so it has pretty much remained stagnant.

The reason I'm mentioning this is if you want this feature, so do others. I know I would want this feature too. So perhaps some other person has forked Trickle through Github and they've added this feature or are planning to work on it. At any rate I would file an issue against the original repo than for no other reason then to get the ball rolling on potentially getting this feature built in.

References

share|improve this answer
    
Nice answer. There are 2 different things for pyshaper. 1. Need to be root. 2. No per process throttling. –  totti Jan 19 at 9:24
    
@totti - thanks for the additional notes. Is pyshaper not an option then? –  slm Jan 19 at 14:30
    
Require root to run pyshaper is considered as disadvantage. Also I can't install pyshaper. –  totti Jan 20 at 9:19
    
>~$ sudo pyshaper >Traceback (most recent call last): > File "/usr/local/bin/pyshaper", line 35, in <module> > import ezsqlobject >ImportError: No module named ezsqlobject I tried tutorial @ ubuntuforums.org/archive/index.php/t-993210.html but not working at ` sudo easy_install SQLObject==0.6` At last solved by editing /usr/local/bin/pyshaper from import ezsqlobject to import sqlobject. Let me check if it work .. –  totti Jan 20 at 9:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.