From ce9d0799ae5dc7cfc2cffbc595ccb5323221c276 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 11 Jun 2008 00:41:07 +0000 Subject: * Add 'show info' command to all servers, which prints the directory in which the server was started * This is potentially useful if you're using screen on a region console without knowing where it was originally started from --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index f9d1a94..bdd0e36 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -54,6 +54,11 @@ namespace OpenSim.Framework.Servers /// Time at which this server was started /// protected DateTime m_startuptime; + + /// + /// Record the initial startup directory for info purposes + /// + protected string m_startupDirectory = Environment.CurrentDirectory; /// /// Server version information. Usually VersionInfo + information about svn revision, operating system, etc. @@ -125,8 +130,10 @@ namespace OpenSim.Framework.Servers case "help": Notice("quit - equivalent to shutdown."); + Notice("show info - show server information (e.g. startup path)."); + if (m_stats != null) - Notice("show stats - statistical information for this server"); + Notice("show stats - show statistical information for this server"); Notice("show uptime - show server startup time and uptime."); Notice("show version - show server version."); @@ -156,6 +163,11 @@ namespace OpenSim.Framework.Servers { switch (ShowWhat) { + case "info": + Notice("Version: " + m_version ); + Notice("Startup directory: " + m_startupDirectory); + break; + case "stats": if (m_stats != null) { @@ -164,12 +176,13 @@ namespace OpenSim.Framework.Servers break; case "uptime": + Notice("Time now is " + DateTime.Now); Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); break; case "version": - m_console.Notice("This is " + m_version); + Notice("Version: " + m_version); break; } } @@ -242,6 +255,7 @@ namespace OpenSim.Framework.Servers { OSString = Util.ReadEtcIssue(); } + if (OSString.Length > 45) { OSString = OSString.Substring(0, 45); -- cgit v1.1