aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2014-06-13 21:27:07 -0700
committerJustin Clark-Casey2014-06-16 18:04:35 +0100
commit02980336a38c8288e40a7fefb05be87a443f6a45 (patch)
tree9915ebbacb59de8f1b4a9395aea0ab62bd9c5fa4
parentChange release flavour to rc3 (diff)
downloadopensim-SC_OLD-02980336a38c8288e40a7fefb05be87a443f6a45.zip
opensim-SC_OLD-02980336a38c8288e40a7fefb05be87a443f6a45.tar.gz
opensim-SC_OLD-02980336a38c8288e40a7fefb05be87a443f6a45.tar.bz2
opensim-SC_OLD-02980336a38c8288e40a7fefb05be87a443f6a45.tar.xz
Add [Startup]LogShowStatsSeconds=n parameter which controls the interval
that simulator statistics is output to the console. Setting to zero turns stats logging off.
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs14
-rw-r--r--bin/OpenSimDefaults.ini4
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 566772d..54e6061 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -45,6 +45,7 @@ using OpenSim.Framework.Monitoring;
45using OpenSim.Framework.Servers; 45using OpenSim.Framework.Servers;
46using OpenSim.Framework.Servers.HttpServer; 46using OpenSim.Framework.Servers.HttpServer;
47using Timer=System.Timers.Timer; 47using Timer=System.Timers.Timer;
48using Nini.Config;
48 49
49namespace OpenSim.Framework.Servers 50namespace OpenSim.Framework.Servers
50{ 51{
@@ -59,6 +60,7 @@ namespace OpenSim.Framework.Servers
59 /// This will control a periodic log printout of the current 'show stats' (if they are active) for this 60 /// This will control a periodic log printout of the current 'show stats' (if they are active) for this
60 /// server. 61 /// server.
61 /// </summary> 62 /// </summary>
63 private int m_periodDiagnosticTimerMS = 60 * 60 * 1000;
62 private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000); 64 private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000);
63 65
64 /// <summary> 66 /// <summary>
@@ -77,8 +79,6 @@ namespace OpenSim.Framework.Servers
77 // Random uuid for private data 79 // Random uuid for private data
78 m_osSecret = UUID.Random().ToString(); 80 m_osSecret = UUID.Random().ToString();
79 81
80 m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
81 m_periodicDiagnosticsTimer.Enabled = true;
82 } 82 }
83 83
84 /// <summary> 84 /// <summary>
@@ -89,6 +89,16 @@ namespace OpenSim.Framework.Servers
89 StatsManager.SimExtraStats = new SimExtraStatsCollector(); 89 StatsManager.SimExtraStats = new SimExtraStatsCollector();
90 RegisterCommonCommands(); 90 RegisterCommonCommands();
91 RegisterCommonComponents(Config); 91 RegisterCommonComponents(Config);
92
93 IConfig startupConfig = Config.Configs["Startup"];
94 int logShowStatsSeconds = startupConfig.GetInt("LogShowStatsSeconds", m_periodDiagnosticTimerMS / 1000);
95 m_periodDiagnosticTimerMS = logShowStatsSeconds * 1000;
96 m_periodicDiagnosticsTimer.Elapsed += new ElapsedEventHandler(LogDiagnostics);
97 if (m_periodDiagnosticTimerMS != 0)
98 {
99 m_periodicDiagnosticsTimer.Interval = m_periodDiagnosticTimerMS;
100 m_periodicDiagnosticsTimer.Enabled = true;
101 }
92 } 102 }
93 103
94 protected override void ShutdownSpecific() 104 protected override void ShutdownSpecific()
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 7f6d0e6..2ee052b 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -269,6 +269,10 @@
269 ; PreJump is an additional animation state, but it probably 269 ; PreJump is an additional animation state, but it probably
270 ; won't look right until the physics engine supports it 270 ; won't look right until the physics engine supports it
271 ; (i.e delays takeoff for a moment) 271 ; (i.e delays takeoff for a moment)
272
273 ; Simulator statistics are output to the console periodically at debug level INFO.
274 ; Setting this to zero disables this output.
275 ; LogShowStatsSeconds = 3600
272 276
273 ; Simulator Stats URI 277 ; Simulator Stats URI
274 ; Enable JSON simulator data by setting a URI name (case sensitive) 278 ; Enable JSON simulator data by setting a URI name (case sensitive)