diff options
author | Justin Clark-Casey (justincc) | 2010-11-17 20:09:18 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-11-17 22:55:20 +0000 |
commit | af0deff7e9b052e4843bc8d4816ebd7aa80f48f4 (patch) | |
tree | 569403f6304c368c9f582cac65511ffc6c815762 /OpenSim/Region/Application/OpenSim.cs | |
parent | add "Unacked bytes" column to "show queues" (diff) | |
download | opensim-SC_OLD-af0deff7e9b052e4843bc8d4816ebd7aa80f48f4.zip opensim-SC_OLD-af0deff7e9b052e4843bc8d4816ebd7aa80f48f4.tar.gz opensim-SC_OLD-af0deff7e9b052e4843bc8d4816ebd7aa80f48f4.tar.bz2 opensim-SC_OLD-af0deff7e9b052e4843bc8d4816ebd7aa80f48f4.tar.xz |
Make "show queues [full]" behave like "show users [full]"
Now, "show queues" only shows root agents. "show queues full" will show child agents as well
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a90ce33..2c920f6 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -286,16 +286,15 @@ namespace OpenSim | |||
286 | 286 | ||
287 | m_console.Commands.AddCommand("region", false, "show users", | 287 | m_console.Commands.AddCommand("region", false, "show users", |
288 | "show users [full]", | 288 | "show users [full]", |
289 | "Show user data", HandleShow); | 289 | "Show user data for users currently on the region", |
290 | "Without the 'full' option, only users actually on the region are shown." | ||
291 | + " With the 'full' option child agents of users in neighbouring regions are also shown.", | ||
292 | HandleShow); | ||
290 | 293 | ||
291 | m_console.Commands.AddCommand("region", false, "show connections", | 294 | m_console.Commands.AddCommand("region", false, "show connections", |
292 | "show connections", | 295 | "show connections", |
293 | "Show connection data", HandleShow); | 296 | "Show connection data", HandleShow); |
294 | 297 | ||
295 | m_console.Commands.AddCommand("region", false, "show users full", | ||
296 | "show users full", | ||
297 | String.Empty, HandleShow); | ||
298 | |||
299 | m_console.Commands.AddCommand("region", false, "show modules", | 298 | m_console.Commands.AddCommand("region", false, "show modules", |
300 | "show modules", | 299 | "show modules", |
301 | "Show module data", HandleShow); | 300 | "Show module data", HandleShow); |
@@ -305,8 +304,10 @@ namespace OpenSim | |||
305 | "Show region data", HandleShow); | 304 | "Show region data", HandleShow); |
306 | 305 | ||
307 | m_console.Commands.AddCommand("region", false, "show queues", | 306 | m_console.Commands.AddCommand("region", false, "show queues", |
308 | "show queues", | 307 | "show queues [full]", |
309 | "Show queue data for each client", | 308 | "Show queue data for each client", |
309 | "Without the 'full' option, only users actually on the region are shown." | ||
310 | + " With the 'full' option child agents of users in neighbouring regions are also shown.", | ||
310 | HandleShow); | 311 | HandleShow); |
311 | 312 | ||
312 | m_console.Commands.AddCommand("region", false, "show ratings", | 313 | m_console.Commands.AddCommand("region", false, "show ratings", |
@@ -879,7 +880,7 @@ namespace OpenSim | |||
879 | { | 880 | { |
880 | agents = m_sceneManager.GetCurrentSceneAvatars(); | 881 | agents = m_sceneManager.GetCurrentSceneAvatars(); |
881 | } | 882 | } |
882 | 883 | ||
883 | MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); | 884 | MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); |
884 | 885 | ||
885 | MainConsole.Instance.Output( | 886 | MainConsole.Instance.Output( |
@@ -956,7 +957,7 @@ namespace OpenSim | |||
956 | break; | 957 | break; |
957 | 958 | ||
958 | case "queues": | 959 | case "queues": |
959 | Notice(GetQueuesReport()); | 960 | Notice(GetQueuesReport(showParams)); |
960 | break; | 961 | break; |
961 | 962 | ||
962 | case "ratings": | 963 | case "ratings": |
@@ -986,11 +987,17 @@ namespace OpenSim | |||
986 | } | 987 | } |
987 | 988 | ||
988 | /// <summary> | 989 | /// <summary> |
989 | /// print UDP Queue data for each client | 990 | /// Generate UDP Queue data report for each client |
990 | /// </summary> | 991 | /// </summary> |
992 | /// <param name="showParams"></param> | ||
991 | /// <returns></returns> | 993 | /// <returns></returns> |
992 | private string GetQueuesReport() | 994 | private string GetQueuesReport(string[] showParams) |
993 | { | 995 | { |
996 | bool showChildren = false; | ||
997 | |||
998 | if (showParams.Length > 1 && showParams[1] == "full") | ||
999 | showChildren = true; | ||
1000 | |||
994 | StringBuilder report = new StringBuilder(); | 1001 | StringBuilder report = new StringBuilder(); |
995 | 1002 | ||
996 | int columnPadding = 2; | 1003 | int columnPadding = 2; |
@@ -1040,6 +1047,10 @@ namespace OpenSim | |||
1040 | { | 1047 | { |
1041 | if (client is IStatsCollector) | 1048 | if (client is IStatsCollector) |
1042 | { | 1049 | { |
1050 | bool isChild = scene.PresenceChildStatus(client.AgentId); | ||
1051 | if (isChild && !showChildren) | ||
1052 | return; | ||
1053 | |||
1043 | string name = client.Name; | 1054 | string name = client.Name; |
1044 | string regionName = scene.RegionInfo.RegionName; | 1055 | string regionName = scene.RegionInfo.RegionName; |
1045 | 1056 | ||
@@ -1051,7 +1062,7 @@ namespace OpenSim | |||
1051 | regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); | 1062 | regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); |
1052 | report.AppendFormat( | 1063 | report.AppendFormat( |
1053 | "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", | 1064 | "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", |
1054 | scene.PresenceChildStatus(client.AgentId) ? "Cd" : "Rt", ""); | 1065 | isChild ? "Cd" : "Rt", ""); |
1055 | 1066 | ||
1056 | IStatsCollector stats = (IStatsCollector)client; | 1067 | IStatsCollector stats = (IStatsCollector)client; |
1057 | 1068 | ||