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 +++++++++++++ .../Common/ScriptEngineBase/AsyncLSLCommandManager.cs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') 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) { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs index 48c6525..222b8f2 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs @@ -214,7 +214,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase // Time has passed? if (ts.next < DateTime.Now.Ticks) { - Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); +// Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); // Add it to queue m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull, null); -- cgit v1.1