diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 0b1c7fe337..6e3132289e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -771,6 +771,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP + "If level <= 0 then no throttle debug logging is performed.", HandleThrottleCommand); + MainConsole.Instance.Commands.AddCommand( + "Debug", + false, + "debug lludp throttle status", + "debug lludp throttle status ", + "Return status information about throttles.", + HandleThrottleStatusCommand); + MainConsole.Instance.Commands.AddCommand( "Debug", false, @@ -842,6 +850,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP }); } + private void HandleThrottleStatusCommand(string module, string[] args) + { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != Scene) + return; + + if (args.Length != 6) + { + MainConsole.Instance.OutputFormat("Usage: debug lludp throttle status "); + return; + } + + string firstName = args[4]; + string lastName = args[5]; + + Scene.ForEachScenePresence(sp => + { + if (sp.Firstname == firstName && sp.Lastname == lastName) + { + MainConsole.Instance.OutputFormat( + "Status for {0} ({1}) in {2}", + sp.Name, sp.IsChildAgent ? "child" : "root", Scene.Name); + + LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient; + MainConsole.Instance.OutputFormat("Adaptive throttle: {0}", udpClient.FlowThrottle.Enabled); + } + }); + } + private void HandlePacketCommand(string module, string[] args) { if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != Scene)