aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 65d4d32..41a0e4e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -243,6 +243,9 @@ 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,10} {4,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
@@ -250,12 +253,16 @@ namespace OpenSim.Framework.Servers
250 253
251 int timeNow = Util.EnvironmentTickCount(); 254 int timeNow = Util.EnvironmentTickCount();
252 255
256 sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "PRIORITY", "STATE");
257 sb.Append(Environment.NewLine);
258
253 foreach (Watchdog.ThreadWatchdogInfo twi in threads) 259 foreach (Watchdog.ThreadWatchdogInfo twi in threads)
254 { 260 {
255 Thread t = twi.Thread; 261 Thread t = twi.Thread;
256 262
257 sb.AppendFormat( 263 sb.AppendFormat(
258 "ID: {0}, Name: {1}, Last Update: {2} ms ago, Pri: {3}, State: {4}", 264 reportFormat,
265 //t.ManagedThreadId, t.Name, string.Format("{0} ms", timeNow - twi.LastTick), t.Priority, t.ThreadState);
259 t.ManagedThreadId, t.Name, timeNow - twi.LastTick, t.Priority, t.ThreadState); 266 t.ManagedThreadId, t.Name, timeNow - twi.LastTick, t.Priority, t.ThreadState);
260 267
261 sb.Append(Environment.NewLine); 268 sb.Append(Environment.NewLine);