Print ThreadPool config during startup

This commit is contained in:
kaso17 2017-02-15 17:22:01 +01:00
parent 0d8c446b74
commit e885a88189
1 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,7 @@ using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
@ -157,6 +158,18 @@ namespace Jackett.Services
logger.Info("Environment version: " + Environment.Version.ToString() + " (" + runtimedir + ")");
logger.Info("OS version: " + Environment.OSVersion.ToString() + (Environment.Is64BitOperatingSystem ? " (64bit OS)" : "") + (Environment.Is64BitProcess ? " (64bit process)" : ""));
try
{
int workerThreads;
int completionPortThreads;
ThreadPool.GetMaxThreads(out workerThreads, out completionPortThreads);
logger.Info("ThreadPool MaxThreads: " + workerThreads + " workerThreads, " + completionPortThreads + " completionPortThreads");
}
catch (Exception e)
{
logger.Error("Error while getting MaxThreads details: " + e);
}
try
{
var issuefile = "/etc/issue";