aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseOpenSimServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 344309d..811a0db 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Framework.Statistics;
30 31
31namespace OpenSim.Framework.Servers 32namespace OpenSim.Framework.Servers
32{ 33{
@@ -44,6 +45,11 @@ namespace OpenSim.Framework.Servers
44 get { return m_httpServer; } 45 get { return m_httpServer; }
45 } 46 }
46 47
48 /// <summary>
49 /// Holds the non-viewer statistics collection object for this service/server
50 /// </summary>
51 protected IStatsCollector m_stats;
52
47 public BaseOpenSimServer() 53 public BaseOpenSimServer()
48 { 54 {
49 m_startuptime = DateTime.Now; 55 m_startuptime = DateTime.Now;
@@ -72,6 +78,10 @@ namespace OpenSim.Framework.Servers
72 { 78 {
73 case "help": 79 case "help":
74 Notice("quit - equivalent to shutdown."); 80 Notice("quit - equivalent to shutdown.");
81
82 if (m_stats != null)
83 Notice("show stats - statistical information for this server");
84
75 Notice("show uptime - show server startup and uptime."); 85 Notice("show uptime - show server startup and uptime.");
76 Notice("shutdown - shutdown the server.\n"); 86 Notice("shutdown - shutdown the server.\n");
77 break; 87 break;
@@ -97,7 +107,14 @@ namespace OpenSim.Framework.Servers
97 public virtual void Show(string ShowWhat) 107 public virtual void Show(string ShowWhat)
98 { 108 {
99 switch (ShowWhat) 109 switch (ShowWhat)
100 { 110 {
111 case "stats":
112 if (m_stats != null)
113 {
114 Notice(m_stats.Report());
115 }
116 break;
117
101 case "uptime": 118 case "uptime":
102 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); 119 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString());
103 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); 120 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString());