diff options
author | Justin Clark-Casey (justincc) | 2014-09-30 18:18:34 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-10-02 22:30:44 +0100 |
commit | 43520b3e8b85ceccbcf44a19b2526e0a517c4a74 (patch) | |
tree | d600ef9f8e65da8287afbe67791f1fb950c60d2a /OpenSim/Region/ClientStack | |
parent | Add "debug lludp throttle log <level> <avatar-first-name> <avatar-last-name>"... (diff) | |
download | opensim-SC_OLD-43520b3e8b85ceccbcf44a19b2526e0a517c4a74.zip opensim-SC_OLD-43520b3e8b85ceccbcf44a19b2526e0a517c4a74.tar.gz opensim-SC_OLD-43520b3e8b85ceccbcf44a19b2526e0a517c4a74.tar.bz2 opensim-SC_OLD-43520b3e8b85ceccbcf44a19b2526e0a517c4a74.tar.xz |
Add "debug lludp throttle status" command to return status information about a client's throttle (currently just whether adaptive is enabled).
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 36 |
1 files changed, 36 insertions, 0 deletions
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 | |||
774 | MainConsole.Instance.Commands.AddCommand( | 774 | MainConsole.Instance.Commands.AddCommand( |
775 | "Debug", | 775 | "Debug", |
776 | false, | 776 | false, |
777 | "debug lludp throttle status", | ||
778 | "debug lludp throttle status <avatar-first-name> <avatar-last-name>", | ||
779 | "Return status information about throttles.", | ||
780 | HandleThrottleStatusCommand); | ||
781 | |||
782 | MainConsole.Instance.Commands.AddCommand( | ||
783 | "Debug", | ||
784 | false, | ||
777 | "debug lludp toggle agentupdate", | 785 | "debug lludp toggle agentupdate", |
778 | "debug lludp toggle agentupdate", | 786 | "debug lludp toggle agentupdate", |
779 | "Toggle whether agentupdate packets are processed or simply discarded.", | 787 | "Toggle whether agentupdate packets are processed or simply discarded.", |
@@ -842,6 +850,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
842 | }); | 850 | }); |
843 | } | 851 | } |
844 | 852 | ||
853 | private void HandleThrottleStatusCommand(string module, string[] args) | ||
854 | { | ||
855 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != Scene) | ||
856 | return; | ||
857 | |||
858 | if (args.Length != 6) | ||
859 | { | ||
860 | MainConsole.Instance.OutputFormat("Usage: debug lludp throttle status <avatar-first-name> <avatar-last-name>"); | ||
861 | return; | ||
862 | } | ||
863 | |||
864 | string firstName = args[4]; | ||
865 | string lastName = args[5]; | ||
866 | |||
867 | Scene.ForEachScenePresence(sp => | ||
868 | { | ||
869 | if (sp.Firstname == firstName && sp.Lastname == lastName) | ||
870 | { | ||
871 | MainConsole.Instance.OutputFormat( | ||
872 | "Status for {0} ({1}) in {2}", | ||
873 | sp.Name, sp.IsChildAgent ? "child" : "root", Scene.Name); | ||
874 | |||
875 | LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient; | ||
876 | MainConsole.Instance.OutputFormat("Adaptive throttle: {0}", udpClient.FlowThrottle.Enabled); | ||
877 | } | ||
878 | }); | ||
879 | } | ||
880 | |||
845 | private void HandlePacketCommand(string module, string[] args) | 881 | private void HandlePacketCommand(string module, string[] args) |
846 | { | 882 | { |
847 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != Scene) | 883 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != Scene) |