diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 6a3135e..06a8021 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -161,43 +161,43 @@ namespace OpenSim.Framework.Servers | |||
161 | Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); | 161 | Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); |
162 | } | 162 | } |
163 | 163 | ||
164 | m_console.Commands.AddCommand("base", false, "quit", | 164 | m_console.Commands.AddCommand("General", false, "quit", |
165 | "quit", | 165 | "quit", |
166 | "Quit the application", HandleQuit); | 166 | "Quit the application", HandleQuit); |
167 | 167 | ||
168 | m_console.Commands.AddCommand("base", false, "shutdown", | 168 | m_console.Commands.AddCommand("General", false, "shutdown", |
169 | "shutdown", | 169 | "shutdown", |
170 | "Quit the application", HandleQuit); | 170 | "Quit the application", HandleQuit); |
171 | 171 | ||
172 | m_console.Commands.AddCommand("base", false, "set log level", | 172 | m_console.Commands.AddCommand("General", false, "set log level", |
173 | "set log level <level>", | 173 | "set log level <level>", |
174 | "Set the console logging level", HandleLogLevel); | 174 | "Set the console logging level", HandleLogLevel); |
175 | 175 | ||
176 | m_console.Commands.AddCommand("base", false, "show info", | 176 | m_console.Commands.AddCommand("General", false, "show info", |
177 | "show info", | 177 | "show info", |
178 | "Show general information about the server", HandleShow); | 178 | "Show general information about the server", HandleShow); |
179 | 179 | ||
180 | m_console.Commands.AddCommand("base", false, "show stats", | 180 | m_console.Commands.AddCommand("General", false, "show stats", |
181 | "show stats", | 181 | "show stats", |
182 | "Show statistics", HandleShow); | 182 | "Show statistics", HandleShow); |
183 | 183 | ||
184 | m_console.Commands.AddCommand("base", false, "show threads", | 184 | m_console.Commands.AddCommand("General", false, "show threads", |
185 | "show threads", | 185 | "show threads", |
186 | "Show thread status", HandleShow); | 186 | "Show thread status", HandleShow); |
187 | 187 | ||
188 | m_console.Commands.AddCommand("base", false, "show uptime", | 188 | m_console.Commands.AddCommand("General", false, "show uptime", |
189 | "show uptime", | 189 | "show uptime", |
190 | "Show server uptime", HandleShow); | 190 | "Show server uptime", HandleShow); |
191 | 191 | ||
192 | m_console.Commands.AddCommand("base", false, "show version", | 192 | m_console.Commands.AddCommand("General", false, "show version", |
193 | "show version", | 193 | "show version", |
194 | "Show server version", HandleShow); | 194 | "Show server version", HandleShow); |
195 | 195 | ||
196 | m_console.Commands.AddCommand("base", false, "threads abort", | 196 | m_console.Commands.AddCommand("General", false, "threads abort", |
197 | "threads abort <thread-id>", | 197 | "threads abort <thread-id>", |
198 | "Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort); | 198 | "Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort); |
199 | 199 | ||
200 | m_console.Commands.AddCommand("base", false, "threads show", | 200 | m_console.Commands.AddCommand("General", false, "threads show", |
201 | "threads show", | 201 | "threads show", |
202 | "Show thread status. Synonym for \"show threads\"", | 202 | "Show thread status. Synonym for \"show threads\"", |
203 | (string module, string[] args) => Notice(GetThreadsReport())); | 203 | (string module, string[] args) => Notice(GetThreadsReport())); |
@@ -269,15 +269,19 @@ namespace OpenSim.Framework.Servers | |||
269 | t.Priority, | 269 | t.Priority, |
270 | t.ThreadState); | 270 | t.ThreadState); |
271 | 271 | ||
272 | sb.Append(Environment.NewLine); | 272 | sb.Append("\n"); |
273 | } | 273 | } |
274 | 274 | ||
275 | int workers = 0, ports = 0, maxWorkers = 0, maxPorts = 0; | 275 | sb.Append("\n"); |
276 | ThreadPool.GetAvailableThreads(out workers, out ports); | ||
277 | ThreadPool.GetMaxThreads(out maxWorkers, out maxPorts); | ||
278 | 276 | ||
279 | sb.Append(Environment.NewLine + "*** ThreadPool threads ***" + Environment.NewLine); | 277 | // For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting |
280 | sb.Append("workers: " + (maxWorkers - workers) + " (" + maxWorkers + "); ports: " + (maxPorts - ports) + " (" + maxPorts + ")" + Environment.NewLine); | 278 | // zero active threads. |
279 | int totalThreads = Process.GetCurrentProcess().Threads.Count; | ||
280 | if (totalThreads > 0) | ||
281 | sb.AppendFormat("Total threads active: {0}\n\n", totalThreads); | ||
282 | |||
283 | sb.Append("Main threadpool (excluding script engine pools)\n"); | ||
284 | sb.Append(Util.GetThreadPoolReport()); | ||
281 | 285 | ||
282 | return sb.ToString(); | 286 | return sb.ToString(); |
283 | } | 287 | } |