Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377289 - net-p2p/mldonkey: use bw_toggle in the init.d script to control bandwidth
Summary: net-p2p/mldonkey: use bw_toggle in the init.d script to control bandwidth
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 15:17 UTC by Dennis New
Modified: 2019-12-13 14:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
the simpler way using bw_toggle (bw_toggle_for_bw_control.diff,2.04 KB, text/plain)
2011-08-01 15:18 UTC, Dennis New
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis New 2011-08-01 15:17:40 UTC
Currently mldonkey's init.d script uses the web interface's "set max_hard_???_rate" to set it to run "fast" or "slow" (as defined in /etc/conf.d/mldonkey). But this overrides and conflicts with mldonkey's own way of controlling this -- currently it allows for two rate-settings (the variables max_hard_download_rate_2, max_hard_upload_rate_2 and max_opened_connections_2 controlling the second state.) Mldonkey's "bw_toggle" command swaps those two sets of state variables, instead of simply switching between them, so there is a risk that one of the settings will get lost if I run "/etc/init.d/mldonkey <fast|slow>" -- it will overwrite whatever is in max_hard_download_rate, max_..., without backing them/swapping them into the max_hard_download_rate_2, max_....

Also, "bw_toggle [<high|low>]" makes things simpler. (BTW, it "high" in here means the state with more max indirect connections -- not necessarily the faster state :\... and if that number is equal, I don't think it toggles.)

I've attached a patch for fun. It gets rid of gentoo's ability to explicitly configure the bandwidth, as well as the "info" init.d function -- I figured these things are better handled within mldonkey itself, rather than remaking an mldonkey interface in the init.d script :p -- although if we really want that additional control, we could stay with the old non-bw_toggle way, and add a bunch of additional wget's to properly read and swap those 3 bandwidth settings. (Ie. to be aware of whether the user bw_toggled the settings on his own via mldonkey's interface, rather than gentoo's.)

Reproducible: Always
Comment 1 Dennis New 2011-08-01 15:18:34 UTC
Created attachment 281751 [details]
the simpler way using bw_toggle