aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-10-21 02:10:55 +0100
committerJustin Clark-Casey (justincc)2014-11-25 23:22:19 +0000
commit44dc58cc7f945a0a81afed53d7fb4893f8d1e11a (patch)
tree41d65e8ee2ee1c27138c05126f75fd1a1c4d269f
parentAdd "debug lludp get" command which currently just shows scene-throttle-max t... (diff)
downloadopensim-SC_OLD-44dc58cc7f945a0a81afed53d7fb4893f8d1e11a.zip
opensim-SC_OLD-44dc58cc7f945a0a81afed53d7fb4893f8d1e11a.tar.gz
opensim-SC_OLD-44dc58cc7f945a0a81afed53d7fb4893f8d1e11a.tar.bz2
opensim-SC_OLD-44dc58cc7f945a0a81afed53d7fb4893f8d1e11a.tar.xz
Add "debug lludp get/set new-client-throttle-max" to allow default new client throttle to be set separately from existing clients.
"debug lludp throttles get/set throttle-max" now only gets and sets current max client throttles
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs33
1 files changed, 25 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index a1a0395..63e620a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -142,6 +142,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
142 "debug lludp throttles get", 142 "debug lludp throttles get",
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"
146 + "throttle-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",
145 HandleThrottleGetCommand); 147 HandleThrottleGetCommand);
146 148
147 m_console.Commands.AddCommand( 149 m_console.Commands.AddCommand(
@@ -150,9 +152,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
150 "debug lludp throttles set", 152 "debug lludp throttles set",
151 "debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]", 153 "debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]",
152 "Set a throttle parameter for the given client.", 154 "Set a throttle parameter for the given client.",
153 "Avaiable parameters are:\n" 155 "adaptive - true/false, controls adaptive throttle setting.\n"
154 + "adaptive - true/false, control adaptive throttle setting\n" 156 + "throttle-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",
155 + "throttle-max - kbps, control maximum throttle setting for current and future clients\n",
156 HandleThrottleSetCommand); 157 HandleThrottleSetCommand);
157 158
158 m_console.Commands.AddCommand( 159 m_console.Commands.AddCommand(
@@ -161,7 +162,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
161 "debug lludp get", 162 "debug lludp get",
162 "debug lludp get", 163 "debug lludp get",
163 "Get debug parameters for the server.", 164 "Get debug parameters for the server.",
164 "scene-throttle-max is the current max cumulative kbps provided for this scene to clients", 165 "scene-throttle-max - the current max cumulative kbps provided for this scene to clients.\n"
166 + "new-client-throttle-max - the max kbps throttle allowed to new clients. Use 'debug lludp throttles set' to see the settings for existing clients.",
165 HandleGetCommand); 167 HandleGetCommand);
166 168
167 m_console.Commands.AddCommand( 169 m_console.Commands.AddCommand(
@@ -170,7 +172,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
170 "debug lludp set", 172 "debug lludp set",
171 "debug lludp set <param> <value>", 173 "debug lludp set <param> <value>",
172 "Set a parameter for the server.", 174 "Set a parameter for the server.",
173 "Only current setting is 'scene-throttle-max' which sets the current max cumulative kbps provided for this scene to clients", 175 "scene-throttle-max - the current max cumulative kbps provided for this scene to clients.\n"
176 + "new-client-throttle-max - the max kbps throttle allowed to each new client. Use 'debug lludp throttles set' to set for existing clients.",
174 HandleSetCommand); 177 HandleSetCommand);
175 178
176 m_console.Commands.AddCommand( 179 m_console.Commands.AddCommand(
@@ -382,7 +385,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
382 return; 385 return;
383 386
384 int newThrottleMaxKbps = newValue * 1000 / 8; 387 int newThrottleMaxKbps = newValue * 1000 / 8;
385 m_udpServer.ThrottleRates.Total = newThrottleMaxKbps;
386 388
387 m_udpServer.Scene.ForEachScenePresence(sp => 389 m_udpServer.Scene.ForEachScenePresence(sp =>
388 { 390 {
@@ -393,7 +395,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
393 param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name); 395 param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
394 396
395 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient; 397 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
396 udpClient.FlowThrottle.RequestedDripRate = newThrottleMaxKbps;
397 udpClient.FlowThrottle.MaxDripRate = newThrottleMaxKbps; 398 udpClient.FlowThrottle.MaxDripRate = newThrottleMaxKbps;
398 } 399 }
399 }); 400 });
@@ -436,7 +437,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
436 437
437 ConsoleDisplayList cdl = new ConsoleDisplayList(); 438 ConsoleDisplayList cdl = new ConsoleDisplayList();
438 cdl.AddRow("Adaptive throttle", udpClient.FlowThrottle.AdaptiveEnabled); 439 cdl.AddRow("Adaptive throttle", udpClient.FlowThrottle.AdaptiveEnabled);
439 cdl.AddRow("Max throttle", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000)); 440 cdl.AddRow("Max throttle", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000));
440 441
441 m_console.Output(cdl.ToString()); 442 m_console.Output(cdl.ToString());
442 } 443 }
@@ -456,6 +457,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
456 "scene-throttle-max", 457 "scene-throttle-max",
457 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 458 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
458 459
460 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
461 cdl.AddRow(
462 "new-client-throttle-max",
463 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
464
459 m_console.Output(cdl.ToString()); 465 m_console.Output(cdl.ToString());
460 } 466 }
461 467
@@ -482,6 +488,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
482 488
483 m_udpServer.Throttle.RequestedDripRate = newValue * 1000 / 8; 489 m_udpServer.Throttle.RequestedDripRate = newValue * 1000 / 8;
484 } 490 }
491 else if (param == "new-client-throttle-max")
492 {
493 if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, rawValue, out newValue))
494 return;
495
496 m_udpServer.ThrottleRates.Total = newValue * 1000 / 8;
497 }
498 else
499 {
500 return;
501 }
485 502
486 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name); 503 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
487 } 504 }