diff options
author | Justin Clarke Casey | 2008-01-31 00:42:31 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-31 00:42:31 +0000 |
commit | a4bf98f4ba6ecc27d1af0092b6e2a1bac36ed44d (patch) | |
tree | 3ca82ca3f5b6f3f03e4d9c26b2dc17a5c6247bf8 /OpenSim/Region/Application | |
parent | * Add 'asset not found' statistics to grid asset server stats (diff) | |
download | opensim-SC_OLD-a4bf98f4ba6ecc27d1af0092b6e2a1bac36ed44d.zip opensim-SC_OLD-a4bf98f4ba6ecc27d1af0092b6e2a1bac36ed44d.tar.gz opensim-SC_OLD-a4bf98f4ba6ecc27d1af0092b6e2a1bac36ed44d.tar.bz2 opensim-SC_OLD-a4bf98f4ba6ecc27d1af0092b6e2a1bac36ed44d.tar.xz |
* Add asset/texture cache statistics to region server console
* You can type 'stats' at the REGION# prompt to get this information in grid or standalone mode
* Don't take these numbers as gospel yet, since for some reason textures displayed from inventory which require downloading from the server are being recorded as assets
rather than textures
* But I don't have any reason to believe they aren't broadly accurate.
* I've put these in so I can tell whether the high memory usage on regions is down to the asset/texture cache
* This will require a prebuild
* DEV: Only adds needed to be implemented since, as far as I can tell, assets cached are currently never released. For my part, seeing large cache memory numbers will
provoke me to think about doing something about this.
* DEV: Now switched to using a singleton to get the stats reporters rather than threading the object through various layers
* DEV: Will refactor the other server stats reporters to do this in one of the next commits
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index f0e60cf..70f9fd0 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -39,6 +39,7 @@ using OpenSim.Framework; | |||
39 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
40 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Framework.Statistics; | ||
42 | using OpenSim.Region.ClientStack; | 43 | using OpenSim.Region.ClientStack; |
43 | using OpenSim.Region.Communications.Local; | 44 | using OpenSim.Region.Communications.Local; |
44 | using OpenSim.Region.Communications.OGS1; | 45 | using OpenSim.Region.Communications.OGS1; |
@@ -244,7 +245,7 @@ namespace OpenSim | |||
244 | if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") | 245 | if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") |
245 | { | 246 | { |
246 | m_storageDll = "OpenSim.Framework.Data.SQLite.dll"; | 247 | m_storageDll = "OpenSim.Framework.Data.SQLite.dll"; |
247 | Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is depreciated. Set storage_plugin to OpenSim.Framework.Data.SQLite.dll."); | 248 | Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Framework.Data.SQLite.dll."); |
248 | Thread.Sleep(3000); | 249 | Thread.Sleep(3000); |
249 | } | 250 | } |
250 | m_storageConnectionString | 251 | m_storageConnectionString |
@@ -301,8 +302,10 @@ namespace OpenSim | |||
301 | 302 | ||
302 | // Create a log instance | 303 | // Create a log instance |
303 | m_log = CreateLog(); | 304 | m_log = CreateLog(); |
304 | MainLog.Instance = m_log; | 305 | MainLog.Instance = m_log; |
305 | 306 | ||
307 | StatsManager.StartCollecting(); | ||
308 | |||
306 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp | 309 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp |
307 | // TerrainManager, StorageManager, HTTP Server | 310 | // TerrainManager, StorageManager, HTTP Server |
308 | // This base will call abstract Initialize | 311 | // This base will call abstract Initialize |
@@ -703,6 +706,7 @@ namespace OpenSim | |||
703 | m_log.Error("show uptime - show simulator startup and uptime."); | 706 | m_log.Error("show uptime - show simulator startup and uptime."); |
704 | m_log.Error("show users - show info about connected users."); | 707 | m_log.Error("show users - show info about connected users."); |
705 | m_log.Error("show modules - shows info aboutloaded modules."); | 708 | m_log.Error("show modules - shows info aboutloaded modules."); |
709 | m_log.Error("stats - statistical information for this server not displayed in the client"); | ||
706 | m_log.Error("shutdown - disconnect all clients and shutdown."); | 710 | m_log.Error("shutdown - disconnect all clients and shutdown."); |
707 | m_log.Error("terrain help - show help for terrain commands."); | 711 | m_log.Error("terrain help - show help for terrain commands."); |
708 | break; | 712 | break; |
@@ -883,6 +887,19 @@ namespace OpenSim | |||
883 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap("exportmap.jpg"); | 887 | m_sceneManager.CurrentOrFirstScene.ExportWorldMap("exportmap.jpg"); |
884 | } | 888 | } |
885 | break; | 889 | break; |
890 | |||
891 | case "stats": | ||
892 | if (StatsManager.SimExtraStats != null) | ||
893 | { | ||
894 | MainLog.Instance.Notice( | ||
895 | "STATS", Environment.NewLine + StatsManager.SimExtraStats.Report()); | ||
896 | } | ||
897 | else | ||
898 | { | ||
899 | MainLog.Instance.Notice("STATS", "Extra statistics collection has not been enabled"); | ||
900 | } | ||
901 | break; | ||
902 | |||
886 | 903 | ||
887 | default: | 904 | default: |
888 | m_log.Error("Unknown command"); | 905 | m_log.Error("Unknown command"); |