From 7f000ea88e3fb09ae1e6cb725ff6c32bef03e3bd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 19 Jan 2011 00:33:25 +0000 Subject: Correct "show queues" to show queued packet numbers for each client instead of bytes. Byte amounts aren't actually available - this was a misunderstanding of TokenBucket.Content. But raw packet numbers are. --- OpenSim/Region/Application/OpenSim.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 51eb396..07c1e67 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1014,22 +1014,22 @@ namespace OpenSim report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); report.AppendFormat( - "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", - "Packets", - "Packets", + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "Pkts", + "Pkts", "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes", - "Bytes"); + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts"); report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,9} {1,9} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", "Out", "In", "Unacked", -- cgit v1.1 From f50780f4c2619e74def4c6d39ad5d763b9b64234 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 21:56:48 +0000 Subject: remove unimplemented "show assets" command --- OpenSim/Region/Application/OpenSim.cs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 07c1e67..1832c3d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -283,10 +283,6 @@ namespace OpenSim "kick user [message]", "Kick a user off the simulator", KickUserCommand); - m_console.Commands.AddCommand("region", false, "show assets", - "show assets", - "Show asset data", HandleShow); - m_console.Commands.AddCommand("region", false, "show users", "show users [full]", "Show user data for users currently on the region", @@ -869,10 +865,6 @@ namespace OpenSim switch (showParams[0]) { - case "assets": - MainConsole.Instance.Output("Not implemented."); - break; - case "users": IList agents; if (showParams.Length > 1 && showParams[1] == "full") -- cgit v1.1 From 1baf63dbae8208172aa457963636116d42dbe9b3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 20 Jan 2011 22:57:12 +0000 Subject: Move "show queues" command out of OpenSim.cs and into a separate module. --- OpenSim/Region/Application/OpenSim.cs | 99 ----------------------------------- 1 file changed, 99 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 1832c3d..00a97be 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -301,13 +301,6 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "show regions", "show regions", "Show region data", HandleShow); - - m_console.Commands.AddCommand("region", false, "show queues", - "show queues [full]", - "Show queue data for each client", - "Without the 'full' option, only users actually on the region are shown." - + " With the 'full' option child agents of users in neighbouring regions are also shown.", - HandleShow); m_console.Commands.AddCommand("region", false, "show ratings", "show ratings", @@ -951,10 +944,6 @@ namespace OpenSim }); break; - case "queues": - Notice(GetQueuesReport(showParams)); - break; - case "ratings": m_sceneManager.ForEachScene( delegate(Scene scene) @@ -982,94 +971,6 @@ namespace OpenSim } /// - /// Generate UDP Queue data report for each client - /// - /// - /// - private string GetQueuesReport(string[] showParams) - { - bool showChildren = false; - - if (showParams.Length > 1 && showParams[1] == "full") - showChildren = true; - - 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.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); - - report.AppendFormat( - "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", - "Pkts", - "Pkts", - "Bytes", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts"); - - report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); - report.AppendFormat( - "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", - "Out", - "In", - "Unacked", - "Resend", - "Land", - "Wind", - "Cloud", - "Task", - "Texture", - "Asset", - "State"); - - m_sceneManager.ForEachScene( - delegate(Scene scene) - { - scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is IStatsCollector) - { - bool isChild = scene.PresenceChildStatus(client.AgentId); - if (isChild && !showChildren) - return; - - string name = client.Name; - string regionName = scene.RegionInfo.RegionName; - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); - - IStatsCollector stats = (IStatsCollector)client; - - report.AppendLine(stats.Report()); - } - }); - }); - - return report.ToString(); - } - - /// /// Use XML2 format to serialize data to a file /// /// -- cgit v1.1 From cb14e1d2720fdee0c77280d7c397c02116c278ca Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 23:59:55 +0000 Subject: Update the "config get
" command to "config get [
] []" The config get command shows a current config value on the console. Now, if is omitted then all the values for the given section are printed. If
is ommitted then all sections and all keys are printed. Current config can also be dumped to a file using "config save ". This can be handy for resolving or eliminating config issues --- OpenSim/Region/Application/OpenSim.cs | 66 +++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 00a97be..ed4b620 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -324,16 +324,19 @@ namespace OpenSim "Restart all sims in this instance", RunCommand); m_console.Commands.AddCommand("region", false, "config set", - "config set
", - "Set a config option", HandleConfig); + "config set
", + "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); m_console.Commands.AddCommand("region", false, "config get", - "config get
", - "Read a config option", HandleConfig); + "config get [
] []", + "Show a config option", + "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine + + "If a section is given but not a field, then all fields in that section are printed.", + HandleConfig); m_console.Commands.AddCommand("region", false, "config save", - "config save", - "Save current configuration", HandleConfig); + "config save ", + "Save current configuration to a file at the given path", HandleConfig); m_console.Commands.AddCommand("region", false, "command-script", "command-script