diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index ca6ef67e9b..4d820203a1 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
/// That is something that cannot be determined within this class. So
/// all attempts to use the console MUST be verified.
///
- private void Notice(string msg)
+ protected void Notice(string msg)
{
if (m_console != null)
{
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 6cb0586206..96e2d39078 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -675,10 +675,11 @@ namespace OpenSim
m_console.Notice("script - manually trigger scripts? or script commands?");
m_console.Notice("set-time [x] - set the current scene time phase");
m_console.Notice("show assets - show state of asset cache.");
+ m_console.Notice("show modules - shows info about loaded modules.");
+ m_console.Notice("show queues - show packet queues length for all clients.");
+ m_console.Notice("show regions - show running region information.");
m_console.Notice("show users - show info about connected users (only root agents).");
m_console.Notice("show users full - show info about connected users (root and child agents).");
- m_console.Notice("show modules - shows info about loaded modules.");
- m_console.Notice("show regions - show running region information.");
m_console.Notice("config set section field value - set a config value");
m_console.Notice("config get section field - get a config value");
m_console.Notice("config save - save OpenSim.ini");
@@ -769,9 +770,50 @@ namespace OpenSim
scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
});
break;
+
+
+ case "queues":
+ Notice(GetQueuesReport());
+ break;
}
}
+ private string GetQueuesReport()
+ {
+ string report = String.Empty;
+
+ m_sceneManager.ForEachScene(delegate(Scene scene)
+ {
+ scene.ForEachClient(delegate(IClientAPI client)
+ {
+ if (client is IStatsCollector)
+ {
+ report = report + client.FirstName +
+ " " + client.LastName + "\n";
+
+ IStatsCollector stats =
+ (IStatsCollector) client;
+
+ report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n",
+ "Send",
+ "In",
+ "Out",
+ "Resend",
+ "Land",
+ "Wind",
+ "Cloud",
+ "Task",
+ "Texture",
+ "Asset");
+ report = report + stats.Report() +
+ "\n\n";
+ }
+ });
+ });
+
+ return report;
+ }
+
///
/// Create a new user
///
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9d6e3af61b..5ce52352a3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Handles new client connections
/// Constructor takes a single Packet and authenticates everything
///
- public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat
+ public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IStatsCollector
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -8093,5 +8093,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
}
+
+ public string Report()
+ {
+ LLPacketHandler handler = (LLPacketHandler) m_PacketHandler;
+ return handler.PacketQueue.GetStats();
+ }
}
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 4383493dc3..365c35f717 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -610,7 +610,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// See IPullStatsProvider
public string GetStats()
{
- return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
+ return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
SendQueue.Count(),
IncomingPacketQueue.Count,
OutgoingPacketQueue.Count,
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 8dcd071156..7a4c385f0a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -4227,7 +4227,7 @@ namespace OpenSim.Region.Environment.Scenes
return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar);
}
- internal void ForEachClient(Action action)
+ public void ForEachClient(Action action)
{
m_sceneGraph.ForEachClient(action);
}
diff --git a/prebuild.xml b/prebuild.xml
index 5e67670943..006a0630e6 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2346,6 +2346,7 @@
+