aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Monitoring/ServerStatsCollector.cs3
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs22
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
index ff0fcd5..77315bb 100644
--- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
@@ -82,6 +82,9 @@ namespace OpenSim.Framework.Monitoring
82 // IRegionModuleBase.Initialize 82 // IRegionModuleBase.Initialize
83 public void Initialise(IConfigSource source) 83 public void Initialise(IConfigSource source)
84 { 84 {
85 if (source == null)
86 return;
87
85 IConfig cfg = source.Configs["Monitoring"]; 88 IConfig cfg = source.Configs["Monitoring"];
86 89
87 if (cfg != null) 90 if (cfg != null)
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 69dd950..b199931 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -38,6 +38,7 @@ using log4net.Repository;
38using Nini.Config; 38using Nini.Config;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Framework.Console; 40using OpenSim.Framework.Console;
41using OpenSim.Framework.Monitoring;
41using pCampBot.Interfaces; 42using pCampBot.Interfaces;
42 43
43namespace pCampBot 44namespace pCampBot
@@ -143,6 +144,11 @@ namespace pCampBot
143 private HashSet<string> m_defaultBehaviourSwitches = new HashSet<string>(); 144 private HashSet<string> m_defaultBehaviourSwitches = new HashSet<string>();
144 145
145 /// <summary> 146 /// <summary>
147 /// Collects general information on this server (which reveals this to be a misnamed class).
148 /// </summary>
149 private ServerStatsCollector m_serverStatsCollector;
150
151 /// <summary>
146 /// Constructor Creates MainConsole.Instance to take commands and provide the place to write data 152 /// Constructor Creates MainConsole.Instance to take commands and provide the place to write data
147 /// </summary> 153 /// </summary>
148 public BotManager() 154 public BotManager()
@@ -151,6 +157,12 @@ namespace pCampBot
151 // to multiple regions. 157 // to multiple regions.
152 Settings.MAX_HTTP_CONNECTIONS = int.MaxValue; 158 Settings.MAX_HTTP_CONNECTIONS = int.MaxValue;
153 159
160// System.Threading.ThreadPool.SetMaxThreads(600, 240);
161//
162// int workerThreads, iocpThreads;
163// System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
164// Console.WriteLine("ThreadPool.GetMaxThreads {0} {1}", workerThreads, iocpThreads);
165
154 InitBotSendAgentUpdates = true; 166 InitBotSendAgentUpdates = true;
155 InitBotRequestObjectTextures = true; 167 InitBotRequestObjectTextures = true;
156 168
@@ -234,6 +246,14 @@ namespace pCampBot
234 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); 246 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus);
235 247
236 m_bots = new List<Bot>(); 248 m_bots = new List<Bot>();
249
250 Watchdog.Enabled = true;
251 StatsManager.RegisterConsoleCommands(m_console);
252
253 m_serverStatsCollector = new ServerStatsCollector();
254 m_serverStatsCollector.Initialise(null);
255 m_serverStatsCollector.Enabled = true;
256 m_serverStatsCollector.Start();
237 } 257 }
238 258
239 /// <summary> 259 /// <summary>
@@ -697,6 +717,8 @@ namespace pCampBot
697 717
698 MainConsole.Instance.Output("Shutting down"); 718 MainConsole.Instance.Output("Shutting down");
699 719
720 m_serverStatsCollector.Close();
721
700 Environment.Exit(0); 722 Environment.Exit(0);
701 } 723 }
702 724