aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorlbsa712008-12-18 13:16:41 +0000
committerlbsa712008-12-18 13:16:41 +0000
commit56f1b03cd0eccb8549b3f87f76b2a9494239b585 (patch)
tree4981057745584d1cb08b97d33db601c786fd4b31 /OpenSim/Region
parent* Add a nasty hack to try and give the HttpServer a few extra lives until we ... (diff)
downloadopensim-SC_OLD-56f1b03cd0eccb8549b3f87f76b2a9494239b585.zip
opensim-SC_OLD-56f1b03cd0eccb8549b3f87f76b2a9494239b585.tar.gz
opensim-SC_OLD-56f1b03cd0eccb8549b3f87f76b2a9494239b585.tar.bz2
opensim-SC_OLD-56f1b03cd0eccb8549b3f87f76b2a9494239b585.tar.xz
* Added "show queues" command that shows throttling queues for all clients.
*** This only works for LLCLientView at the moment ***
Diffstat (limited to 'OpenSim/Region')
-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
4 files changed, 53 insertions, 5 deletions
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 }