diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/ServerStatsCollector.cs | 3 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 22 | ||||
-rwxr-xr-x | bin/OpenMetaverse.dll | bin | 2275840 -> 2276352 bytes | |||
-rwxr-xr-x | bin/pCampBot.exe.config | 21 | ||||
-rw-r--r-- | prebuild.xml | 1 |
5 files changed, 47 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; | |||
38 | using Nini.Config; | 38 | using Nini.Config; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
41 | using OpenSim.Framework.Monitoring; | ||
41 | using pCampBot.Interfaces; | 42 | using pCampBot.Interfaces; |
42 | 43 | ||
43 | namespace pCampBot | 44 | namespace 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 | ||
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index e13c009..3bd40c4 100755 --- a/bin/OpenMetaverse.dll +++ b/bin/OpenMetaverse.dll | |||
Binary files differ | |||
diff --git a/bin/pCampBot.exe.config b/bin/pCampBot.exe.config index 89350b0..f017309 100755 --- a/bin/pCampBot.exe.config +++ b/bin/pCampBot.exe.config | |||
@@ -10,6 +10,10 @@ | |||
10 | </appSettings> | 10 | </appSettings> |
11 | <log4net> | 11 | <log4net> |
12 | <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console"> | 12 | <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console"> |
13 | <filter type="log4net.Filter.LoggerMatchFilter"> | ||
14 | <loggerToMatch value="special"/> | ||
15 | <acceptOnMatch value="false"/> | ||
16 | </filter> | ||
13 | <layout type="log4net.Layout.PatternLayout"> | 17 | <layout type="log4net.Layout.PatternLayout"> |
14 | <conversionPattern value="%date{HH:mm:ss.fff} - %message" /> | 18 | <conversionPattern value="%date{HH:mm:ss.fff} - %message" /> |
15 | </layout> | 19 | </layout> |
@@ -17,15 +21,32 @@ | |||
17 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | 21 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> |
18 | <file value="pCampBot.log" /> | 22 | <file value="pCampBot.log" /> |
19 | <appendToFile value="true" /> | 23 | <appendToFile value="true" /> |
24 | <filter type="log4net.Filter.LoggerMatchFilter"> | ||
25 | <loggerToMatch value="special"/> | ||
26 | <acceptOnMatch value="false"/> | ||
27 | </filter> | ||
20 | <layout type="log4net.Layout.PatternLayout"> | 28 | <layout type="log4net.Layout.PatternLayout"> |
21 | <conversionPattern value="%date %-5level - %logger %message%newline" /> | 29 | <conversionPattern value="%date %-5level - %logger %message%newline" /> |
22 | </layout> | 30 | </layout> |
23 | </appender> | 31 | </appender> |
24 | 32 | ||
33 | <appender name="StatsLogFileAppender" type="log4net.Appender.FileAppender"> | ||
34 | <file value="pCampBotStats.log"/> | ||
35 | <appendToFile value="true" /> | ||
36 | <layout type="log4net.Layout.PatternLayout"> | ||
37 | <conversionPattern value="%date - %message%newline" /> | ||
38 | </layout> | ||
39 | </appender> | ||
40 | |||
25 | <root> | 41 | <root> |
26 | <level value="DEBUG" /> | 42 | <level value="DEBUG" /> |
27 | <appender-ref ref="Console" /> | 43 | <appender-ref ref="Console" /> |
28 | <appender-ref ref="LogFileAppender" /> | 44 | <appender-ref ref="LogFileAppender" /> |
29 | </root> | 45 | </root> |
46 | |||
47 | <!-- used for stats recording --> | ||
48 | <logger name="special.StatsLogger"> | ||
49 | <appender-ref ref="StatsLogFileAppender"/> | ||
50 | </logger> | ||
30 | </log4net> | 51 | </log4net> |
31 | </configuration> | 52 | </configuration> |
diff --git a/prebuild.xml b/prebuild.xml index be77950..006f545 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -2531,6 +2531,7 @@ | |||
2531 | <Reference name="OpenMetaverse" path="../../../bin/"/> | 2531 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2532 | <Reference name="OpenSim.Framework"/> | 2532 | <Reference name="OpenSim.Framework"/> |
2533 | <Reference name="OpenSim.Framework.Console"/> | 2533 | <Reference name="OpenSim.Framework.Console"/> |
2534 | <Reference name="OpenSim.Framework.Monitoring"/> | ||
2534 | <Reference name="Nini" path="../../../bin/"/> | 2535 | <Reference name="Nini" path="../../../bin/"/> |
2535 | <Reference name="log4net" path="../../../bin/"/> | 2536 | <Reference name="log4net" path="../../../bin/"/> |
2536 | 2537 | ||