aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
authorMelanie2011-11-17 19:04:27 +0000
committerMelanie2011-11-17 19:04:27 +0000
commit31736b1aac0387e51fe37ea9bab2e2e8c86988b6 (patch)
tree14fbdc5f9b677185db1fe8080dafe28796c09336 /OpenSim/Framework/Servers
parentMerge branch 'master' into bigmerge (diff)
parentStop OdePrim and OdeCharacter insanely overriding set LocalID to set their ow... (diff)
downloadopensim-SC-31736b1aac0387e51fe37ea9bab2e2e8c86988b6.zip
opensim-SC-31736b1aac0387e51fe37ea9bab2e2e8c86988b6.tar.gz
opensim-SC-31736b1aac0387e51fe37ea9bab2e2e8c86988b6.tar.bz2
opensim-SC-31736b1aac0387e51fe37ea9bab2e2e8c86988b6.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs21
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs3
2 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 66d0813..3551d5d 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -243,17 +243,32 @@ namespace OpenSim.Framework.Servers
243 /// </summary> 243 /// </summary>
244 protected string GetThreadsReport() 244 protected string GetThreadsReport()
245 { 245 {
246 // This should be a constant field.
247 string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
248
246 StringBuilder sb = new StringBuilder(); 249 StringBuilder sb = new StringBuilder();
247 Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads(); 250 Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
248 251
249 sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine); 252 sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
253
254 int timeNow = Util.EnvironmentTickCount();
255
256 sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
257 sb.Append(Environment.NewLine);
258
250 foreach (Watchdog.ThreadWatchdogInfo twi in threads) 259 foreach (Watchdog.ThreadWatchdogInfo twi in threads)
251 { 260 {
252 Thread t = twi.Thread; 261 Thread t = twi.Thread;
253 262
254 sb.Append( 263 sb.AppendFormat(
255 "ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: " 264 reportFormat,
256 + "Pri: " + t.Priority + ", State: " + t.ThreadState); 265 t.ManagedThreadId,
266 t.Name,
267 timeNow - twi.LastTick,
268 timeNow - twi.FirstTick,
269 t.Priority,
270 t.ThreadState);
271
257 sb.Append(Environment.NewLine); 272 sb.Append(Environment.NewLine);
258 } 273 }
259 274
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 16e56d2..5e171f0 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -69,6 +69,9 @@ namespace OpenSim.Framework.Servers.HttpServer
69 while (m_running) 69 while (m_running)
70 { 70 {
71 PollServiceHttpRequest req = m_request.Dequeue(); 71 PollServiceHttpRequest req = m_request.Dequeue();
72
73 Watchdog.UpdateThread();
74
72 try 75 try
73 { 76 {
74 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) 77 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))