From b20ab1063f5717a69fb3226c44b4af5228280d35 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Feb 2011 17:57:30 -0800 Subject: Added a couple of console commands to help diagnose issues: show circuits: shows the lists of agent circuit data show http-handlers: shows the currently registered http handlers --- OpenSim/Region/Application/OpenSim.cs | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ed4b620..bbcc588 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -294,6 +294,14 @@ namespace OpenSim "show connections", "Show connection data", HandleShow); + m_console.Commands.AddCommand("region", false, "show circuits", + "show circuits", + "Show agent circuit data", HandleShow); + + m_console.Commands.AddCommand("region", false, "show http-handlers", + "show http-handlers", + "Show all registered http handlers", HandleShow); + m_console.Commands.AddCommand("region", false, "show modules", "show modules", "Show module data", HandleShow); @@ -943,6 +951,48 @@ namespace OpenSim MainConsole.Instance.Output(connections.ToString()); break; + case "circuits": + System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); + m_sceneManager.ForEachScene( + delegate(Scene scene) + { + //this.HttpServer. + acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); + foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values) + acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root")); + } + ); + + MainConsole.Instance.Output(acd.ToString()); + break; + + case "http-handlers": + System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n"); + + handlers.AppendFormat("* XMLRPC:\n"); + foreach (String s in HttpServer.GetXmlRpcHandlerKeys()) + handlers.AppendFormat("\t{0}\n", s); + + handlers.AppendFormat("* HTTP:\n"); + List poll = HttpServer.GetPollServiceHandlerKeys(); + foreach (String s in HttpServer.GetHTTPHandlerKeys()) + handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); + + handlers.AppendFormat("* Agent:\n"); + foreach (String s in HttpServer.GetAgentHandlerKeys()) + handlers.AppendFormat("\t{0}\n", s); + + handlers.AppendFormat("* LLSD:\n"); + foreach (String s in HttpServer.GetLLSDHandlerKeys()) + handlers.AppendFormat("\t{0}\n", s); + + handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count); + foreach (String s in HttpServer.GetStreamHandlerKeys()) + handlers.AppendFormat("\t{0}\n", s); + + MainConsole.Instance.Output(handlers.ToString()); + break; + case "modules": MainConsole.Instance.Output("The currently loaded shared modules are:"); foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) -- cgit v1.1 From 98ea78fc77b3dd6da185d71dfab402a0ef8780d6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Feb 2011 19:39:29 -0800 Subject: New command: show pending-objects --- OpenSim/Region/Application/OpenSim.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index bbcc588..bd1aa46 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -302,6 +302,10 @@ namespace OpenSim "show http-handlers", "Show all registered http handlers", HandleShow); + m_console.Commands.AddCommand("region", false, "show pending-objects", + "show pending-objects", + "Show # of objects on the pending queues of all scene viewers", HandleShow); + m_console.Commands.AddCommand("region", false, "show modules", "show modules", "Show module data", HandleShow); @@ -993,6 +997,24 @@ namespace OpenSim MainConsole.Instance.Output(handlers.ToString()); break; + case "pending-objects": + System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n"); + m_sceneManager.ForEachScene( + delegate(Scene scene) + { + scene.ForEachScenePresence( + delegate(ScenePresence sp) + { + pending.AppendFormat("{0}: {1} {2} pending\n", + scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount()); + } + ); + } + ); + + MainConsole.Instance.Output(pending.ToString()); + break; + case "modules": MainConsole.Instance.Output("The currently loaded shared modules are:"); foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) -- cgit v1.1 From 8fd58aa00c092da188a67573d4aa87c363f44eff Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Feb 2011 22:09:46 +0000 Subject: add estate name to show regions console command --- OpenSim/Region/Application/OpenSim.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index bd1aa46..4081888 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1030,11 +1030,12 @@ namespace OpenSim delegate(Scene scene) { MainConsole.Instance.Output(String.Format( - "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", + "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, - scene.RegionInfo.InternalEndPoint.Port)); + scene.RegionInfo.InternalEndPoint.Port, + scene.RegionInfo.EstateSettings.EstateName)); }); break; -- cgit v1.1