aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs217
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs19
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs6
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs7
5 files changed, 121 insertions, 134 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 3035a62..a506e3b 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics
42 { 42 {
43 private long abnormalClientThreadTerminations; 43 private long abnormalClientThreadTerminations;
44 44
45 private long assetsInCache; 45// private long assetsInCache;
46 private long texturesInCache; 46// private long texturesInCache;
47 private long assetCacheMemoryUsage; 47// private long assetCacheMemoryUsage;
48 private long textureCacheMemoryUsage; 48// private long textureCacheMemoryUsage;
49 private TimeSpan assetRequestTimeAfterCacheMiss; 49// private TimeSpan assetRequestTimeAfterCacheMiss;
50 private long blockedMissingTextureRequests; 50// private long blockedMissingTextureRequests;
51 51
52 private long assetServiceRequestFailures; 52// private long assetServiceRequestFailures;
53 private long inventoryServiceRetrievalFailures; 53// private long inventoryServiceRetrievalFailures;
54 54
55 private volatile float timeDilation; 55 private volatile float timeDilation;
56 private volatile float simFps; 56 private volatile float simFps;
@@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics
79 /// </summary> 79 /// </summary>
80 public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } 80 public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
81 81
82 /// <summary> 82// /// <summary>
83 /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the 83// /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
84 /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these 84// /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
85 /// haven't yet been implemented... 85// /// haven't yet been implemented...
86 /// </summary> 86// /// </summary>
87 public long AssetsInCache { get { return assetsInCache; } } 87// public long AssetsInCache { get { return assetsInCache; } }
88 88//
89 /// <value> 89// /// <value>
90 /// Currently unused 90// /// Currently unused
91 /// </value> 91// /// </value>
92 public long TexturesInCache { get { return texturesInCache; } } 92// public long TexturesInCache { get { return texturesInCache; } }
93 93//
94 /// <value> 94// /// <value>
95 /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit 95// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
96 /// </value> 96// /// </value>
97 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 97// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
98 98//
99 /// <value> 99// /// <value>
100 /// Currently unused 100// /// Currently unused
101 /// </value> 101// /// </value>
102 public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } 102// public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
103 103
104 public float TimeDilation { get { return timeDilation; } } 104 public float TimeDilation { get { return timeDilation; } }
105 public float SimFps { get { return simFps; } } 105 public float SimFps { get { return simFps; } }
@@ -123,25 +123,25 @@ namespace OpenSim.Framework.Statistics
123 public float ActiveScripts { get { return activeScripts; } } 123 public float ActiveScripts { get { return activeScripts; } }
124 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } 124 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
125 125
126 /// <summary> 126// /// <summary>
127 /// This is the time it took for the last asset request made in response to a cache miss. 127// /// This is the time it took for the last asset request made in response to a cache miss.
128 /// </summary> 128// /// </summary>
129 public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } } 129// public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
130 130//
131 /// <summary> 131// /// <summary>
132 /// Number of persistent requests for missing textures we have started blocking from clients. To some extent 132// /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
133 /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either 133// /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
134 /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics 134// /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
135 /// driver bugs on clients (though this seems less likely). 135// /// driver bugs on clients (though this seems less likely).
136 /// </summary> 136// /// </summary>
137 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } 137// public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
138 138//
139 /// <summary> 139// /// <summary>
140 /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as 140// /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
141 /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted 141// /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
142 /// as a failure 142// /// as a failure
143 /// </summary> 143// /// </summary>
144 public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } } 144// public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
145 145
146 /// <summary> 146 /// <summary>
147 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not 147 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
@@ -172,53 +172,53 @@ namespace OpenSim.Framework.Statistics
172 abnormalClientThreadTerminations++; 172 abnormalClientThreadTerminations++;
173 } 173 }
174 174
175 public void AddAsset(AssetBase asset) 175// public void AddAsset(AssetBase asset)
176 { 176// {
177 assetsInCache++; 177// assetsInCache++;
178 //assetCacheMemoryUsage += asset.Data.Length; 178// //assetCacheMemoryUsage += asset.Data.Length;
179 } 179// }
180 180//
181 public void RemoveAsset(UUID uuid) 181// public void RemoveAsset(UUID uuid)
182 { 182// {
183 assetsInCache--; 183// assetsInCache--;
184 } 184// }
185 185//
186 public void AddTexture(AssetBase image) 186// public void AddTexture(AssetBase image)
187 { 187// {
188 if (image.Data != null) 188// if (image.Data != null)
189 { 189// {
190 texturesInCache++; 190// texturesInCache++;
191 191//
192 // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates 192// // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
193 textureCacheMemoryUsage += image.Data.Length; 193// textureCacheMemoryUsage += image.Data.Length;
194 } 194// }
195 } 195// }
196 196//
197 /// <summary> 197// /// <summary>
198 /// Signal that the asset cache has been cleared. 198// /// Signal that the asset cache has been cleared.
199 /// </summary> 199// /// </summary>
200 public void ClearAssetCacheStatistics() 200// public void ClearAssetCacheStatistics()
201 { 201// {
202 assetsInCache = 0; 202// assetsInCache = 0;
203 assetCacheMemoryUsage = 0; 203// assetCacheMemoryUsage = 0;
204 texturesInCache = 0; 204// texturesInCache = 0;
205 textureCacheMemoryUsage = 0; 205// textureCacheMemoryUsage = 0;
206 } 206// }
207 207//
208 public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) 208// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
209 { 209// {
210 assetRequestTimeAfterCacheMiss = ts; 210// assetRequestTimeAfterCacheMiss = ts;
211 } 211// }
212 212//
213 public void AddBlockedMissingTextureRequest() 213// public void AddBlockedMissingTextureRequest()
214 { 214// {
215 blockedMissingTextureRequests++; 215// blockedMissingTextureRequests++;
216 } 216// }
217 217//
218 public void AddAssetServiceRequestFailure() 218// public void AddAssetServiceRequestFailure()
219 { 219// {
220 assetServiceRequestFailures++; 220// assetServiceRequestFailures++;
221 } 221// }
222 222
223// public void AddInventoryServiceRetrievalFailure() 223// public void AddInventoryServiceRetrievalFailure()
224// { 224// {
@@ -291,8 +291,8 @@ namespace OpenSim.Framework.Statistics
291 public override string Report() 291 public override string Report()
292 { 292 {
293 StringBuilder sb = new StringBuilder(Environment.NewLine); 293 StringBuilder sb = new StringBuilder(Environment.NewLine);
294 sb.Append("ASSET STATISTICS"); 294// sb.Append("ASSET STATISTICS");
295 sb.Append(Environment.NewLine); 295// sb.Append(Environment.NewLine);
296 296
297 /* 297 /*
298 sb.Append( 298 sb.Append(
@@ -308,7 +308,8 @@ Asset service request failures: {6}"+ Environment.NewLine,
308 BlockedMissingTextureRequests, 308 BlockedMissingTextureRequests,
309 AssetServiceRequestFailures)); 309 AssetServiceRequestFailures));
310 */ 310 */
311 311
312 /*
312 sb.Append( 313 sb.Append(
313 string.Format( 314 string.Format(
314@"Asset cache contains {0,6} assets 315@"Asset cache contains {0,6} assets
@@ -319,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine,
319 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, 320 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
320 BlockedMissingTextureRequests, 321 BlockedMissingTextureRequests,
321 AssetServiceRequestFailures)); 322 AssetServiceRequestFailures));
322 323 */
323 324
324 sb.Append(Environment.NewLine); 325 sb.Append(Environment.NewLine);
325 sb.Append("CONNECTION STATISTICS"); 326 sb.Append("CONNECTION STATISTICS");
@@ -391,15 +392,15 @@ Asset service request failures: {3}" + Environment.NewLine,
391 public override string XReport(string uptime, string version) 392 public override string XReport(string uptime, string version)
392 { 393 {
393 OSDMap args = new OSDMap(30); 394 OSDMap args = new OSDMap(30);
394 args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); 395// args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
395 args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", 396// args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
396 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); 397// assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
397 args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", 398// args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
398 BlockedMissingTextureRequests)); 399// BlockedMissingTextureRequests));
399 args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", 400// args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
400 AssetServiceRequestFailures)); 401// AssetServiceRequestFailures));
401 args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", 402// args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
402 abnormalClientThreadTerminations)); 403// abnormalClientThreadTerminations));
403// args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", 404// args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
404// InventoryServiceRetrievalFailures)); 405// InventoryServiceRetrievalFailures));
405 args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); 406 args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 4a7c8b0..8d95c41 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -107,15 +107,13 @@ namespace OpenSim
107 } 107 }
108 else 108 else
109 { 109 {
110 m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); 110 m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
111 Environment.Exit(1); 111 Environment.Exit(1);
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 116 string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
117 string iniFileName =
118 startupConfig.GetString("inifile", "OpenSim.ini");
119 117
120 if (IsUri(iniFileName)) 118 if (IsUri(iniFileName))
121 { 119 {
@@ -131,8 +129,7 @@ namespace OpenSim
131 if (!File.Exists(Application.iniFilePath)) 129 if (!File.Exists(Application.iniFilePath))
132 { 130 {
133 iniFileName = "OpenSim.xml"; 131 iniFileName = "OpenSim.xml";
134 Application.iniFilePath = Path.GetFullPath( 132 Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
135 Path.Combine(Util.configDir(), iniFileName));
136 } 133 }
137 134
138 if (File.Exists(Application.iniFilePath)) 135 if (File.Exists(Application.iniFilePath))
@@ -142,15 +139,12 @@ namespace OpenSim
142 } 139 }
143 } 140 }
144 141
145 string iniDirName = 142 string iniDirName = startupConfig.GetString("inidirectory", "config");
146 startupConfig.GetString("inidirectory", "config"); 143 string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
147 string iniDirPath =
148 Path.Combine(Util.configDir(), iniDirName);
149 144
150 if (Directory.Exists(iniDirPath)) 145 if (Directory.Exists(iniDirPath))
151 { 146 {
152 m_log.InfoFormat("Searching folder {0} for config ini files", 147 m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
153 iniDirPath);
154 148
155 string[] fileEntries = Directory.GetFiles(iniDirName); 149 string[] fileEntries = Directory.GetFiles(iniDirName);
156 foreach (string filePath in fileEntries) 150 foreach (string filePath in fileEntries)
@@ -172,7 +166,6 @@ namespace OpenSim
172 if (sources.Count == 0) 166 if (sources.Count == 0)
173 { 167 {
174 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 168 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
175 m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
176 Environment.Exit(1); 169 Environment.Exit(1);
177 } 170 }
178 171
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9f9b4f0..a680a59 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -202,16 +202,16 @@ namespace OpenSim
202 // Load the simulation data service 202 // Load the simulation data service
203 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; 203 IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
204 if (simDataConfig == null) 204 if (simDataConfig == null)
205 throw new Exception("Configuration file is missing the [SimulationDataStore] section"); 205 throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
206 string module = simDataConfig.GetString("LocalServiceModule", String.Empty); 206 string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
207 if (String.IsNullOrEmpty(module)) 207 if (String.IsNullOrEmpty(module))
208 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); 208 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
209 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); 209 m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
210 210
211 // Load the estate data service 211 // Load the estate data service
212 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; 212 IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
213 if (estateDataConfig == null) 213 if (estateDataConfig == null)
214 throw new Exception("Configuration file is missing the [EstateDataStore] section"); 214 throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
215 module = estateDataConfig.GetString("LocalServiceModule", String.Empty); 215 module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
216 if (String.IsNullOrEmpty(module)) 216 if (String.IsNullOrEmpty(module))
217 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); 217 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 1af8346..7f18140 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -41,12 +41,6 @@ namespace OpenSim.Region.Framework.Scenes
41{ 41{
42 public delegate void PhysicsCrash(); 42 public delegate void PhysicsCrash();
43 43
44 public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone);
45
46 public delegate void ObjectCreateDelegate(EntityBase obj);
47
48 public delegate void ObjectDeleteDelegate(EntityBase obj);
49
50 /// <summary> 44 /// <summary>
51 /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components 45 /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components
52 /// should be migrated out over time. 46 /// should be migrated out over time.
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index aeba35f..a6f4e47 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -126,11 +126,10 @@ namespace OpenSim.Server.Base
126 m_Config = new IniConfigSource(iniFile); 126 m_Config = new IniConfigSource(iniFile);
127 } 127 }
128 } 128 }
129 catch (Exception) 129 catch (Exception e)
130 { 130 {
131 System.Console.WriteLine("Error reading from config source {0}", 131 System.Console.WriteLine("Error reading from config source. {0}", e.Message);
132 iniFile); 132 Environment.Exit(1);
133 Thread.CurrentThread.Abort();
134 } 133 }
135 134
136 // Merge the configuration from the command line into the 135 // Merge the configuration from the command line into the