From 684059afdfd0260f85c3d3151443f458fa96735e Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Wed, 20 Feb 2008 20:22:15 +0000 Subject: div+ threads console command will list all threads. This + yesterdays naming threads patch will give a good overview of what threads we have running. --- OpenSim/Region/Application/OpenSimMain.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 7461006..d47e058 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Text; using System.Threading; @@ -744,6 +745,7 @@ namespace OpenSim m_console.Notice("show users - show info about connected users."); m_console.Notice("show modules - shows info about loaded modules."); m_console.Notice("show stats - statistical information for this server not displayed in the client"); + m_console.Notice("threads - list threads"); m_console.Notice("shutdown - disconnect all clients and shutdown."); m_console.Notice("config set section field value - set a config value"); m_console.Notice("config get section field - get a config value"); @@ -751,6 +753,17 @@ namespace OpenSim m_console.Notice("terrain help - show help for terrain commands."); break; + case "threads": + if (cmdparams.Length > 0) + { + int c = 0; + foreach (Thread t in Process.GetCurrentProcess().Threads) + { + c++; + m_console.Notice("THREAD", "Thread " + c + ": " + t.Name + " (" + t.ToString() + ")"); + } + } + break; case "save-xml": if (cmdparams.Length > 0) { -- cgit v1.1