aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-16 03:52:13 +0000
committerJustin Clark-Casey (justincc)2012-03-19 21:32:42 +0000
commit4385fcdeaeed96bf9e5d137d13ea27bca83148bb (patch)
treee85e8f47eb0f69bd65225af515e85ff7c4be4a04 /OpenSim/Framework
parentrefactor: separate out console and status report generation parts of XEngine (diff)
downloadopensim-SC_OLD-4385fcdeaeed96bf9e5d137d13ea27bca83148bb.zip
opensim-SC_OLD-4385fcdeaeed96bf9e5d137d13ea27bca83148bb.tar.gz
opensim-SC_OLD-4385fcdeaeed96bf9e5d137d13ea27bca83148bb.tar.bz2
opensim-SC_OLD-4385fcdeaeed96bf9e5d137d13ea27bca83148bb.tar.xz
Add total scripts count to "show threads"
However, this returns 0 on Mono (at least on 2.6.7)! So not showing if it is zero.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 1534899..cf0859e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -269,10 +269,18 @@ namespace OpenSim.Framework.Servers
269 t.Priority, 269 t.Priority,
270 t.ThreadState); 270 t.ThreadState);
271 271
272 sb.Append(Environment.NewLine); 272 sb.Append("\n");
273 } 273 }
274 274
275 sb.Append("\n*** Main threadpool (excluding script engine)***\n"); 275 sb.Append("\n");
276
277 // For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting
278 // zero active threads.
279 int totalThreads = Process.GetCurrentProcess().Threads.Count;
280 if (totalThreads > 0)
281 sb.AppendFormat("Total threads active: {0}\n\n", Process.GetCurrentProcess().Threads.Count);
282
283 sb.Append("Main threadpool (excluding script engine pools)\n");
276 sb.Append(Util.GetThreadPoolReport()); 284 sb.Append(Util.GetThreadPoolReport());
277 285
278 return sb.ToString(); 286 return sb.ToString();