From 5f7a02fce910674ad875d37ba02730fbf9ecbebb Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Wed, 20 Feb 2008 21:09:23 +0000 Subject: Treads command lists threads, but not thread name (yet) --- OpenSim/Region/Application/OpenSimMain.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index d47e058..fc739d9 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -754,15 +754,17 @@ namespace OpenSim break; case "threads": - if (cmdparams.Length > 0) - { - int c = 0; - foreach (Thread t in Process.GetCurrentProcess().Threads) + m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); + int _tc = 0; + + foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) { - c++; - m_console.Notice("THREAD", "Thread " + c + ": " + t.Name + " (" + t.ToString() + ")"); + _tc++; + m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); + } - } + + break; case "save-xml": if (cmdparams.Length > 0) -- cgit v1.1