From f67f37074f3f7e0602b66aa66a044dd9fd107f6a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 24 Feb 2012 05:02:33 +0000
Subject: Stop spurious scene loop startup timeout alarms for scenes with many
prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
---
.../HttpServer/PollServiceRequestManager.cs | 2 +
OpenSim/Framework/Watchdog.cs | 57 +++++++++++++++-------
2 files changed, 42 insertions(+), 17 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 2206feb..0062d4e 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Framework.Servers.HttpServer
String.Format("PollServiceWorkerThread{0}", i),
ThreadPriority.Normal,
false,
+ true,
int.MaxValue);
}
@@ -73,6 +74,7 @@ namespace OpenSim.Framework.Servers.HttpServer
"PollServiceWatcherThread",
ThreadPriority.Normal,
false,
+ true,
1000 * 60 * 10);
}
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 2dd6ebe..e443f0a 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -72,6 +72,11 @@ namespace OpenSim.Framework
///
public bool IsTimedOut { get; set; }
+ ///
+ /// Will this thread trigger the alarm function if it has timed out?
+ ///
+ public bool AlarmIfTimeout { get; set; }
+
public ThreadWatchdogInfo(Thread thread, int timeout)
{
Thread = thread;
@@ -112,12 +117,13 @@ namespace OpenSim.Framework
/// The method that will be executed in a new thread
/// A name to give to the new thread
/// Priority to run the thread at
- /// True to run this thread as a background
- /// thread, otherwise false
+ /// True to run this thread as a background thread, otherwise false
+ /// Trigger an alarm function is we have timed out
/// The newly created Thread object
- public static Thread StartThread(ThreadStart start, string name, ThreadPriority priority, bool isBackground)
+ public static Thread StartThread(
+ ThreadStart start, string name, ThreadPriority priority, bool isBackground, bool alarmIfTimeout)
{
- return StartThread(start, name, priority, isBackground, WATCHDOG_TIMEOUT_MS);
+ return StartThread(start, name, priority, isBackground, alarmIfTimeout, WATCHDOG_TIMEOUT_MS);
}
///
@@ -128,21 +134,21 @@ namespace OpenSim.Framework
/// Priority to run the thread at
/// True to run this thread as a background
/// thread, otherwise false
- ///
- /// Number of milliseconds to wait until we issue a warning about timeout.
- ///
+ /// Trigger an alarm function is we have timed out
+ /// Number of milliseconds to wait until we issue a warning about timeout.
/// The newly created Thread object
public static Thread StartThread(
- ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
+ ThreadStart start, string name, ThreadPriority priority, bool isBackground, bool alarmIfTimeout, int timeout)
{
Thread thread = new Thread(start);
thread.Name = name;
thread.Priority = priority;
thread.IsBackground = isBackground;
- ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
+ ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout) { AlarmIfTimeout = alarmIfTimeout };
- m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
+ m_log.DebugFormat(
+ "[WATCHDOG]: Started tracking thread {0}, ID {1}", twi.Thread.Name, twi.Thread.ManagedThreadId);
lock (m_threads)
m_threads.Add(twi.Thread.ManagedThreadId, twi);
@@ -230,6 +236,26 @@ namespace OpenSim.Framework
return m_threads.Values.ToArray();
}
+ ///
+ /// Return the current thread's watchdog info.
+ ///
+ /// The watchdog info. null if the thread isn't being monitored.
+ public static ThreadWatchdogInfo GetCurrentThreadInfo()
+ {
+ lock (m_threads)
+ {
+ if (m_threads.ContainsKey(Thread.CurrentThread.ManagedThreadId))
+ return m_threads[Thread.CurrentThread.ManagedThreadId];
+ }
+
+ return null;
+ }
+
+ ///
+ /// Check watched threads. Fire alarm if appropriate.
+ ///
+ ///
+ ///
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
{
WatchdogTimeout callback = OnWatchdogTimeout;
@@ -246,21 +272,18 @@ namespace OpenSim.Framework
{
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
{
- timedOut = threadInfo;
RemoveThread(threadInfo.Thread.ManagedThreadId);
- break;
+ callback(threadInfo.Thread, threadInfo.LastTick);
}
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
{
threadInfo.IsTimedOut = true;
- timedOut = threadInfo;
- break;
+
+ if (threadInfo.AlarmIfTimeout)
+ callback(threadInfo.Thread, threadInfo.LastTick);
}
}
}
-
- if (timedOut != null)
- callback(timedOut.Thread, timedOut.LastTick);
}
m_watchdogTimer.Start();
--
cgit v1.1
From 9e6ffe779841f470c0e2dbe673ef4b10253bcd84 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 24 Feb 2012 05:15:47 +0000
Subject: Rename Watchdog.GetThreads() to GetThreadsInfo() to reflect what it
actually returns and for consistency.
---
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +-
OpenSim/Framework/Watchdog.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 0dd01af..6a3135e 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -247,7 +247,7 @@ namespace OpenSim.Framework.Servers
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
StringBuilder sb = new StringBuilder();
- Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
+ Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo();
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index e443f0a..4891a66 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -230,7 +230,7 @@ namespace OpenSim.Framework
/// Get currently watched threads for diagnostic purposes
///
///
- public static ThreadWatchdogInfo[] GetThreads()
+ public static ThreadWatchdogInfo[] GetThreadsInfo()
{
lock (m_threads)
return m_threads.Values.ToArray();
--
cgit v1.1
From bafef292f4d41df14a1edeafc7ba5f9d623d7822 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 24 Feb 2012 05:25:18 +0000
Subject: Take watchdog alarm calling back outside the m_threads lock.
This is how it was originally. This stops a very long running alarm callback from causing a problem.
---
OpenSim/Framework/Watchdog.cs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 4891a66..e93e50e 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -262,7 +262,7 @@ namespace OpenSim.Framework
if (callback != null)
{
- ThreadWatchdogInfo timedOut = null;
+ List callbackInfos = null;
lock (m_threads)
{
@@ -273,17 +273,30 @@ namespace OpenSim.Framework
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
{
RemoveThread(threadInfo.Thread.ManagedThreadId);
- callback(threadInfo.Thread, threadInfo.LastTick);
+
+ if (callbackInfos == null)
+ callbackInfos = new List();
+
+ callbackInfos.Add(threadInfo);
}
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
{
threadInfo.IsTimedOut = true;
if (threadInfo.AlarmIfTimeout)
- callback(threadInfo.Thread, threadInfo.LastTick);
+ {
+ if (callbackInfos == null)
+ callbackInfos = new List();
+
+ callbackInfos.Add(threadInfo);
+ }
}
}
}
+
+ if (callbackInfos != null)
+ foreach (ThreadWatchdogInfo callbackInfo in callbackInfos)
+ callback(callbackInfo.Thread, callbackInfo.LastTick);
}
m_watchdogTimer.Start();
--
cgit v1.1
From 4268427ac36410452bcfee9fe51d7deeb0ef303d Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Mon, 27 Feb 2012 15:15:03 -0800
Subject: Some clean up in WebUtil, remove unused ServiceRequest function.
---
OpenSim/Framework/WebUtil.cs | 78 ++++----------------------------------------
1 file changed, 7 insertions(+), 71 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index b761dfe..af25da9 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -63,77 +63,7 @@ namespace OpenSim.Framework
// a "long" call for warning & debugging purposes
public const int LongCallTime = 500;
-// ///
-// /// Send LLSD to an HTTP client in application/llsd+json form
-// ///
-// /// HTTP response to send the data in
-// /// LLSD to send to the client
-// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
-// {
-// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
-//
-// response.ContentEncoding = Encoding.UTF8;
-// response.ContentLength = responseData.Length;
-// response.ContentType = "application/llsd+json";
-// response.Body.Write(responseData, 0, responseData.Length);
-// }
-//
-// ///
-// /// Send LLSD to an HTTP client in application/llsd+xml form
-// ///
-// /// HTTP response to send the data in
-// /// LLSD to send to the client
-// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
-// {
-// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
-//
-// response.ContentEncoding = Encoding.UTF8;
-// response.ContentLength = responseData.Length;
-// response.ContentType = "application/llsd+xml";
-// response.Body.Write(responseData, 0, responseData.Length);
-// }
-
- ///
- /// Make a GET or GET-like request to a web service that returns LLSD
- /// or JSON data
- ///
- public static OSDMap ServiceRequest(string url, string httpVerb)
- {
- string errorMessage;
-
- try
- {
- HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
- request.Method = httpVerb;
-
- using (WebResponse response = request.GetResponse())
- {
- using (Stream responseStream = response.GetResponseStream())
- {
- try
- {
- string responseStr = responseStream.GetStreamString();
- OSD responseOSD = OSDParser.Deserialize(responseStr);
- if (responseOSD.Type == OSDType.Map)
- return (OSDMap)responseOSD;
- else
- errorMessage = "Response format was invalid.";
- }
- catch
- {
- errorMessage = "Failed to parse the response.";
- }
- }
- }
- }
- catch (Exception ex)
- {
- m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
- errorMessage = ex.Message;
- }
-
- return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } };
- }
+ #region JSONRequest
///
/// PUT JSON-encoded data to a web service that returns LLSD or
@@ -303,6 +233,10 @@ namespace OpenSim.Framework
return result;
}
+ #endregion JSONRequest
+
+ #region FormRequest
+
///
/// POST URL-encoded form data to a web service that returns LLSD or
/// JSON data
@@ -397,6 +331,8 @@ namespace OpenSim.Framework
result["Message"] = OSD.FromString("Service request failed: " + msg);
return result;
}
+
+ #endregion FormRequest
#region Uri
--
cgit v1.1
From aabbbb32ffd353ece2addf39c64f3ff3e15ca7d4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 29 Feb 2012 23:45:14 +0000
Subject: Flick master up to 0.7.4
---
OpenSim/Framework/Servers/VersionInfo.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index f30cb7a..7a5d715 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@ namespace OpenSim
{
public class VersionInfo
{
- private const string VERSION_NUMBER = "0.7.3";
+ private const string VERSION_NUMBER = "0.7.4";
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour
--
cgit v1.1
From 0007711eb5947d292f10325dd4af640ece79ea2d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 1 Mar 2012 03:23:10 +0000
Subject: Use a fully stubbed out MockConsole for unit tests rather than
inheriting from CommandConsole.
This is so that the static MainConsole.Instance doesn't retain references to methods registered by scene and other modules to service commands.
This prevents the scene from being garbage collected at the end of a test.
This is not the final thing preventing GC - next up is the timer started by SimStatsReporter that holds a reference to Scene that prevents end of test gc.
---
OpenSim/Framework/Console/MockConsole.cs | 59 ++++++++++++++++++++------------
1 file changed, 37 insertions(+), 22 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs
index a29b370..4d8751f 100644
--- a/OpenSim/Framework/Console/MockConsole.cs
+++ b/OpenSim/Framework/Console/MockConsole.cs
@@ -29,6 +29,7 @@ using System;
using System.Threading;
using System.Collections.Generic;
using System.Text;
+using System.Xml;
namespace OpenSim.Framework.Console
{
@@ -37,28 +38,42 @@ namespace OpenSim.Framework.Console
/// Don't use this except for Unit Testing or you're in for a world of hurt when the
/// sim gets to ReadLine
///
- public class MockConsole : CommandConsole
+ public class MockConsole : ICommandConsole
{
- public MockConsole(string defaultPrompt) : base(defaultPrompt)
- {
- }
- public override void Output(string text)
- {
- }
- public override void Output(string text, string level)
- {
- }
+ private MockCommands m_commands = new MockCommands();
- public override string ReadLine(string p, bool isCommand, bool e)
- {
- //Thread.CurrentThread.Join(1000);
- return string.Empty;
- }
- public override void UnlockOutput()
- {
- }
- public override void LockOutput()
- {
- }
+ public ICommands Commands { get { return m_commands; } }
+
+ public void Prompt() {}
+
+ public void RunCommand(string cmd) {}
+
+ public string ReadLine(string p, bool isCommand, bool e) { return ""; }
+
+ public object ConsoleScene { get { return null; } }
+
+ public void Output(string text, string level) {}
+ public void Output(string text) {}
+ public void OutputFormat(string format, params object[] components) {}
+
+ public string CmdPrompt(string p) { return ""; }
+ public string CmdPrompt(string p, string def) { return ""; }
+ public string CmdPrompt(string p, List excludedCharacters) { return ""; }
+ public string CmdPrompt(string p, string def, List excludedCharacters) { return ""; }
+
+ public string CmdPrompt(string prompt, string defaultresponse, List options) { return ""; }
+
+ public string PasswdPrompt(string p) { return ""; }
+ }
+
+ public class MockCommands : ICommands
+ {
+ public void FromXml(XmlElement root, CommandDelegate fn) {}
+ public List GetHelp(string[] cmd) { return null; }
+ public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn) {}
+ public void AddCommand(string module, bool shared, string command, string help, string longhelp, string descriptivehelp, CommandDelegate fn) {}
+ public string[] FindNextOption(string[] cmd, bool term) { return null; }
+ public string[] Resolve(string[] cmd) { return null; }
+ public XmlElement GetXml(XmlDocument doc) { return null; }
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 749c3fef8ad2d3af97fcd9ab9c72740675e46715 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 8 Mar 2012 01:51:37 +0000
Subject: Change "help" to display categories/module list then "help
" to display commands in a category.
This is to deal with the hundred lines of command splurge when one previously typed "help"
Modelled somewhat on the mysql console
One can still type help to get per command help at any point.
Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet).
Does not affect command parsing or any other aspects of the console apart from the help system.
Backwards compatible with existing modules.
---
OpenSim/Framework/Console/CommandConsole.cs | 114 ++++++++++++++++++++-----
OpenSim/Framework/ICommandConsole.cs | 2 +-
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 20 ++---
3 files changed, 103 insertions(+), 33 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 0d6288b..2bb7de1 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -29,6 +29,7 @@ using System;
using System.Xml;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
@@ -40,6 +41,8 @@ namespace OpenSim.Framework.Console
{
public class Commands : ICommands
{
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
///
/// Encapsulates a command that can be invoked from the console
///
@@ -76,6 +79,8 @@ namespace OpenSim.Framework.Console
public List fn;
}
+ public const string GeneralHelpText = "For more information, type 'help - ' where
- is one of the following categories:";
+
///
/// Commands organized by keyword in a tree
///
@@ -83,6 +88,11 @@ namespace OpenSim.Framework.Console
new Dictionary();
///
+ /// Commands organized by module
+ ///
+ private Dictionary> m_modulesCommands = new Dictionary>();
+
+ ///
/// Get help for the given help string
///
/// Parsed parts of the help string. If empty then general help is returned.
@@ -98,8 +108,8 @@ namespace OpenSim.Framework.Console
// General help
if (helpParts.Count == 0)
{
- help.AddRange(CollectHelp(tree));
- help.Sort();
+ help.Add(GeneralHelpText);
+ help.AddRange(CollectModulesHelp(tree));
}
else
{
@@ -118,6 +128,13 @@ namespace OpenSim.Framework.Console
{
string originalHelpRequest = string.Join(" ", helpParts.ToArray());
List help = new List();
+
+ // Check modules first to see if we just need to display a list of those commands
+ if (TryCollectModuleHelp(originalHelpRequest, help))
+ {
+ help.Insert(0, GeneralHelpText);
+ return help;
+ }
Dictionary dict = tree;
while (helpParts.Count > 0)
@@ -161,25 +178,61 @@ namespace OpenSim.Framework.Console
return help;
}
- private List CollectHelp(Dictionary dict)
+ ///
+ /// Try to collect help for the given module if that module exists.
+ ///
+ ///
+ /// /param>
+ /// true if there was the module existed, false otherwise.
+ private bool TryCollectModuleHelp(string moduleName, List helpText)
{
- List result = new List();
-
- foreach (KeyValuePair kvp in dict)
+ lock (m_modulesCommands)
{
- if (kvp.Value is Dictionary)
+ if (m_modulesCommands.ContainsKey(moduleName))
{
- result.AddRange(CollectHelp((Dictionary)kvp.Value));
+ List commands = m_modulesCommands[moduleName];
+ var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help));
+ ourHelpText.Sort();
+ helpText.AddRange(ourHelpText);
+
+ return true;
}
else
{
- if (((CommandInfo)kvp.Value).long_help != String.Empty)
- result.Add(((CommandInfo)kvp.Value).help_text+" - "+
- ((CommandInfo)kvp.Value).long_help);
+ return false;
}
}
- return result;
}
+
+ private List CollectModulesHelp(Dictionary dict)
+ {
+ lock (m_modulesCommands)
+ {
+ List helpText = new List(m_modulesCommands.Keys);
+ helpText.Sort();
+ return helpText;
+ }
+ }
+
+// private List CollectHelp(Dictionary dict)
+// {
+// List result = new List();
+//
+// foreach (KeyValuePair kvp in dict)
+// {
+// if (kvp.Value is Dictionary)
+// {
+// result.AddRange(CollectHelp((Dictionary)kvp.Value));
+// }
+// else
+// {
+// if (((CommandInfo)kvp.Value).long_help != String.Empty)
+// result.Add(((CommandInfo)kvp.Value).help_text+" - "+
+// ((CommandInfo)kvp.Value).long_help);
+// }
+// }
+// return result;
+// }
///
/// Add a command to those which can be invoked from the console.
@@ -212,21 +265,19 @@ namespace OpenSim.Framework.Console
Dictionary current = tree;
- foreach (string s in parts)
+ foreach (string part in parts)
{
- if (current.ContainsKey(s))
+ if (current.ContainsKey(part))
{
- if (current[s] is Dictionary)
- {
- current = (Dictionary)current[s];
- }
+ if (current[part] is Dictionary)
+ current = (Dictionary)current[part];
else
return;
}
else
{
- current[s] = new Dictionary();
- current = (Dictionary)current[s];
+ current[part] = new Dictionary();
+ current = (Dictionary)current[part];
}
}
@@ -250,6 +301,24 @@ namespace OpenSim.Framework.Console
info.fn = new List();
info.fn.Add(fn);
current[String.Empty] = info;
+
+ // Now add command to modules dictionary
+ lock (m_modulesCommands)
+ {
+ List commands;
+ if (m_modulesCommands.ContainsKey(module))
+ {
+ commands = m_modulesCommands[module];
+ }
+ else
+ {
+ commands = new List();
+ m_modulesCommands[module] = commands;
+ }
+
+// m_log.DebugFormat("[COMMAND CONSOLE]: Adding to category {0} command {1}", module, command);
+ commands.Add(info);
+ }
}
public string[] FindNextOption(string[] cmd, bool term)
@@ -607,8 +676,9 @@ namespace OpenSim.Framework.Console
{
Commands = new Commands();
- Commands.AddCommand("console", false, "help", "help []",
- "Get general command list or more detailed help on a specific command", Help);
+ Commands.AddCommand(
+ "Help", false, "help", "help [
- ]",
+ "Display help on a particular command or on a list of commands in a category", Help);
}
private void Help(string module, string[] cmd)
diff --git a/OpenSim/Framework/ICommandConsole.cs b/OpenSim/Framework/ICommandConsole.cs
index d33b9b5..ca0ff93 100644
--- a/OpenSim/Framework/ICommandConsole.cs
+++ b/OpenSim/Framework/ICommandConsole.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Framework
///
/// Get help for the given help string
///
- /// Parsed parts of the help string. If empty then general help is returned.
+ /// Parsed parts of the help string. If empty then general help is returned.
///
List GetHelp(string[] cmd);
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 6a3135e..d5c2515 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -161,43 +161,43 @@ namespace OpenSim.Framework.Servers
Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold));
}
- m_console.Commands.AddCommand("base", false, "quit",
+ m_console.Commands.AddCommand("General", false, "quit",
"quit",
"Quit the application", HandleQuit);
- m_console.Commands.AddCommand("base", false, "shutdown",
+ m_console.Commands.AddCommand("General", false, "shutdown",
"shutdown",
"Quit the application", HandleQuit);
- m_console.Commands.AddCommand("base", false, "set log level",
+ m_console.Commands.AddCommand("General", false, "set log level",
"set log level ",
"Set the console logging level", HandleLogLevel);
- m_console.Commands.AddCommand("base", false, "show info",
+ m_console.Commands.AddCommand("General", false, "show info",
"show info",
"Show general information about the server", HandleShow);
- m_console.Commands.AddCommand("base", false, "show stats",
+ m_console.Commands.AddCommand("General", false, "show stats",
"show stats",
"Show statistics", HandleShow);
- m_console.Commands.AddCommand("base", false, "show threads",
+ m_console.Commands.AddCommand("General", false, "show threads",
"show threads",
"Show thread status", HandleShow);
- m_console.Commands.AddCommand("base", false, "show uptime",
+ m_console.Commands.AddCommand("General", false, "show uptime",
"show uptime",
"Show server uptime", HandleShow);
- m_console.Commands.AddCommand("base", false, "show version",
+ m_console.Commands.AddCommand("General", false, "show version",
"show version",
"Show server version", HandleShow);
- m_console.Commands.AddCommand("base", false, "threads abort",
+ m_console.Commands.AddCommand("General", false, "threads abort",
"threads abort ",
"Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort);
- m_console.Commands.AddCommand("base", false, "threads show",
+ m_console.Commands.AddCommand("General", false, "threads show",
"threads show",
"Show thread status. Synonym for \"show threads\"",
(string module, string[] args) => Notice(GetThreadsReport()));
--
cgit v1.1