diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index 325b04a4f0..a1a0395dc1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs @@ -155,6 +155,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP + "throttle-max - kbps, control maximum throttle setting for current and future clients\n", HandleThrottleSetCommand); + m_console.Commands.AddCommand( + "Debug", + false, + "debug lludp get", + "debug lludp get", + "Get debug parameters for the server.", + "scene-throttle-max is the current max cumulative kbps provided for this scene to clients", + HandleGetCommand); + m_console.Commands.AddCommand( "Debug", false, @@ -434,6 +443,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP }); } + private void HandleGetCommand(string module, string[] args) + { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) + return; + + m_console.OutputFormat("Debug settings for {0}", m_udpServer.Scene.Name); + ConsoleDisplayList cdl = new ConsoleDisplayList(); + + long maxSceneDripRate = m_udpServer.Throttle.MaxDripRate; + cdl.AddRow( + "scene-throttle-max", + maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); + + m_console.Output(cdl.ToString()); + } + private void HandleSetCommand(string module, string[] args) { if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)