diff options
author | Justin Clark-Casey (justincc) | 2013-08-06 00:00:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-06 00:00:12 +0100 |
commit | ac198068ab7bb3895d95c6d1902b2c6af575a32a (patch) | |
tree | 00af651f0e19693153807c31b0b903913da8c458 | |
parent | Add "debug comms status" command to show current debug comms settings (diff) | |
download | opensim-SC_OLD-ac198068ab7bb3895d95c6d1902b2c6af575a32a.zip opensim-SC_OLD-ac198068ab7bb3895d95c6d1902b2c6af575a32a.tar.gz opensim-SC_OLD-ac198068ab7bb3895d95c6d1902b2c6af575a32a.tar.bz2 opensim-SC_OLD-ac198068ab7bb3895d95c6d1902b2c6af575a32a.tar.xz |
Add "debug threadpool status" console command to show min/max/current worker/iocp threadpool numbers
-rw-r--r-- | OpenSim/Framework/Servers/ServerBase.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 1bee6a3..c258ff6 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs | |||
@@ -274,6 +274,12 @@ namespace OpenSim.Framework.Servers | |||
274 | "Set threadpool parameters. For debug purposes.", | 274 | "Set threadpool parameters. For debug purposes.", |
275 | HandleDebugThreadpoolSet); | 275 | HandleDebugThreadpoolSet); |
276 | 276 | ||
277 | m_console.Commands.AddCommand ( | ||
278 | "Debug", false, "debug threadpool status", | ||
279 | "debug threadpool status", | ||
280 | "Show current debug threadpool parameters.", | ||
281 | HandleDebugThreadpoolStatus); | ||
282 | |||
277 | m_console.Commands.AddCommand( | 283 | m_console.Commands.AddCommand( |
278 | "Debug", false, "force gc", | 284 | "Debug", false, "force gc", |
279 | "force gc", | 285 | "force gc", |
@@ -337,6 +343,23 @@ namespace OpenSim.Framework.Servers | |||
337 | Notice("serialosdreq is now {0}", setSerializeOsdRequests); | 343 | Notice("serialosdreq is now {0}", setSerializeOsdRequests); |
338 | } | 344 | } |
339 | 345 | ||
346 | private void HandleDebugThreadpoolStatus(string module, string[] args) | ||
347 | { | ||
348 | int workerThreads, iocpThreads; | ||
349 | |||
350 | ThreadPool.GetMinThreads(out workerThreads, out iocpThreads); | ||
351 | Notice("Min worker threads: {0}", workerThreads); | ||
352 | Notice("Min IOCP threads: {0}", iocpThreads); | ||
353 | |||
354 | ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); | ||
355 | Notice("Max worker threads: {0}", workerThreads); | ||
356 | Notice("Max IOCP threads: {0}", iocpThreads); | ||
357 | |||
358 | ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads); | ||
359 | Notice("Available worker threads: {0}", workerThreads); | ||
360 | Notice("Available IOCP threads: {0}", iocpThreads); | ||
361 | } | ||
362 | |||
340 | private void HandleDebugThreadpoolSet(string module, string[] args) | 363 | private void HandleDebugThreadpoolSet(string module, string[] args) |
341 | { | 364 | { |
342 | if (args.Length != 6) | 365 | if (args.Length != 6) |