aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs46
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs8
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--prebuild.xml1
6 files changed, 55 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index ca6ef67..4d82020 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -373,7 +373,7 @@ namespace OpenSim.Framework.Servers
373 /// That is something that cannot be determined within this class. So 373 /// That is something that cannot be determined within this class. So
374 /// all attempts to use the console MUST be verified. 374 /// all attempts to use the console MUST be verified.
375 /// </summary> 375 /// </summary>
376 private void Notice(string msg) 376 protected void Notice(string msg)
377 { 377 {
378 if (m_console != null) 378 if (m_console != null)
379 { 379 {
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
675 m_console.Notice("script - manually trigger scripts? or script commands?"); 675 m_console.Notice("script - manually trigger scripts? or script commands?");
676 m_console.Notice("set-time [x] - set the current scene time phase"); 676 m_console.Notice("set-time [x] - set the current scene time phase");
677 m_console.Notice("show assets - show state of asset cache."); 677 m_console.Notice("show assets - show state of asset cache.");
678 m_console.Notice("show users - show info about connected users (only root agents).");
679 m_console.Notice("show users full - show info about connected users (root and child agents).");
680 m_console.Notice("show modules - shows info about loaded modules."); 678 m_console.Notice("show modules - shows info about loaded modules.");
679 m_console.Notice("show queues - show packet queues length for all clients.");
681 m_console.Notice("show regions - show running region information."); 680 m_console.Notice("show regions - show running region information.");
681 m_console.Notice("show users - show info about connected users (only root agents).");
682 m_console.Notice("show users full - show info about connected users (root and child agents).");
682 m_console.Notice("config set section field value - set a config value"); 683 m_console.Notice("config set section field value - set a config value");
683 m_console.Notice("config get section field - get a config value"); 684 m_console.Notice("config get section field - get a config value");
684 m_console.Notice("config save - save OpenSim.ini"); 685 m_console.Notice("config save - save OpenSim.ini");
@@ -769,9 +770,50 @@ namespace OpenSim
769 scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString()); 770 scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString());
770 }); 771 });
771 break; 772 break;
773
774
775 case "queues":
776 Notice(GetQueuesReport());
777 break;
772 } 778 }
773 } 779 }
774 780
781 private string GetQueuesReport()
782 {
783 string report = String.Empty;
784
785 m_sceneManager.ForEachScene(delegate(Scene scene)
786 {
787 scene.ForEachClient(delegate(IClientAPI client)
788 {
789 if (client is IStatsCollector)
790 {
791 report = report + client.FirstName +
792 " " + client.LastName + "\n";
793
794 IStatsCollector stats =
795 (IStatsCollector) client;
796
797 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",
798 "Send",
799 "In",
800 "Out",
801 "Resend",
802 "Land",
803 "Wind",
804 "Cloud",
805 "Task",
806 "Texture",
807 "Asset");
808 report = report + stats.Report() +
809 "\n\n";
810 }
811 });
812 });
813
814 return report;
815 }
816
775 /// <summary> 817 /// <summary>
776 /// Create a new user 818 /// Create a new user
777 /// </summary> 819 /// </summary>
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9d6e3af..5ce5235 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
52 /// Handles new client connections 52 /// Handles new client connections
53 /// Constructor takes a single Packet and authenticates everything 53 /// Constructor takes a single Packet and authenticates everything
54 /// </summary> 54 /// </summary>
55 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat 55 public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IStatsCollector
56 { 56 {
57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
58 58
@@ -8093,5 +8093,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8093 } 8093 }
8094 } 8094 }
8095 } 8095 }
8096
8097 public string Report()
8098 {
8099 LLPacketHandler handler = (LLPacketHandler) m_PacketHandler;
8100 return handler.PacketQueue.GetStats();
8101 }
8096 } 8102 }
8097} 8103}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 4383493..365c35f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -610,7 +610,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
610 // See IPullStatsProvider 610 // See IPullStatsProvider
611 public string GetStats() 611 public string GetStats()
612 { 612 {
613 return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", 613 return string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
614 SendQueue.Count(), 614 SendQueue.Count(),
615 IncomingPacketQueue.Count, 615 IncomingPacketQueue.Count,
616 OutgoingPacketQueue.Count, 616 OutgoingPacketQueue.Count,
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 8dcd071..7a4c385 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -4227,7 +4227,7 @@ namespace OpenSim.Region.Environment.Scenes
4227 return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar); 4227 return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar);
4228 } 4228 }
4229 4229
4230 internal void ForEachClient(Action<IClientAPI> action) 4230 public void ForEachClient(Action<IClientAPI> action)
4231 { 4231 {
4232 m_sceneGraph.ForEachClient(action); 4232 m_sceneGraph.ForEachClient(action);
4233 } 4233 }
diff --git a/prebuild.xml b/prebuild.xml
index 5e67670..006a063 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2346,6 +2346,7 @@
2346 <Reference name="OpenSim.Framework"/> 2346 <Reference name="OpenSim.Framework"/>
2347 <Reference name="OpenSim.Data"/> 2347 <Reference name="OpenSim.Data"/>
2348 <Reference name="OpenSim.Framework.Servers"/> 2348 <Reference name="OpenSim.Framework.Servers"/>
2349 <Reference name="OpenSim.Framework.Statistics"/>
2349 <Reference name="OpenSim.Framework.Console"/> 2350 <Reference name="OpenSim.Framework.Console"/>
2350 <Reference name="OpenSim.Region.Environment"/> 2351 <Reference name="OpenSim.Region.Environment"/>
2351 <Reference name="OpenSim.Region.ClientStack"/> 2352 <Reference name="OpenSim.Region.ClientStack"/>