From 3534f4492ae747baff492f4bc10bf06994ee1bc6 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 22 Apr 2011 14:01:12 -0700 Subject: Various clean ups. Removed some debugging code. Added a new "show pqueues" command to look at the entity update priority queue. Added a "name" parameter to show queues, show pqueues and show throttles to look at data for a specific user. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 103 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 6a24cc1..ddbc079 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -82,6 +82,14 @@ namespace OpenSim.Region.CoreModules.UDP.Linden m_scenes[scene.RegionInfo.RegionID] = scene; scene.AddCommand( + this, "show pqueues", + "show pqueues [full]", + "Show priority queue data for each client", + "Without the 'full' option, only root agents are shown." + + " With the 'full' option child agents are also shown.", + ShowPQueuesReport); + + scene.AddCommand( this, "show queues", "show queues [full]", "Show queue data for each client", @@ -119,6 +127,11 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); } + protected void ShowPQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetPQueuesReport(cmd)); + } + protected void ShowQueuesReport(string module, string[] cmd) { MainConsole.Instance.Output(GetQueuesReport(cmd)); @@ -155,6 +168,80 @@ namespace OpenSim.Region.CoreModules.UDP.Linden ""); } + + /// + /// Generate UDP Queue data report for each client + /// + /// + /// + protected string GetPQueuesReport(string[] showParams) + { + bool showChildren = false; + string pname = ""; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); + report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); + + report.AppendFormat( + "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", + "Pri 0", + "Pri 1", + "Pri 2", + "Pri 3", + "Pri 4", + "Pri 5", + "Pri 6", + "Pri 7", + "Pri 8", + "Pri 9", + "Pri 10", + "Pri 11"); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + if (pname != "" && name != pname) + return; + + string regionName = scene.RegionInfo.RegionName; + + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); + report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); + } + }); + } + } + + return report.ToString(); + } + /// /// Generate UDP Queue data report for each client /// @@ -163,10 +250,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden protected string GetQueuesReport(string[] showParams) { bool showChildren = false; + string pname = ""; if (showParams.Length > 2 && showParams[2] == "full") showChildren = true; - + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + StringBuilder report = new StringBuilder(); int columnPadding = 2; @@ -224,6 +314,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return; string name = client.Name; + if (pname != "" && name != pname) + return; + string regionName = scene.RegionInfo.RegionName; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); @@ -249,10 +342,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden protected string GetThrottlesReport(string[] showParams) { bool showChildren = false; + string pname = ""; if (showParams.Length > 2 && showParams[2] == "full") showChildren = true; - + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + StringBuilder report = new StringBuilder(); int columnPadding = 2; @@ -314,6 +410,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return; string name = client.Name; + if (pname != "" && name != pname) + return; + string regionName = scene.RegionInfo.RegionName; LLUDPClient llUdpClient = llClient.UDPClient; -- cgit v1.1 From 024c12abc3aa42432e55e322141cad1edeb5bad1 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 25 Apr 2011 10:44:41 -0700 Subject: Cleaned up various configuration options. Removed the category throttle limits because the only ones used now are the defaults (which are overwritten by the client throttles anyway). Updated the default rates to correspond to about 350kbps. Also added a configuration to disable adaptive throttle. The default is the previous behavior (no adaptation). --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index ddbc079..db17d8f 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden if (client is LLClientView) { LLClientView llClient = client as LLClientView; - + if (firstClient) { report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); @@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int maxRegionNameLength = 14; int maxTypeLength = 4; - string name = "SERVER AGENT LIMITS"; + string name = "SERVER AGENT RATES"; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); @@ -461,13 +461,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.AppendFormat( "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", (throttleRates.Total * 8) / 1000, - (throttleRates.ResendLimit * 8) / 1000, - (throttleRates.LandLimit * 8) / 1000, - (throttleRates.WindLimit * 8) / 1000, - (throttleRates.CloudLimit * 8) / 1000, - (throttleRates.TaskLimit * 8) / 1000, - (throttleRates.TextureLimit * 8) / 1000, - (throttleRates.AssetLimit * 8) / 1000); + (throttleRates.Resend * 8) / 1000, + (throttleRates.Land * 8) / 1000, + (throttleRates.Wind * 8) / 1000, + (throttleRates.Cloud * 8) / 1000, + (throttleRates.Task * 8) / 1000, + (throttleRates.Texture * 8) / 1000, + (throttleRates.Asset * 8) / 1000); return report.ToString(); } -- cgit v1.1