aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs2
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs47
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SimStatsReporter.cs40
-rw-r--r--bin/OpenSim.ini.example17
-rw-r--r--bin/OpenSimDefaults.ini18
-rw-r--r--bin/Robust.HG.ini.example6
-rw-r--r--bin/Robust.ini.example6
-rw-r--r--bin/config-include/StandaloneCommon.ini.example14
8 files changed, 108 insertions, 42 deletions
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
index 17edb67..8f38a29 100644
--- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs
@@ -509,6 +509,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
509 { 509 {
510 module.RegionLoaded(scene); 510 module.RegionLoaded(scene);
511 } 511 }
512
513 scene.AllModulesLoaded();
512 } 514 }
513 515
514 public void RemoveRegionFromModules (Scene scene) 516 public void RemoveRegionFromModules (Scene scene)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index dce2247..2fe6e22 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -39,6 +39,7 @@ using Nini.Config;
39using OpenMetaverse; 39using OpenMetaverse;
40using OpenMetaverse.Packets; 40using OpenMetaverse.Packets;
41using OpenMetaverse.Imaging; 41using OpenMetaverse.Imaging;
42using OpenMetaverse.StructuredData;
42using OpenSim.Framework; 43using OpenSim.Framework;
43using OpenSim.Framework.Monitoring; 44using OpenSim.Framework.Monitoring;
44using OpenSim.Services.Interfaces; 45using OpenSim.Services.Interfaces;
@@ -381,6 +382,13 @@ namespace OpenSim.Region.Framework.Scenes
381 } 382 }
382 private int m_minFrameTicks; 383 private int m_minFrameTicks;
383 384
385 public int FrameTimeWarnPercent { get; private set; }
386 public int FrameTimeCritPercent { get; private set; }
387
388 // Normalize the frame related stats to nominal 55fps for viewer and scripts option
389 // see SimStatsReporter.cs
390 public bool Normalized55FPS { get; private set; }
391
384 /// <summary> 392 /// <summary>
385 /// The minimum length of time in seconds that will be taken for a scene frame. 393 /// The minimum length of time in seconds that will be taken for a scene frame.
386 /// </summary> 394 /// </summary>
@@ -856,6 +864,9 @@ namespace OpenSim.Region.Framework.Scenes
856 { 864 {
857 m_config = config; 865 m_config = config;
858 MinFrameTicks = 89; 866 MinFrameTicks = 89;
867 FrameTimeWarnPercent = 60;
868 FrameTimeCritPercent = 40;
869 Normalized55FPS = true;
859 MinMaintenanceTicks = 1000; 870 MinMaintenanceTicks = 1000;
860 SeeIntoRegion = true; 871 SeeIntoRegion = true;
861 872
@@ -1083,6 +1094,9 @@ namespace OpenSim.Region.Framework.Scenes
1083 1094
1084 if (startupConfig.Contains("MinFrameTime")) 1095 if (startupConfig.Contains("MinFrameTime"))
1085 MinFrameTicks = (int)(startupConfig.GetFloat("MinFrameTime") * 1000); 1096 MinFrameTicks = (int)(startupConfig.GetFloat("MinFrameTime") * 1000);
1097 FrameTimeWarnPercent = startupConfig.GetInt( "FrameTimeWarnPercent", FrameTimeWarnPercent);
1098 FrameTimeCritPercent = startupConfig.GetInt( "FrameTimeCritPercent", FrameTimeCritPercent);
1099 Normalized55FPS = startupConfig.GetBoolean( "Normalized55FPS", Normalized55FPS);
1086 1100
1087 m_update_backup = startupConfig.GetInt("UpdateStorageEveryNFrames", m_update_backup); 1101 m_update_backup = startupConfig.GetInt("UpdateStorageEveryNFrames", m_update_backup);
1088 m_update_coarse_locations = startupConfig.GetInt("UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations); 1102 m_update_coarse_locations = startupConfig.GetInt("UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations);
@@ -1250,13 +1264,44 @@ namespace OpenSim.Region.Framework.Scenes
1250 get { return m_sceneGraph; } 1264 get { return m_sceneGraph; }
1251 } 1265 }
1252 1266
1253 protected virtual void RegisterDefaultSceneEvents() 1267 /// <summary>
1268 /// Called by the module loader when all modules are loaded, after each module's
1269 /// RegionLoaded hook is called. This is the earliest time where RequestModuleInterface
1270 /// may be used.
1271 /// </summary>
1272 public void AllModulesLoaded()
1254 { 1273 {
1255 IDialogModule dm = RequestModuleInterface<IDialogModule>(); 1274 IDialogModule dm = RequestModuleInterface<IDialogModule>();
1256 1275
1257 if (dm != null) 1276 if (dm != null)
1258 m_eventManager.OnPermissionError += dm.SendAlertToUser; 1277 m_eventManager.OnPermissionError += dm.SendAlertToUser;
1259 1278
1279 ISimulatorFeaturesModule fm = RequestModuleInterface<ISimulatorFeaturesModule>();
1280 if (fm != null)
1281 {
1282 OSD openSimExtras;
1283 OSDMap openSimExtrasMap;
1284
1285 if (!fm.TryGetFeature("OpenSimExtras", out openSimExtras))
1286 openSimExtras = new OSDMap();
1287
1288 float FrameTime = MinFrameTicks / 1000.0f;
1289 float statisticsFPSfactor = 1.0f;
1290 if(Normalized55FPS)
1291 statisticsFPSfactor = 55.0f * FrameTime;
1292
1293 openSimExtrasMap = (OSDMap)openSimExtras;
1294 openSimExtrasMap["SimulatorFPS"] = OSD.FromReal(1.0f / FrameTime);
1295 openSimExtrasMap["SimulatorFPSFactor"] = OSD.FromReal(statisticsFPSfactor);
1296 openSimExtrasMap["SimulatorFPSWarnPercent"] = OSD.FromInteger(FrameTimeWarnPercent);
1297 openSimExtrasMap["SimulatorFPSCritPercent"] = OSD.FromInteger(FrameTimeCritPercent);
1298
1299 fm.AddFeature("OpenSimExtras", openSimExtrasMap);
1300 }
1301 }
1302
1303 protected virtual void RegisterDefaultSceneEvents()
1304 {
1260 m_eventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; 1305 m_eventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement;
1261 } 1306 }
1262 1307
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 2174e51..3effee7 100755
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -176,11 +176,16 @@ namespace OpenSim.Region.Framework.Scenes
176 /// Parameter to adjust reported scene fps 176 /// Parameter to adjust reported scene fps
177 /// </summary> 177 /// </summary>
178 /// <remarks> 178 /// <remarks>
179 /// Our scene loop runs slower than other server implementations, apparantly because we work somewhat differently. 179 /// The close we have to a frame rate as expected by viewers, users and scripts
180 /// However, we will still report an FPS that's closer to what people are used to seeing. A lower FPS might 180 /// is heartbeat rate.
181 /// affect clients and monitoring scripts/software. 181 /// heartbeat rate default value is very diferent from the expected one
182 /// and can be changed from region to region acording to its specific simulation needs
183 /// since this creates incompatibility with expected values,
184 /// this scale factor can be used to normalize values to a Virtual FPS.
185 /// original decision was to use a value of 55fps for all opensim
186 /// corresponding, with default heartbeat rate, to a value of 5.
182 /// </remarks> 187 /// </remarks>
183 private float m_reportedFpsCorrectionFactor = 5; 188 private float m_statisticsFPSfactor = 5.0f;
184 189
185 // saved last reported value so there is something available for llGetRegionFPS 190 // saved last reported value so there is something available for llGetRegionFPS
186 private float lastReportedSimFPS; 191 private float lastReportedSimFPS;
@@ -278,10 +283,15 @@ namespace OpenSim.Region.Framework.Scenes
278 m_usersLoggingIn = 0; 283 m_usersLoggingIn = 0;
279 284
280 m_scene = scene; 285 m_scene = scene;
281 m_reportedFpsCorrectionFactor = scene.MinFrameSeconds * m_nominalReportedFps; 286
282 m_statsUpdateFactor = (float)(m_statsUpdatesEveryMS / 1000); 287 m_statsUpdateFactor = (float)(m_statsUpdatesEveryMS / 1000);
283 ReportingRegion = scene.RegionInfo; 288 ReportingRegion = scene.RegionInfo;
284 289
290 if(scene.Normalized55FPS)
291 m_statisticsFPSfactor = 55.0f * m_scene.MinFrameTicks / 1000.0f;
292 else
293 m_statisticsFPSfactor = 1.0f;
294
285 m_objectCapacity = scene.RegionInfo.ObjectCapacity; 295 m_objectCapacity = scene.RegionInfo.ObjectCapacity;
286 m_report.AutoReset = true; 296 m_report.AutoReset = true;
287 m_report.Interval = m_statsUpdatesEveryMS; 297 m_report.Interval = m_statsUpdatesEveryMS;
@@ -381,13 +391,7 @@ namespace OpenSim.Region.Framework.Scenes
381 391
382#region various statistic googly moogly 392#region various statistic googly moogly
383 393
384 // ORIGINAL code commented out until we have time to add our own 394 int reportedFPS = (int)(m_fps * m_statisticsFPSfactor);
385 // statistics to the statistics window, this will be done as a
386 // new section given the title of our current project
387 // We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently
388 // locked at a maximum of 11. Maybe at some point this can change so that we're not lying.
389 //int reportedFPS = (int)(m_fps * m_reportedFpsCorrectionFactor);
390 int reportedFPS = m_fps;
391 395
392 // save the reported value so there is something available for llGetRegionFPS 396 // save the reported value so there is something available for llGetRegionFPS
393 lastReportedSimFPS = reportedFPS / m_statsUpdateFactor; 397 lastReportedSimFPS = reportedFPS / m_statsUpdateFactor;
@@ -395,7 +399,7 @@ namespace OpenSim.Region.Framework.Scenes
395 // ORIGINAL code commented out until we have time to add our own 399 // ORIGINAL code commented out until we have time to add our own
396 // statistics to the statistics window 400 // statistics to the statistics window
397 //float physfps = ((m_pfps / 1000)); 401 //float physfps = ((m_pfps / 1000));
398 float physfps = m_numberPhysicsFrames; 402 float physfps = m_numberPhysicsFrames * m_statisticsFPSfactor;
399 403
400 //if (physfps > 600) 404 //if (physfps > 600)
401 //physfps = physfps - (physfps - 600); 405 //physfps = physfps - (physfps - 600);
@@ -429,7 +433,7 @@ namespace OpenSim.Region.Framework.Scenes
429 433
430 uint thisFrame = m_scene.Frame; 434 uint thisFrame = m_scene.Frame;
431 uint numFrames = thisFrame - m_lastUpdateFrame; 435 uint numFrames = thisFrame - m_lastUpdateFrame;
432 float framesUpdated = (float)numFrames * m_reportedFpsCorrectionFactor; 436 float framesUpdated = (float)numFrames * m_statisticsFPSfactor;
433 m_lastUpdateFrame = thisFrame; 437 m_lastUpdateFrame = thisFrame;
434 438
435 // Avoid div-by-zero if somehow we've not updated any frames. 439 // Avoid div-by-zero if somehow we've not updated any frames.
@@ -502,22 +506,22 @@ namespace OpenSim.Region.Framework.Scenes
502 // statistics to the statistics window 506 // statistics to the statistics window
503 sb[8].StatID = (uint)Stats.FrameMS; 507 sb[8].StatID = (uint)Stats.FrameMS;
504 //sb[8].StatValue = m_frameMS / framesUpdated; 508 //sb[8].StatValue = m_frameMS / framesUpdated;
505 sb[8].StatValue = (float) totalSumFrameTime / m_numberFramesStored; 509 sb[8].StatValue = (float) totalSumFrameTime / m_numberFramesStored / m_statisticsFPSfactor;
506 510
507 sb[9].StatID = (uint)Stats.NetMS; 511 sb[9].StatID = (uint)Stats.NetMS;
508 //sb[9].StatValue = m_netMS / framesUpdated; 512 //sb[9].StatValue = m_netMS / framesUpdated;
509 sb[9].StatValue = (float) networkSumFrameTime / m_numberFramesStored; 513 sb[9].StatValue = (float) networkSumFrameTime / m_numberFramesStored / m_statisticsFPSfactor;
510 514
511 sb[10].StatID = (uint)Stats.PhysicsMS; 515 sb[10].StatID = (uint)Stats.PhysicsMS;
512 //sb[10].StatValue = m_physicsMS / framesUpdated; 516 //sb[10].StatValue = m_physicsMS / framesUpdated;
513 sb[10].StatValue = (float) physicsSumFrameTime / m_numberFramesStored; 517 sb[10].StatValue = (float) physicsSumFrameTime / m_numberFramesStored / m_statisticsFPSfactor;
514 518
515 sb[11].StatID = (uint)Stats.ImageMS ; 519 sb[11].StatID = (uint)Stats.ImageMS ;
516 sb[11].StatValue = m_imageMS / framesUpdated; 520 sb[11].StatValue = m_imageMS / framesUpdated;
517 521
518 sb[12].StatID = (uint)Stats.OtherMS; 522 sb[12].StatID = (uint)Stats.OtherMS;
519 //sb[12].StatValue = m_otherMS / framesUpdated; 523 //sb[12].StatValue = m_otherMS / framesUpdated;
520 sb[12].StatValue = (float) simulationSumFrameTime / m_numberFramesStored; 524 sb[12].StatValue = (float) simulationSumFrameTime / m_numberFramesStored / m_statisticsFPSfactor;
521 525
522 sb[13].StatID = (uint)Stats.InPacketsPerSecond; 526 sb[13].StatID = (uint)Stats.InPacketsPerSecond;
523 sb[13].StatValue = (m_inPacketsPerSecond / m_statsUpdateFactor); 527 sb[13].StatValue = (m_inPacketsPerSecond / m_statsUpdateFactor);
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index f5268bd..d395efe 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -610,17 +610,16 @@
610[SimulatorFeatures] 610[SimulatorFeatures]
611 611
612 ;# {SearchServerURI} {} {URL of the search server} {} 612 ;# {SearchServerURI} {} {URL of the search server} {}
613 ;; This is identical to the Robust LoginService SearchURL setting 613 ;; Optional. If given this serves the same purpose as the grid wide
614 ;; and will override that value if set here. The Robust setting 614 ;; [LoginServices] SearchURL setting and will override that where
615 ;; provides a working default for the grid and setting here is 615 ;; supported by viewers.
616 ;; optional.
617 ;SearchServerURI = "http://127.0.0.1:9000/" 616 ;SearchServerURI = "http://127.0.0.1:9000/"
617
618 ;# {DestinationGuideURI} {} {URL of the destination guide} {} 618 ;# {DestinationGuideURI} {} {URL of the destination guide} {}
619 ;; 619 ;; Optional. If given this serves the same purpose as the grid wide
620 ;; This serves the same purpose as the DestinationGuideURI in the 620 ;; [LoginServices] DestinationGuide setting and will override that where
621 ;; LoginService setting in the Robust server. This will override 621 ;; supported by viewers.
622 ;; the Robust setting if desired as an option. 622 ;DestinationGuideURI = "http://127.0.0.1:9000/guide"
623 ;DestinationGuideURI = "http://127.0.0.1:9000/"
624 623
625 624
626[Chat] 625[Chat]
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 636069d..9002650 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -166,12 +166,30 @@
166 ; into a restart. 166 ; into a restart.
167 InworldRestartShutsDown = false 167 InworldRestartShutsDown = false
168 168
169 ; Use of normalized 55FPS statistics
170 ; Opensim does not have a frame rate control like other simulators
171 ; Most parameters that control timing can be configurable region by region
172 ; To achive closer compatibility with values expected by viewers, scripts and users
173 ; some parameters are converted to a equivalent per frame value.
174 ; Adicionaly they are scaled to values they whould have on a system running at a nominal 55 frames per second rate
175 ; The scale factor it 55 * FrameTime, corresponding to 5 with default configuration
176 ; You can choose to not apply this scale factor setting Normalized55FPS to false.
177 ; Normalized55FPS = true
178
169 ; The minimum proportion of a second that any particular frame can take to execute. 179 ; The minimum proportion of a second that any particular frame can take to execute.
170 ; Only change this if you really know what you're doing, and be prepared to change UpdatePhysicsEveryNFrames 180 ; Only change this if you really know what you're doing, and be prepared to change UpdatePhysicsEveryNFrames
171 ; (and other Frames params) to match! For instance, halving MinFrameTime to 0.0445 require 181 ; (and other Frames params) to match! For instance, halving MinFrameTime to 0.0445 require
172 ; UpdatePhysicsEveryNFrames = 2 unless you don't mind your avatar walking like Benny Hill. 182 ; UpdatePhysicsEveryNFrames = 2 unless you don't mind your avatar walking like Benny Hill.
173 MinFrameTime = 0.089 183 MinFrameTime = 0.089
174 184
185 ; The values below represent the percentage of the target frame time that,
186 ; when underrun, should trigger yellow or red in the lag meter.
187 ; Less than 60% of FPS is amber by default, less then 40% is red.
188 ; These values are advisory. Viewers may choose to not use them but it is
189 ; encouraged that they do.
190 ; FrameTimeWarnPercent = 60;
191 ; FrameTimeCritPercent = 40;
192
175 ; Send scheduled updates to objects in the scene 193 ; Send scheduled updates to objects in the scene
176 ; This must be a whole number 194 ; This must be a whole number
177 UpdateObjectsEveryNFrames = 1; 195 UpdateObjectsEveryNFrames = 1;
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 82eaf1f..6af444c 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -551,12 +551,12 @@
551 ; this as splash page 551 ; this as splash page
552 ;welcome = ${Const|BaseURL}/welcome 552 ;welcome = ${Const|BaseURL}/welcome
553 553
554 ; helper uri: optional: if it exists if will be used to tell the client to use 554 ; helper uri: optional: if it exists it will be used to tell the client to use
555 ; this for all economy related things 555 ; this for all economy related things
556 ;economy = ${Const|BaseURL}:${Const|PublicPort}/ 556 ;economy = ${Const|BaseURL}/economy
557 557
558 ; web page of grid: optional: page providing further information about your grid 558 ; web page of grid: optional: page providing further information about your grid
559 ;about = ${Const|BaseURL}/about/ 559 ;about = ${Const|BaseURL}/about
560 560
561 ; account creation: optional: page providing further information about obtaining 561 ; account creation: optional: page providing further information about obtaining
562 ; a user account on your grid 562 ; a user account on your grid
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 8d6496d..099d4da 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -538,12 +538,12 @@
538 ; this as splash page 538 ; this as splash page
539 ;welcome = ${Const|BaseURL}/welcome 539 ;welcome = ${Const|BaseURL}/welcome
540 540
541 ; helper uri: optional: if it exists if will be used to tell the client to use 541 ; helper uri: optional: if it exists it will be used to tell the client to use
542 ; this for all economy related things 542 ; this for all economy related things
543 ;economy = ${Const|BaseURL}:${Const|PublicPort}/ 543 ;economy = ${Const|BaseURL}/economy
544 544
545 ; web page of grid: optional: page providing further information about your grid 545 ; web page of grid: optional: page providing further information about your grid
546 ;about = ${Const|BaseURL}/about/ 546 ;about = ${Const|BaseURL}/about
547 547
548 ; account creation: optional: page providing further information about obtaining 548 ; account creation: optional: page providing further information about obtaining
549 ; a user account on your grid 549 ; a user account on your grid
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index 76d7a99..d0b152c 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -134,6 +134,9 @@
134 ; Url to search service 134 ; Url to search service
135 ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}"; 135 ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}";
136 136
137 ; For V3 destination guide
138 ; DestinationGuide = "${Const|BaseURL}/guide"
139
137 ; The minimum user level required for a user to be able to login. 0 by default 140 ; The minimum user level required for a user to be able to login. 0 by default
138 ; If you disable a particular user's account then you can set their login level below this number. 141 ; If you disable a particular user's account then you can set their login level below this number.
139 ; You can also change this level from the console though these changes will not be persisted. 142 ; You can also change this level from the console though these changes will not be persisted.
@@ -222,26 +225,21 @@
222 ; information on a standalone 225 ; information on a standalone
223 ;welcome = ${Const|BaseURL}/welcome 226 ;welcome = ${Const|BaseURL}/welcome
224 227
225 ; helper uri: optional: if it exists if will be used to tell the client to use 228 ; helper uri: optional: if it exists it will be used to tell the client to use
226 ; this for all economy related things 229 ; this for all economy related things
227 ; currently unused 230 ;economy = ${Const|BaseURL}/economy
228 ;economy = ${Const|BaseURL}:${Const|PublicPort}/
229 231
230 ; web page of grid: optional: page providing further information about your grid 232 ; web page of grid: optional: page providing further information about your grid
231 ; currently unused 233 ;about = ${Const|BaseURL}/about
232 ;about = ${Const|BaseURL}/about/
233 234
234 ; account creation: optional: page providing further information about obtaining 235 ; account creation: optional: page providing further information about obtaining
235 ; a user account on your grid 236 ; a user account on your grid
236 ; currently unused
237 ;register = ${Const|BaseURL}/register 237 ;register = ${Const|BaseURL}/register
238 238
239 ; help: optional: page providing further assistance for users of your grid 239 ; help: optional: page providing further assistance for users of your grid
240 ; currently unused
241 ;help = ${Const|BaseURL}/help 240 ;help = ${Const|BaseURL}/help
242 241
243 ; password help: optional: page providing password assistance for users of your grid 242 ; password help: optional: page providing password assistance for users of your grid
244 ; currently unused
245 ;password = ${Const|BaseURL}/password 243 ;password = ${Const|BaseURL}/password
246 244
247 ; HG address of the gatekeeper, if you have one 245 ; HG address of the gatekeeper, if you have one