From 25878d68287d89f2d1ab1061319439d93e6119e5 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 14 Oct 2009 13:00:42 -0700 Subject: * Added the "show connections" command to print out all of the currently tracked IClientAPIs --- OpenSim/Region/Application/OpenSim.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4d8409bb..0fcc21e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -239,6 +239,10 @@ namespace OpenSim "show users [full]", "Show user data", HandleShow); + m_console.Commands.AddCommand("region", false, "show connections", + "show connections", + "Show connection data", HandleShow); + m_console.Commands.AddCommand("region", false, "show users full", "show users full", String.Empty, HandleShow); @@ -921,7 +925,25 @@ namespace OpenSim regionName)); } - m_log.Info(""); + m_log.Info(String.Empty); + break; + + case "connections": + System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n"); + m_sceneManager.ForEachScene( + delegate(Scene scene) + { + scene.ClientManager.ForEach( + delegate(IClientAPI client) + { + connections.AppendFormat("{0}: {1} ({2}) from {3} on circuit {4}\n", + scene.RegionInfo.RegionName, client.Name, client.AgentId, client.RemoteEndPoint, client.CircuitCode); + } + ); + } + ); + + m_log.Info(connections.ToString()); break; case "modules": -- cgit v1.1