diff options
author | Justin Clark-Casey (justincc) | 2012-11-23 04:27:04 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-11-23 04:27:04 +0000 |
commit | e0a3e01850ea066ef10bfe59ffa81b8ac425442a (patch) | |
tree | 2f420d0b35b453eae9214b0e5da83c24d5eeca04 | |
parent | Make "show version" console command available across all servers (diff) | |
download | opensim-SC_OLD-e0a3e01850ea066ef10bfe59ffa81b8ac425442a.zip opensim-SC_OLD-e0a3e01850ea066ef10bfe59ffa81b8ac425442a.tar.gz opensim-SC_OLD-e0a3e01850ea066ef10bfe59ffa81b8ac425442a.tar.bz2 opensim-SC_OLD-e0a3e01850ea066ef10bfe59ffa81b8ac425442a.tar.xz |
Make "force gc" console command available across all servers
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 11 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/ServerBase.cs | 12 |
2 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index d8b4737..3f66ab5 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -112,17 +112,6 @@ namespace OpenSim.Framework.Servers | |||
112 | "threads show", | 112 | "threads show", |
113 | "Show thread status. Synonym for \"show threads\"", | 113 | "Show thread status. Synonym for \"show threads\"", |
114 | (string module, string[] args) => Notice(GetThreadsReport())); | 114 | (string module, string[] args) => Notice(GetThreadsReport())); |
115 | |||
116 | m_console.Commands.AddCommand("General", false, "force gc", | ||
117 | "force gc", | ||
118 | "Manually invoke runtime garbage collection. For debugging purposes", | ||
119 | HandleForceGc); | ||
120 | } | ||
121 | |||
122 | private void HandleForceGc(string module, string[] args) | ||
123 | { | ||
124 | MainConsole.Instance.Output("Manually invoking runtime garbage collection"); | ||
125 | GC.Collect(); | ||
126 | } | 115 | } |
127 | 116 | ||
128 | /// <summary> | 117 | /// <summary> |
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 431dc9e..b8bc27e 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs | |||
@@ -209,6 +209,18 @@ namespace OpenSim.Framework.Servers | |||
209 | "General", false, "command-script", | 209 | "General", false, "command-script", |
210 | "command-script <script>", | 210 | "command-script <script>", |
211 | "Run a command script from file", HandleScript); | 211 | "Run a command script from file", HandleScript); |
212 | |||
213 | m_console.Commands.AddCommand( | ||
214 | "General", false, "force gc", | ||
215 | "force gc", | ||
216 | "Manually invoke runtime garbage collection. For debugging purposes", | ||
217 | HandleForceGc); | ||
218 | } | ||
219 | |||
220 | private void HandleForceGc(string module, string[] args) | ||
221 | { | ||
222 | Notice("Manually invoking runtime garbage collection"); | ||
223 | GC.Collect(); | ||
212 | } | 224 | } |
213 | 225 | ||
214 | public virtual void HandleShow(string module, string[] cmd) | 226 | public virtual void HandleShow(string module, string[] cmd) |