洞察有关进程线程的某些属性

时间:2019-06-24 07:53:57

标签: c# kernel

我想使用控制台查看线程的file locationtype,例如createthreadcreateprocessname of the thread,我目前的解决方案是< / p>

Process proc = Process.GetProcessesByName("myprocessg").FirstOrDefault();

ProcessThreadCollection myThreads = proc.Threads;

Console.WriteLine("process: {0},  id: {1}", proc.ProcessName, proc.Id);

foreach (ProcessThread pt in myThreads)
{
    Console.WriteLine("  thread:  {0}", pt.Id);
    Console.WriteLine("    CPU time: {0}", pt.TotalProcessorTime);
    Console.WriteLine("    priority: {0}", pt.BasePriority);
}

我如何检索我上面发布的信息?

0 个答案:

没有答案