aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs94
1 files changed, 58 insertions, 36 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index fb1e831..28f9481 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Diagnostics;
31using System.IO; 32using System.IO;
32using System.Reflection; 33using System.Reflection;
33using System.Text; 34using System.Text;
@@ -138,7 +139,7 @@ namespace OpenSim
138 m_log.Info("===================================================================="); 139 m_log.Info("====================================================================");
139 m_log.Info("========================= STARTING OPENSIM ========================="); 140 m_log.Info("========================= STARTING OPENSIM =========================");
140 m_log.Info("===================================================================="); 141 m_log.Info("====================================================================");
141 142
142 //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); 143 //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
143 // http://msdn.microsoft.com/en-us/library/bb384202.aspx 144 // http://msdn.microsoft.com/en-us/library/bb384202.aspx
144 //GCSettings.LatencyMode = GCLatencyMode.Batch; 145 //GCSettings.LatencyMode = GCLatencyMode.Batch;
@@ -225,7 +226,7 @@ namespace OpenSim
225 /// </summary> 226 /// </summary>
226 private void RegisterConsoleCommands() 227 private void RegisterConsoleCommands()
227 { 228 {
228 m_console.Commands.AddCommand("Regions", false, "force update", 229 m_console.Commands.AddCommand("Objects", false, "force update",
229 "force update", 230 "force update",
230 "Force the update of all objects on clients", 231 "Force the update of all objects on clients",
231 HandleForceUpdate); 232 HandleForceUpdate);
@@ -306,7 +307,7 @@ namespace OpenSim
306 + " If this is not given then the oar is saved to region.oar in the current directory.", 307 + " If this is not given then the oar is saved to region.oar in the current directory.",
307 SaveOar); 308 SaveOar);
308 309
309 m_console.Commands.AddCommand("Regions", false, "edit scale", 310 m_console.Commands.AddCommand("Objects", false, "edit scale",
310 "edit scale <name> <x> <y> <z>", 311 "edit scale <name> <x> <y> <z>",
311 "Change the scale of a named prim", HandleEditScale); 312 "Change the scale of a named prim", HandleEditScale);
312 313
@@ -349,7 +350,7 @@ namespace OpenSim
349 "show ratings", 350 "show ratings",
350 "Show rating data", HandleShow); 351 "Show rating data", HandleShow);
351 352
352 m_console.Commands.AddCommand("Regions", false, "backup", 353 m_console.Commands.AddCommand("Objects", false, "backup",
353 "backup", 354 "backup",
354 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); 355 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand);
355 356
@@ -410,7 +411,7 @@ namespace OpenSim
410 "modules unload <name>", 411 "modules unload <name>",
411 "Unload a module", HandleModules); 412 "Unload a module", HandleModules);
412 413
413 m_console.Commands.AddCommand("Regions", false, "kill uuid", 414 m_console.Commands.AddCommand("Objects", false, "kill uuid",
414 "kill uuid <UUID>", 415 "kill uuid <UUID>",
415 "Kill an object by UUID", KillUUID); 416 "Kill an object by UUID", KillUUID);
416 } 417 }
@@ -618,10 +619,11 @@ namespace OpenSim
618 return; 619 return;
619 } 620 }
620 621
621 PopulateRegionEstateInfo(regInfo); 622 bool changed = PopulateRegionEstateInfo(regInfo);
622 IScene scene; 623 IScene scene;
623 CreateRegion(regInfo, true, out scene); 624 CreateRegion(regInfo, true, out scene);
624 regInfo.EstateSettings.Save(); 625 if (changed)
626 regInfo.EstateSettings.Save();
625 } 627 }
626 628
627 /// <summary> 629 /// <summary>
@@ -969,8 +971,7 @@ namespace OpenSim
969 if (showParams.Length > 1 && showParams[1] == "full") 971 if (showParams.Length > 1 && showParams[1] == "full")
970 { 972 {
971 agents = m_sceneManager.GetCurrentScenePresences(); 973 agents = m_sceneManager.GetCurrentScenePresences();
972 } 974 } else
973 else
974 { 975 {
975 agents = m_sceneManager.GetCurrentSceneAvatars(); 976 agents = m_sceneManager.GetCurrentSceneAvatars();
976 } 977 }
@@ -979,7 +980,8 @@ namespace OpenSim
979 980
980 MainConsole.Instance.Output( 981 MainConsole.Instance.Output(
981 String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname", 982 String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname",
982 "Agent ID", "Root/Child", "Region", "Position")); 983 "Agent ID", "Root/Child", "Region", "Position")
984 );
983 985
984 foreach (ScenePresence presence in agents) 986 foreach (ScenePresence presence in agents)
985 { 987 {
@@ -989,8 +991,7 @@ namespace OpenSim
989 if (regionInfo == null) 991 if (regionInfo == null)
990 { 992 {
991 regionName = "Unresolvable"; 993 regionName = "Unresolvable";
992 } 994 } else
993 else
994 { 995 {
995 regionName = regionInfo.RegionName; 996 regionName = regionInfo.RegionName;
996 } 997 }
@@ -1003,7 +1004,8 @@ namespace OpenSim
1003 presence.UUID, 1004 presence.UUID,
1004 presence.IsChildAgent ? "Child" : "Root", 1005 presence.IsChildAgent ? "Child" : "Root",
1005 regionName, 1006 regionName,
1006 presence.AbsolutePosition.ToString())); 1007 presence.AbsolutePosition.ToString())
1008 );
1007 } 1009 }
1008 1010
1009 MainConsole.Instance.Output(String.Empty); 1011 MainConsole.Instance.Output(String.Empty);
@@ -1012,16 +1014,20 @@ namespace OpenSim
1012 case "connections": 1014 case "connections":
1013 System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n"); 1015 System.Text.StringBuilder connections = new System.Text.StringBuilder("Connections:\n");
1014 m_sceneManager.ForEachScene( 1016 m_sceneManager.ForEachScene(
1015 delegate(Scene scene) 1017 delegate(Scene scene) {
1016 { 1018 scene.ForEachClient(
1017 scene.ForEachClient( 1019 delegate(IClientAPI client) {
1018 delegate(IClientAPI client) 1020 connections.AppendFormat(
1019 { 1021 "{0}: {1} ({2}) from {3} on circuit {4}\n",
1020 connections.AppendFormat("{0}: {1} ({2}) from {3} on circuit {4}\n", 1022 scene.RegionInfo.RegionName,
1021 scene.RegionInfo.RegionName, client.Name, client.AgentId, client.RemoteEndPoint, client.CircuitCode); 1023 client.Name,
1022 } 1024 client.AgentId,
1025 client.RemoteEndPoint,
1026 client.CircuitCode
1023 ); 1027 );
1024 } 1028 }
1029 );
1030 }
1025 ); 1031 );
1026 1032
1027 MainConsole.Instance.Output(connections.ToString()); 1033 MainConsole.Instance.Output(connections.ToString());
@@ -1030,13 +1036,17 @@ namespace OpenSim
1030 case "circuits": 1036 case "circuits":
1031 System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n"); 1037 System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n");
1032 m_sceneManager.ForEachScene( 1038 m_sceneManager.ForEachScene(
1033 delegate(Scene scene) 1039 delegate(Scene scene) {
1034 { 1040 //this.HttpServer.
1035 //this.HttpServer. 1041 acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
1036 acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName); 1042 foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values)
1037 foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.GetAgentCircuits().Values) 1043 acd.AppendFormat(
1038 acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root")); 1044 "\t{0} {1} ({2})\n",
1039 } 1045 aCircuit.firstname,
1046 aCircuit.lastname,
1047 (aCircuit.child ? "Child" : "Root")
1048 );
1049 }
1040 ); 1050 );
1041 1051
1042 MainConsole.Instance.Output(acd.ToString()); 1052 MainConsole.Instance.Output(acd.ToString());
@@ -1077,17 +1087,29 @@ namespace OpenSim
1077 } 1087 }
1078 1088
1079 m_sceneManager.ForEachScene( 1089 m_sceneManager.ForEachScene(
1080 delegate(Scene scene) 1090 delegate(Scene scene) {
1091 m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:");
1092 foreach (IRegionModule module in scene.Modules.Values)
1081 { 1093 {
1082 m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); 1094 if (!module.IsSharedModule)
1083 foreach (IRegionModule module in scene.Modules.Values)
1084 { 1095 {
1085 if (!module.IsSharedModule) 1096 m_log.Error("Region Module: " + module.Name);
1086 {
1087 m_log.Error("Region Module: " + module.Name);
1088 }
1089 } 1097 }
1090 }); 1098 }
1099 }
1100 );
1101
1102 m_sceneManager.ForEachScene(
1103 delegate(Scene scene) {
1104 MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:");
1105 foreach (IRegionModuleBase module in scene.RegionModules.Values)
1106 {
1107 Type type = module.GetType().GetInterface("ISharedRegionModule");
1108 string module_type = type != null ? "Shared" : "Non-Shared";
1109 MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name);
1110 }
1111 }
1112 );
1091 1113
1092 MainConsole.Instance.Output(""); 1114 MainConsole.Instance.Output("");
1093 break; 1115 break;