diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 3d2008050b..65d4d3250e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -247,13 +247,17 @@ namespace OpenSim.Framework.Servers
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
+
+ int timeNow = Util.EnvironmentTickCount();
+
foreach (Watchdog.ThreadWatchdogInfo twi in threads)
{
Thread t = twi.Thread;
- sb.Append(
- "ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: "
- + "Pri: " + t.Priority + ", State: " + t.ThreadState);
+ sb.AppendFormat(
+ "ID: {0}, Name: {1}, Last Update: {2} ms ago, Pri: {3}, State: {4}",
+ t.ManagedThreadId, t.Name, timeNow - twi.LastTick, t.Priority, t.ThreadState);
+
sb.Append(Environment.NewLine);
}
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 8e82f5ad29..0ee0c5bd0b 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -48,6 +48,15 @@ namespace OpenSim.Framework
public class ThreadWatchdogInfo
{
public Thread Thread { get; private set; }
+
+ ///
+ /// Approximate tick when this thread was started.
+ ///
+ public int StartTick { get; private set; }
+
+ ///
+ /// Last time this heartbeat update was invoked
+ ///
public int LastTick { get; set; }
///
@@ -64,7 +73,8 @@ namespace OpenSim.Framework
{
Thread = thread;
Timeout = timeout;
- LastTick = Environment.TickCount & Int32.MaxValue;
+ StartTick = Environment.TickCount & Int32.MaxValue;
+ LastTick = StartTick;
}
}