From 43520b3e8b85ceccbcf44a19b2526e0a517c4a74 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 30 Sep 2014 18:18:34 +0100 Subject: Add "debug lludp throttle status" command to return status information about a client's throttle (currently just whether adaptive is enabled). --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index e45de51..9757d35 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -774,6 +774,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP 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, "debug lludp toggle agentupdate", "debug lludp toggle agentupdate", "Toggle whether agentupdate packets are processed or simply discarded.", @@ -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) -- cgit v1.1