aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Monitoring')
-rw-r--r--OpenSim/Framework/Monitoring/ServerStatsCollector.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
index c601c17..0ab4b93 100644
--- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs
@@ -49,6 +49,7 @@ namespace OpenSim.Framework.Monitoring
49 49
50 public readonly string CategoryServer = "server"; 50 public readonly string CategoryServer = "server";
51 51
52 public readonly string ContainerThreadpool = "threadpool";
52 public readonly string ContainerProcessor = "processor"; 53 public readonly string ContainerProcessor = "processor";
53 public readonly string ContainerMemory = "memory"; 54 public readonly string ContainerMemory = "memory";
54 public readonly string ContainerNetwork = "network"; 55 public readonly string ContainerNetwork = "network";
@@ -157,7 +158,7 @@ namespace OpenSim.Framework.Monitoring
157 m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e); 158 m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e);
158 } 159 }
159 160
160 MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerProcessor, 161 MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool,
161 s => 162 s =>
162 { 163 {
163 int workerThreads, iocpThreads; 164 int workerThreads, iocpThreads;
@@ -165,7 +166,7 @@ namespace OpenSim.Framework.Monitoring
165 s.Value = workerThreads; 166 s.Value = workerThreads;
166 }); 167 });
167 168
168 MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerProcessor, 169 MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool,
169 s => 170 s =>
170 { 171 {
171 int workerThreads, iocpThreads; 172 int workerThreads, iocpThreads;
@@ -173,6 +174,16 @@ namespace OpenSim.Framework.Monitoring
173 s.Value = iocpThreads; 174 s.Value = iocpThreads;
174 }); 175 });
175 176
177 if (Util.FireAndForgetMethod != null && Util.GetSmartThreadPoolInfo() != null)
178 {
179 MakeStat("STPMaxThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MaxThreads);
180 MakeStat("STPMinThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MinThreads);
181 MakeStat("STPConcurrency", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MaxConcurrentWorkItems);
182 MakeStat("STPActiveThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().ActiveThreads);
183 MakeStat("STPInUseThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().InUseThreads);
184 MakeStat("STPWorkItemsWaiting", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().WaitingCallbacks);
185 }
186
176 try 187 try
177 { 188 {
178 List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(',')); 189 List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(','));