From 56f1b03cd0eccb8549b3f87f76b2a9494239b585 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 18 Dec 2008 13:16:41 +0000 Subject: * Added "show queues" command that shows throttling queues for all clients. *** This only works for LLCLientView at the moment *** --- OpenSim/Region/Application/OpenSim.cs | 46 +++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6cb0586..96e2d39 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 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 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("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 /// -- cgit v1.1