diff options
author | Diva Canto | 2011-02-05 17:57:30 -0800 |
---|---|---|
committer | Diva Canto | 2011-02-05 17:57:30 -0800 |
commit | b20ab1063f5717a69fb3226c44b4af5228280d35 (patch) | |
tree | c2c9ae477759644e6d394243fada94d92405aa9c | |
parent | Add sane packing of ServiceURLs -- OSDMap. The old way (OSDArray) is still su... (diff) | |
download | opensim-SC_OLD-b20ab1063f5717a69fb3226c44b4af5228280d35.zip opensim-SC_OLD-b20ab1063f5717a69fb3226c44b4af5228280d35.tar.gz opensim-SC_OLD-b20ab1063f5717a69fb3226c44b4af5228280d35.tar.bz2 opensim-SC_OLD-b20ab1063f5717a69fb3226c44b4af5228280d35.tar.xz |
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
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 50 |
2 files changed, 82 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index d4ee7ba..4c35132 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -143,6 +143,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | public List<string> GetStreamHandlerKeys() | ||
147 | { | ||
148 | return new List<string>(m_streamHandlers.Keys); | ||
149 | } | ||
150 | |||
146 | private static string GetHandlerKey(string httpMethod, string path) | 151 | private static string GetHandlerKey(string httpMethod, string path) |
147 | { | 152 | { |
148 | return httpMethod + ":" + path; | 153 | return httpMethod + ":" + path; |
@@ -179,6 +184,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
179 | } | 184 | } |
180 | } | 185 | } |
181 | 186 | ||
187 | public List<string> GetXmlRpcHandlerKeys() | ||
188 | { | ||
189 | return new List<string>(m_rpcHandlers.Keys); | ||
190 | } | ||
191 | |||
182 | public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) | 192 | public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) |
183 | { | 193 | { |
184 | //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); | 194 | //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); |
@@ -196,6 +206,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
196 | return false; | 206 | return false; |
197 | } | 207 | } |
198 | 208 | ||
209 | public List<string> GetHTTPHandlerKeys() | ||
210 | { | ||
211 | return new List<string>(m_HTTPHandlers.Keys); | ||
212 | } | ||
213 | |||
214 | |||
199 | public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) | 215 | public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args) |
200 | { | 216 | { |
201 | bool pollHandlerResult = false; | 217 | bool pollHandlerResult = false; |
@@ -214,6 +230,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
214 | return false; | 230 | return false; |
215 | } | 231 | } |
216 | 232 | ||
233 | public List<string> GetPollServiceHandlerKeys() | ||
234 | { | ||
235 | return new List<string>(m_pollHandlers.Keys); | ||
236 | } | ||
237 | |||
238 | |||
217 | // Note that the agent string is provided simply to differentiate | 239 | // Note that the agent string is provided simply to differentiate |
218 | // the handlers - it is NOT required to be an actual agent header | 240 | // the handlers - it is NOT required to be an actual agent header |
219 | // value. | 241 | // value. |
@@ -232,6 +254,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
232 | return false; | 254 | return false; |
233 | } | 255 | } |
234 | 256 | ||
257 | public List<string> GetAgentHandlerKeys() | ||
258 | { | ||
259 | return new List<string>(m_agentHandlers.Keys); | ||
260 | } | ||
261 | |||
235 | public bool AddLLSDHandler(string path, LLSDMethod handler) | 262 | public bool AddLLSDHandler(string path, LLSDMethod handler) |
236 | { | 263 | { |
237 | lock (m_llsdHandlers) | 264 | lock (m_llsdHandlers) |
@@ -245,6 +272,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
245 | return false; | 272 | return false; |
246 | } | 273 | } |
247 | 274 | ||
275 | public List<string> GetLLSDHandlerKeys() | ||
276 | { | ||
277 | return new List<string>(m_llsdHandlers.Keys); | ||
278 | } | ||
279 | |||
248 | public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler) | 280 | public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler) |
249 | { | 281 | { |
250 | m_defaultLlsdHandler = handler; | 282 | m_defaultLlsdHandler = handler; |
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 | |||
294 | "show connections", | 294 | "show connections", |
295 | "Show connection data", HandleShow); | 295 | "Show connection data", HandleShow); |
296 | 296 | ||
297 | m_console.Commands.AddCommand("region", false, "show circuits", | ||
298 | "show circuits", | ||
299 | "Show agent circuit data", HandleShow); | ||
300 | |||
301 | m_console.Commands.AddCommand("region", false, "show http-handlers", | ||
302 | "show http-handlers", | ||
303 | "Show all registered http handlers", HandleShow); | ||
304 | |||
297 | m_console.Commands.AddCommand("region", false, "show modules", | 305 | m_console.Commands.AddCommand("region", false, "show modules", |
298 | "show modules", | 306 | "show modules", |
299 | "Show module data", HandleShow); | 307 | "Show module data", HandleShow); |
@@ -943,6 +951,48 @@ namespace OpenSim | |||
943 | MainConsole.Instance.Output(connections.ToString()); | 951 | MainConsole.Instance.Output(connections.ToString()); |
944 | break; | 952 | break; |
945 | 953 | ||
954 | case "circuits": | ||
955 | System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); | ||
956 | m_sceneManager.ForEachScene( | ||
957 | delegate(Scene scene) | ||
958 | { | ||
959 | //this.HttpServer. | ||
960 | acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); | ||
961 | foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values) | ||
962 | acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root")); | ||
963 | } | ||
964 | ); | ||
965 | |||
966 | MainConsole.Instance.Output(acd.ToString()); | ||
967 | break; | ||
968 | |||
969 | case "http-handlers": | ||
970 | System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n"); | ||
971 | |||
972 | handlers.AppendFormat("* XMLRPC:\n"); | ||
973 | foreach (String s in HttpServer.GetXmlRpcHandlerKeys()) | ||
974 | handlers.AppendFormat("\t{0}\n", s); | ||
975 | |||
976 | handlers.AppendFormat("* HTTP:\n"); | ||
977 | List<String> poll = HttpServer.GetPollServiceHandlerKeys(); | ||
978 | foreach (String s in HttpServer.GetHTTPHandlerKeys()) | ||
979 | handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); | ||
980 | |||
981 | handlers.AppendFormat("* Agent:\n"); | ||
982 | foreach (String s in HttpServer.GetAgentHandlerKeys()) | ||
983 | handlers.AppendFormat("\t{0}\n", s); | ||
984 | |||
985 | handlers.AppendFormat("* LLSD:\n"); | ||
986 | foreach (String s in HttpServer.GetLLSDHandlerKeys()) | ||
987 | handlers.AppendFormat("\t{0}\n", s); | ||
988 | |||
989 | handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count); | ||
990 | foreach (String s in HttpServer.GetStreamHandlerKeys()) | ||
991 | handlers.AppendFormat("\t{0}\n", s); | ||
992 | |||
993 | MainConsole.Instance.Output(handlers.ToString()); | ||
994 | break; | ||
995 | |||
946 | case "modules": | 996 | case "modules": |
947 | MainConsole.Instance.Output("The currently loaded shared modules are:"); | 997 | MainConsole.Instance.Output("The currently loaded shared modules are:"); |
948 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) | 998 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) |