diff options
author | Justin Clark-Casey (justincc) | 2014-10-06 23:29:41 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:18:39 +0000 |
commit | 1d33a40f59fc15bd85004cc68e802a0b274dad30 (patch) | |
tree | 0c8e3ed0119f6201adb167e07961b1d28cf9cdad /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |
parent | Move information about "server agent rate" throttles into "show server thrott... (diff) | |
download | opensim-SC-1d33a40f59fc15bd85004cc68e802a0b274dad30.zip opensim-SC-1d33a40f59fc15bd85004cc68e802a0b274dad30.tar.gz opensim-SC-1d33a40f59fc15bd85004cc68e802a0b274dad30.tar.bz2 opensim-SC-1d33a40f59fc15bd85004cc68e802a0b274dad30.tar.xz |
Add "debug lludp set scene-throttle-max <value>" console command to allow us to potentially set the scene max throttle on the fly.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index 438331a..f0f186a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |||
@@ -156,6 +156,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
156 | m_console.Commands.AddCommand( | 156 | m_console.Commands.AddCommand( |
157 | "Debug", | 157 | "Debug", |
158 | false, | 158 | false, |
159 | "debug lludp set", | ||
160 | "debug lludp set <param> <value>", | ||
161 | "Set a parameter for the server.", | ||
162 | "Only current setting is 'scene-throttle-max' which sets the current max cumulative kbit/s provided for this scene to clients", | ||
163 | HandleSetCommand); | ||
164 | |||
165 | m_console.Commands.AddCommand( | ||
166 | "Debug", | ||
167 | false, | ||
159 | "debug lludp toggle agentupdate", | 168 | "debug lludp toggle agentupdate", |
160 | "debug lludp toggle agentupdate", | 169 | "debug lludp toggle agentupdate", |
161 | "Toggle whether agentupdate packets are processed or simply discarded.", | 170 | "Toggle whether agentupdate packets are processed or simply discarded.", |
@@ -363,6 +372,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
363 | }); | 372 | }); |
364 | } | 373 | } |
365 | 374 | ||
375 | private void HandleSetCommand(string module, string[] args) | ||
376 | { | ||
377 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | ||
378 | return; | ||
379 | |||
380 | if (args.Length != 5) | ||
381 | { | ||
382 | MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>"); | ||
383 | return; | ||
384 | } | ||
385 | |||
386 | string param = args[3]; | ||
387 | string rawValue = args[4]; | ||
388 | |||
389 | int newValue; | ||
390 | |||
391 | if (param == "scene-throttle-max") | ||
392 | { | ||
393 | if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, rawValue, out newValue)) | ||
394 | return; | ||
395 | |||
396 | m_udpServer.Throttle.RequestedDripRate = newValue * 8 * 1000; | ||
397 | } | ||
398 | |||
399 | m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name); | ||
400 | } | ||
401 | |||
366 | private void HandlePacketCommand(string module, string[] args) | 402 | private void HandlePacketCommand(string module, string[] args) |
367 | { | 403 | { |
368 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | 404 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) |