aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index fc739d9..59f7c63 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -754,15 +754,30 @@ namespace OpenSim
754 break; 754 break;
755 755
756 case "threads": 756 case "threads":
757 m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); 757 //m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:");
758 int _tc = 0; 758 //int _tc = 0;
759 759
760 foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) 760 //foreach (ProcessThread pt in Process.GetCurrentProcess().Threads)
761 //{
762 // _tc++;
763 // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString());
764
765 //}
766 List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads();
767 if (threads == null)
768 {
769 m_console.Notice("THREAD", "Thread tracking is only enabled in DEBUG mode.");
770 }
771 else
772 {
773 int _tc = 0;
774 m_console.Notice("THREAD", threads.Count + " threads are being tracked:");
775 foreach (Thread t in threads)
761 { 776 {
762 _tc++; 777 _tc++;
763 m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); 778 m_console.Notice("THREAD", _tc + ": ID: " + t.ManagedThreadId.ToString() + ", Name: " + t.Name + ", Alive: " + t.IsAlive.ToString() + ", Pri: " + t.Priority.ToString() + ", State: " + t.ThreadState.ToString());
764
765 } 779 }
780 }
766 781
767 782
768 break; 783 break;