diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs index ff0fcd5b32..77315bb980 100644 --- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs @@ -82,6 +82,9 @@ namespace OpenSim.Framework.Monitoring // IRegionModuleBase.Initialize public void Initialise(IConfigSource source) { + if (source == null) + return; + IConfig cfg = source.Configs["Monitoring"]; if (cfg != null) diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 69dd950a3d..b1999317b3 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -38,6 +38,7 @@ using log4net.Repository; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; +using OpenSim.Framework.Monitoring; using pCampBot.Interfaces; namespace pCampBot @@ -142,6 +143,11 @@ namespace pCampBot /// private HashSet m_defaultBehaviourSwitches = new HashSet(); + /// + /// Collects general information on this server (which reveals this to be a misnamed class). + /// + private ServerStatsCollector m_serverStatsCollector; + /// /// Constructor Creates MainConsole.Instance to take commands and provide the place to write data /// @@ -151,6 +157,12 @@ namespace pCampBot // to multiple regions. Settings.MAX_HTTP_CONNECTIONS = int.MaxValue; +// System.Threading.ThreadPool.SetMaxThreads(600, 240); +// +// int workerThreads, iocpThreads; +// System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); +// Console.WriteLine("ThreadPool.GetMaxThreads {0} {1}", workerThreads, iocpThreads); + InitBotSendAgentUpdates = true; InitBotRequestObjectTextures = true; @@ -234,6 +246,14 @@ namespace pCampBot "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); m_bots = new List(); + + Watchdog.Enabled = true; + StatsManager.RegisterConsoleCommands(m_console); + + m_serverStatsCollector = new ServerStatsCollector(); + m_serverStatsCollector.Initialise(null); + m_serverStatsCollector.Enabled = true; + m_serverStatsCollector.Start(); } /// @@ -697,6 +717,8 @@ namespace pCampBot MainConsole.Instance.Output("Shutting down"); + m_serverStatsCollector.Close(); + Environment.Exit(0); } diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index e13c00992a..3bd40c4f13 100755 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/pCampBot.exe.config b/bin/pCampBot.exe.config index 89350b053d..f0173092b0 100755 --- a/bin/pCampBot.exe.config +++ b/bin/pCampBot.exe.config @@ -10,6 +10,10 @@ + + + + @@ -17,15 +21,32 @@ + + + + + + + + + + + + + + + + + diff --git a/prebuild.xml b/prebuild.xml index be77950a1f..006f545fd4 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -2531,6 +2531,7 @@ +