aMule Forum
English => Feature requests => Topic started by: hannibal218bc on December 06, 2004, 10:49:36 PM
-
Hellas,
I added a post to a german thread on that topic, but it seems to me that the real gurus don't speak german ;-))
Anyways, I'd like to set bandwidth limits based on clock, for example with a cron job. The windows eMule offers an integrated "scheduler" for that kind of tasks.
I realize that amuleweb actually can set bandwidth limits, but there is no command or command line switch to amulecmd, at least not one that I was able to find.
Killing amule, modifing the preferences file and starting the mule up again doesn't seem like the "golden way to go".... :-/
Many thanks for your replies folks,
best regards
-hannes
-
ye, Scheduler isn't into aMule yet, allthough it will be after aMule 2.0.0 final.
for a cron script, you can use aMuleCMD (like amuleweb). no need to restart aMule with amulecmd ;)
Greetings!
-
Hellas,
thanks Jacobo for your replay. Unfortunatly does amulecmd's help not list something that sounds like bandwidth limits... could you please give me a hint?
I tried to locate amulecmd's source code, and also tried strings amulecmd to find out the appropriate command.. but failed :-(
Thank you again,
best regards
-hannes
-
the source files for amulecmd is src/TextClient.cpp
there is (or at leat there used to be) a function for setting the bandwidth limits. But amulecmd is under quite a heavy development right now (same as amuelweb) so maybe it has been temporarily removed. who knows xD
Greetings!
-
Hi again,
thank you for your help; i found out that there is actually a command "PREFERENCES SETMAXUPLOAD xx" / "PREFERENCES SETMAXDOWNLOAD xx" implemented in the server side of aMule, but not in amulcmd (see ExternalConn.cpp).
I am going to try implementing a perl script to issue those commands... check back tomorrow ;-)
Thanks again,
-hannes
-
huh? a perl script that does the whole identification process + command sending?
are you a perl guru???
K, report tomorrow ;)
-
amulecmd can't change bandwidth limits. At least now. I'm not sure if code is actually ready on core side - how does it gets tested without client anyway ?
Command to amule thru perl script is arcane thing to do - protocol is binary, which perl don't like very match.
If you really want it - consider implementing CECPackets.cpp as perl module first.
And finally you can use Linux's itself banwidth limiting - look at manual of "tc" command
-
Hellas,
I have the perl script working, but it is an ugly quick hack. A short sniffing session with tcpdump revealed how the binary protocol works, and ExternalConn.cpp lists all available commands.
With a little knowledge of C it would be a minor hack to inlude that into amulecmd... perhaps even as command line switches...
Whatever, I have attached my hack to this posting, perhaps someone else finds it useful.
Thanks again for your help, Jacobo!,
greetings
-hannes
-
hannibal218bc, you are using EC protocol version 1.0 in your pl script. This is now obsolete. We're going full binary on EC, to gain some speed/bandwidth/flexibility.
lfroen, code IS implemented in ExternalConn.cpp since webserver IS able to set BW limits.
Jacobo221, amulecmd can not and never could set bw limits.
hannibal218bc, It'd need me 3 mins to implement it, so look at tomorrow's CVS tarball (I hope I won't forget to actually do it :) )
-
hannibal218bc: don't lie to me: you're real name is Larry Wall... ;-)
congrats for your amazingly fast and well done script. Let's see how good you do with ECv2 ;-D
oh, and no problem. you have my help for anything you might need it :-)
GonoszTopi: I'm almost sure it existed not much time ago ;-)
-
Requested feature added to CVS, check out tomorrow's CVS tarball.
-
GonoszTopi: I'm almost sure it existed not much time ago ;-)
No, you wrong here.
-
you can just use this script
http://gentoo-wiki.com/HOWTO_Apache_2_bandwidth_limiting
and change the port to your aMule port ;)
then change the script so that it accepts a parameter and put it in your cron.
;)
biut it's good to know that it's added to amulecmd now. I think amulecmd could support adding a ed2k link, but I don't wanna bug.
-
for adding ed2k link htere is already a console tool,,,,
why would you want two?
stefanero
-
because it works remote. This would mean it could be used to implement a script, that remotely adds ed2k link easily. And I would immediately write that script once that feature would be out ;)
-
yes. otherwise adding a new download remotely requires an ssh account. I'm for supporting ed2k links in amulecmd too. in fact, webserver does it ;)
-
Blindness around?
aMulecmd$ help
----------------> Help: Available commands (case insensitive): <----------------
Connect [server IP] Connect to given/random server. No warn if failed!
Disconnect: Disconnect from server.
Servers: Show server list.
Stats: Shows status and statistics.
Show DL | UL: Shows Download/Upload queue.
List : Lists or finds downloads by name or number.
Resume [n | all]: Resume file number n (or 'all').
Pause [n | all]: Pauses file number n (or 'all').
SetIPFilter : Turn on/off amule IPFilter.
ReloadIPF: Reload IPFilter table from file.
IPLevel [level]: Shows/Sets current IP Filter level.
Add Adds to aMule.
Currently file and server links are supported.
SetUpBWLimit Sets maximum upload bandwidth.
SetDownBWLimit Sets maximum downloadload bandwidth.
GetBWLimits Displays bandwidth limits.
Help: Shows this help.
Quit: Exits Textclient.
Shutdown: Shutdown amule
----------------------------> End of listing <----------------------------------
aMulecmd$
-
8) uh, chould you write with white font, please? I read wearing sunglasses 8)
:P
-
Ah, he prrobabbblee jost deed thad... :D
...darn, now I gotta write that script :P
-
Revision 1.49 / (view) - annotate - [select for diffs] , Tue Nov 16 14:09:59 2004 UTC (3 weeks, 3 days ago) by gonosztopi
Branch: MAIN
Changes since 1.48: +23 -4 lines
Diff to previous 1.48
Added new command "add " to amulecmd.
-
æ?¶?ð???«»¢?? !?!
:D
"Couldn't you just have say nothing at all...?"
darn, I hate to be proven wrong...