aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-11 00:41:07 +0000
committerJustin Clarke Casey2008-06-11 00:41:07 +0000
commitce9d0799ae5dc7cfc2cffbc595ccb5323221c276 (patch)
treecee716bd84f51087aff8989768f1ea43231e862d /OpenSim/Framework/Servers
parent* minor: Reduce statistic log snapshots to every 20 minutes to get more infor... (diff)
downloadopensim-SC_OLD-ce9d0799ae5dc7cfc2cffbc595ccb5323221c276.zip
opensim-SC_OLD-ce9d0799ae5dc7cfc2cffbc595ccb5323221c276.tar.gz
opensim-SC_OLD-ce9d0799ae5dc7cfc2cffbc595ccb5323221c276.tar.bz2
opensim-SC_OLD-ce9d0799ae5dc7cfc2cffbc595ccb5323221c276.tar.xz
* 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
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs18
1 files changed, 16 insertions, 2 deletions
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
54 /// Time at which this server was started 54 /// Time at which this server was started
55 /// </summary> 55 /// </summary>
56 protected DateTime m_startuptime; 56 protected DateTime m_startuptime;
57
58 /// <summary>
59 /// Record the initial startup directory for info purposes
60 /// </summary>
61 protected string m_startupDirectory = Environment.CurrentDirectory;
57 62
58 /// <summary> 63 /// <summary>
59 /// Server version information. Usually VersionInfo + information about svn revision, operating system, etc. 64 /// Server version information. Usually VersionInfo + information about svn revision, operating system, etc.
@@ -125,8 +130,10 @@ namespace OpenSim.Framework.Servers
125 case "help": 130 case "help":
126 Notice("quit - equivalent to shutdown."); 131 Notice("quit - equivalent to shutdown.");
127 132
133 Notice("show info - show server information (e.g. startup path).");
134
128 if (m_stats != null) 135 if (m_stats != null)
129 Notice("show stats - statistical information for this server"); 136 Notice("show stats - show statistical information for this server");
130 137
131 Notice("show uptime - show server startup time and uptime."); 138 Notice("show uptime - show server startup time and uptime.");
132 Notice("show version - show server version."); 139 Notice("show version - show server version.");
@@ -156,6 +163,11 @@ namespace OpenSim.Framework.Servers
156 { 163 {
157 switch (ShowWhat) 164 switch (ShowWhat)
158 { 165 {
166 case "info":
167 Notice("Version: " + m_version );
168 Notice("Startup directory: " + m_startupDirectory);
169 break;
170
159 case "stats": 171 case "stats":
160 if (m_stats != null) 172 if (m_stats != null)
161 { 173 {
@@ -164,12 +176,13 @@ namespace OpenSim.Framework.Servers
164 break; 176 break;
165 177
166 case "uptime": 178 case "uptime":
179 Notice("Time now is " + DateTime.Now);
167 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); 180 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString());
168 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); 181 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString());
169 break; 182 break;
170 183
171 case "version": 184 case "version":
172 m_console.Notice("This is " + m_version); 185 Notice("Version: " + m_version);
173 break; 186 break;
174 } 187 }
175 } 188 }
@@ -242,6 +255,7 @@ namespace OpenSim.Framework.Servers
242 { 255 {
243 OSString = Util.ReadEtcIssue(); 256 OSString = Util.ReadEtcIssue();
244 } 257 }
258
245 if (OSString.Length > 45) 259 if (OSString.Length > 45)
246 { 260 {
247 OSString = OSString.Substring(0, 45); 261 OSString = OSString.Substring(0, 45);