From 701ca1e4b8b3d54e1e93baf54aada3867d403075 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 10 Jan 2013 22:38:48 +0000 Subject: Add "debug scene pbackup true|false" console command. This enables or disable periodic scene backup. For debug purposes. If false, scene is still saved on shutdown. --- OpenSim/Region/Application/OpenSim.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index cffbb3b..492ee4a 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -239,13 +239,15 @@ namespace OpenSim m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); m_console.Commands.AddCommand("Debug", false, "debug scene", - "debug scene active|collisions|physics|scripting|teleport true|false", - "Turn on scene debugging.", + "debug scene active|collisions|pbackup|physics|scripting|teleport|updates true|false", + "Turn on scene debugging options.", "If active is false then main scene update and maintenance loops are suspended.\n" + "If collisions is false then collisions with other objects are turned off.\n" + + "If pbackup is false then periodic scene backup is turned off.\n" + "If physics is false then all physics objects are non-physical.\n" + "If scripting is false then no scripting operations happen.\n" - + "If teleport is true then some extra teleport debug information is logged.", + + "If teleport is true then some extra teleport debug information is logged." + + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.", Debug); m_console.Commands.AddCommand("General", false, "change region", @@ -764,7 +766,7 @@ namespace OpenSim else { MainConsole.Instance.Output( - "Usage: debug scene active|scripting|collisions|physics|teleport true|false"); + "Usage: debug scene active|collisions|pbackup|physics|scripting|teleport|updates true|false"); } break; -- cgit v1.1 From f566dc06182c51399e9dcb66553645c742d29673 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 10 Jan 2013 22:42:12 +0000 Subject: Remove unimplemented "debug teleport" console command --- OpenSim/Region/Application/OpenSim.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 492ee4a..fc87b6d 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -236,8 +236,6 @@ namespace OpenSim + "If an avatar name is given then only packets from that avatar are logged", Debug); - m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); - m_console.Commands.AddCommand("Debug", false, "debug scene", "debug scene active|collisions|pbackup|physics|scripting|teleport|updates true|false", "Turn on scene debugging options.", -- cgit v1.1 From e65737be9369cbb39081026577e93748f8a18fdb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 10 Jan 2013 22:42:33 +0000 Subject: minor: add missing newline to "debug scene" console command --- OpenSim/Region/Application/OpenSim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index fc87b6d..603cfbc 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -244,7 +244,7 @@ namespace OpenSim + "If pbackup is false then periodic scene backup is turned off.\n" + "If physics is false then all physics objects are non-physical.\n" + "If scripting is false then no scripting operations happen.\n" - + "If teleport is true then some extra teleport debug information is logged." + + "If teleport is true then some extra teleport debug information is logged.\n" + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.", Debug); -- cgit v1.1 From a16ae5d7e3e687fdcdae39f848f66087f16433a2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 10 Jan 2013 23:49:48 +0000 Subject: Move scene debug commands into separate module. Command changes from "debug scene " to "debug scene set " to accomodate future settings --- OpenSim/Region/Application/OpenSim.cs | 37 ----------------------------------- 1 file changed, 37 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 603cfbc..c4731a3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -236,18 +236,6 @@ namespace OpenSim + "If an avatar name is given then only packets from that avatar are logged", Debug); - m_console.Commands.AddCommand("Debug", false, "debug scene", - "debug scene active|collisions|pbackup|physics|scripting|teleport|updates true|false", - "Turn on scene debugging options.", - "If active is false then main scene update and maintenance loops are suspended.\n" - + "If collisions is false then collisions with other objects are turned off.\n" - + "If pbackup is false then periodic scene backup is turned off.\n" - + "If physics is false then all physics objects are non-physical.\n" - + "If scripting is false then no scripting operations happen.\n" - + "If teleport is true then some extra teleport debug information is logged.\n" - + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.", - Debug); - m_console.Commands.AddCommand("General", false, "change region", "change region ", "Change current console region", ChangeSelectedRegion); @@ -744,31 +732,6 @@ namespace OpenSim break; - case "scene": - if (args.Length == 4) - { - if (SceneManager.CurrentScene == null) - { - MainConsole.Instance.Output("Please use 'change region ' first"); - } - else - { - string key = args[2]; - string value = args[3]; - SceneManager.CurrentScene.SetSceneCoreDebug( - new Dictionary() { { key, value } }); - - MainConsole.Instance.OutputFormat("Set debug scene {0} = {1}", key, value); - } - } - else - { - MainConsole.Instance.Output( - "Usage: debug scene active|collisions|pbackup|physics|scripting|teleport|updates true|false"); - } - - break; - default: MainConsole.Instance.Output("Unknown debug command"); break; -- cgit v1.1 From 647cb278c714f86c945a449bfecc901982d96687 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 27 Feb 2013 22:25:03 +0000 Subject: Get "show modules" console command to show modules in alphabetical order, and group shared and non-shared modules together This is to make it easier to tell if a region has a certain module active or not --- OpenSim/Region/Application/OpenSim.cs | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c4731a3..20e00e3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -809,15 +810,27 @@ namespace OpenSim case "modules": SceneManager.ForEachScene( - delegate(Scene scene) { - MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:"); - foreach (IRegionModuleBase module in scene.RegionModules.Values) + scene => { - Type type = module.GetType().GetInterface("ISharedRegionModule"); - string module_type = type != null ? "Shared" : "Non-Shared"; - MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name); + MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); + + List sharedModules = new List(); + List nonSharedModules = new List(); + + foreach (IRegionModuleBase module in scene.RegionModules.Values) + { + if (module.GetType().GetInterface("ISharedRegionModule") != null) + nonSharedModules.Add(module); + else + sharedModules.Add(module); + } + + foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) + MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name); + + foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) + MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name); } - } ); MainConsole.Instance.Output(""); -- cgit v1.1 From 0e8ec5649ec5929927760368226ac5c584dc4a4e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 27 Feb 2013 22:31:47 +0000 Subject: Get "show modules" console command to obey selected command line region/s --- OpenSim/Region/Application/OpenSim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 20e00e3..4075edb 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -809,7 +809,7 @@ namespace OpenSim break; case "modules": - SceneManager.ForEachScene( + SceneManager.ForEachSelectedScene( scene => { MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); -- cgit v1.1 From 12900ea84e699f84943009f2d3218fcf5013c6f9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 14 Mar 2013 23:39:15 +0000 Subject: Log same environment information to Robust log as is already done for simulator logs, for debug purposes --- OpenSim/Region/Application/OpenSim.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4075edb..11dd052 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -159,6 +159,7 @@ namespace OpenSim MainConsole.Instance = m_console; + LogEnvironmentInformation(); RegisterCommonAppenders(Config.Configs["Startup"]); RegisterConsoleCommands(); -- cgit v1.1