diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index bbcc588fcc..bd1aa468ed 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -302,6 +302,10 @@ namespace OpenSim "show http-handlers", "Show all registered http handlers", HandleShow); + m_console.Commands.AddCommand("region", false, "show pending-objects", + "show pending-objects", + "Show # of objects on the pending queues of all scene viewers", HandleShow); + m_console.Commands.AddCommand("region", false, "show modules", "show modules", "Show module data", HandleShow); @@ -993,6 +997,24 @@ namespace OpenSim MainConsole.Instance.Output(handlers.ToString()); break; + case "pending-objects": + System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n"); + m_sceneManager.ForEachScene( + delegate(Scene scene) + { + scene.ForEachScenePresence( + delegate(ScenePresence sp) + { + pending.AppendFormat("{0}: {1} {2} pending\n", + scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount()); + } + ); + } + ); + + MainConsole.Instance.Output(pending.ToString()); + break; + case "modules": MainConsole.Instance.Output("The currently loaded shared modules are:"); foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs index 7251d57f69..2397f223b3 100644 --- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs +++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs @@ -36,5 +36,6 @@ namespace OpenSim.Region.Framework.Interfaces void Close(); void QueuePartForUpdate(SceneObjectPart part); void SendPrimUpdates(); + int GetPendingObjectsCount(); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index b44a0100a4..7c067ca148 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs @@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes Reset(); } + public int GetPendingObjectsCount() + { + if (m_pendingObjects != null) + return m_pendingObjects.Count; + + return 0; + } + public class ScenePartUpdate { public UUID FullID;