aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-10-21 02:29:39 +0100
committerJustin Clark-Casey (justincc)2014-11-25 23:22:19 +0000
commit10095c1a5879fbbb9bfdaedf3dfe74fd6445370a (patch)
tree80fd513d81a693c7e3603f236e3b15a8f6bc049a /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
parentChange the word order of some debug lludp settings for readability (diff)
downloadopensim-SC_OLD-10095c1a5879fbbb9bfdaedf3dfe74fd6445370a.zip
opensim-SC_OLD-10095c1a5879fbbb9bfdaedf3dfe74fd6445370a.tar.gz
opensim-SC_OLD-10095c1a5879fbbb9bfdaedf3dfe74fd6445370a.tar.bz2
opensim-SC_OLD-10095c1a5879fbbb9bfdaedf3dfe74fd6445370a.tar.xz
Add "debug lludp throttles get/set request" and get current
This allows one to set the requested throttle (which normally comes from the client) as opposed to the max.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index b03d639..60b93ac 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -143,6 +143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
143 "debug lludp throttles get [<avatar-first-name> <avatar-last-name>]", 143 "debug lludp throttles get [<avatar-first-name> <avatar-last-name>]",
144 "Return debug settings for throttles.", 144 "Return debug settings for throttles.",
145 "adaptive - true/false, controls adaptive throttle setting.\n" 145 "adaptive - true/false, controls adaptive throttle setting.\n"
146 + "request - request drip rate in kbps.\n"
146 + "max - the max kbps throttle allowed for the specified existing clients. Use 'debug lludp get new-client-throttle-max' to see the setting for new clients.\n", 147 + "max - the max kbps throttle allowed for the specified existing clients. Use 'debug lludp get new-client-throttle-max' to see the setting for new clients.\n",
147 HandleThrottleGetCommand); 148 HandleThrottleGetCommand);
148 149
@@ -153,6 +154,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
153 "debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]", 154 "debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]",
154 "Set a throttle parameter for the given client.", 155 "Set a throttle parameter for the given client.",
155 "adaptive - true/false, controls adaptive throttle setting.\n" 156 "adaptive - true/false, controls adaptive throttle setting.\n"
157 + "current - current drip rate in kbps.\n"
158 + "request - requested drip rate in kbps.\n"
156 + "max - the max kbps throttle allowed for the specified existing clients. Use 'debug lludp set new-client-throttle-max' to change the settings for new clients.\n", 159 + "max - the max kbps throttle allowed for the specified existing clients. Use 'debug lludp set new-client-throttle-max' to change the settings for new clients.\n",
157 HandleThrottleSetCommand); 160 HandleThrottleSetCommand);
158 161
@@ -378,6 +381,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
378 } 381 }
379 }); 382 });
380 } 383 }
384 else if (param == "request")
385 {
386 int newValue;
387 if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, rawValue, out newValue))
388 return;
389
390 int newCurrentThrottleKbps = newValue * 1000 / 8;
391
392 m_udpServer.Scene.ForEachScenePresence(sp =>
393 {
394 if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
395 {
396 MainConsole.Instance.OutputFormat(
397 "Setting param {0} to {1} for {2} ({3}) in {4}",
398 param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
399
400 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
401 udpClient.FlowThrottle.RequestedDripRate = newCurrentThrottleKbps;
402 }
403 });
404 }
381 else if (param == "max") 405 else if (param == "max")
382 { 406 {
383 int newValue; 407 int newValue;
@@ -437,6 +461,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
437 461
438 ConsoleDisplayList cdl = new ConsoleDisplayList(); 462 ConsoleDisplayList cdl = new ConsoleDisplayList();
439 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled); 463 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled);
464 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000));
465 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000));
440 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000)); 466 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000));
441 467
442 m_console.Output(cdl.ToString()); 468 m_console.Output(cdl.ToString());