aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/ServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/ServerBase.cs')
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index 3c2dce8..81b112f 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -31,6 +31,7 @@ using System.Diagnostics;
31using System.IO; 31using System.IO;
32using System.Linq; 32using System.Linq;
33using System.Reflection; 33using System.Reflection;
34using System.Runtime;
34using System.Text; 35using System.Text;
35using System.Text.RegularExpressions; 36using System.Text.RegularExpressions;
36using System.Threading; 37using System.Threading;
@@ -491,24 +492,28 @@ namespace OpenSim.Framework.Servers
491 492
492 if (!int.TryParse(rawLevel, out newLevel)) 493 if (!int.TryParse(rawLevel, out newLevel))
493 { 494 {
494 MainConsole.Instance.OutputFormat("{0} is not a valid debug level", rawLevel); 495 MainConsole.Instance.Output("{0} is not a valid debug level", rawLevel);
495 return; 496 return;
496 } 497 }
497 498
498 if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL) 499 if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL)
499 { 500 {
500 MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, newLevel); 501 MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, newLevel);
501 return; 502 return;
502 } 503 }
503 504
504 Util.LogThreadPool = newLevel; 505 Util.LogThreadPool = newLevel;
505 MainConsole.Instance.OutputFormat("LogThreadPool set to {0}", newLevel); 506 MainConsole.Instance.Output("LogThreadPool set to {0}", newLevel);
506 } 507 }
507 508
508 private void HandleForceGc(string module, string[] args) 509 private void HandleForceGc(string module, string[] args)
509 { 510 {
510 Notice("Manually invoking runtime garbage collection"); 511 Notice("Manually invoking runtime garbage collection");
512 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
511 GC.Collect(); 513 GC.Collect();
514 GC.WaitForPendingFinalizers();
515 GC.Collect();
516 GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
512 } 517 }
513 518
514 public virtual void HandleShow(string module, string[] cmd) 519 public virtual void HandleShow(string module, string[] cmd)
@@ -923,9 +928,7 @@ namespace OpenSim.Framework.Servers
923 } 928 }
924 catch { } 929 catch { }
925 930
926 if ( 931 if (Util.FireAndForgetMethod == FireAndForgetMethod.QueueUserWorkItem)
927 Util.FireAndForgetMethod == FireAndForgetMethod.QueueUserWorkItem
928 || Util.FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem)
929 { 932 {
930 sb.AppendFormat("\nThread pool used: Framework main threadpool\n"); 933 sb.AppendFormat("\nThread pool used: Framework main threadpool\n");
931 return sb.ToString(); 934 return sb.ToString();
@@ -988,9 +991,9 @@ namespace OpenSim.Framework.Servers
988 } 991 }
989 992
990 if (Watchdog.AbortThread(threadId)) 993 if (Watchdog.AbortThread(threadId))
991 MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); 994 MainConsole.Instance.Output("Aborted thread with id {0}", threadId);
992 else 995 else
993 MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); 996 MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", threadId);
994 } 997 }
995 998
996 /// <summary> 999 /// <summary>
@@ -1017,7 +1020,7 @@ namespace OpenSim.Framework.Servers
1017 protected void Notice(string format, params object[] components) 1020 protected void Notice(string format, params object[] components)
1018 { 1021 {
1019 if (m_console != null) 1022 if (m_console != null)
1020 m_console.OutputFormat(format, components); 1023 m_console.Output(format, components);
1021 } 1024 }
1022 1025
1023 public virtual void Shutdown() 1026 public virtual void Shutdown()