using System;
using System.Diagnostics;
class MainClass
{
public static void Main()
{
Process thisProc = Process.GetCurrentProcess();
Console.WriteLine("ProcessName:"+ thisProc.ProcessName);
Console.WriteLine("Process: {0}, ID: {1}", thisProc.StartTime, thisProc.Id);
Console.WriteLine(" CPU time: {0}", thisProc.TotalProcessorTime);
Console.WriteLine(" priority class: {0} priority: {1}", thisProc.PriorityClass, thisProc.BasePriority);
Console.WriteLine(" virtual memory: {0}", thisProc.VirtualMemorySize);
Console.WriteLine(" private memory: {0}", thisProc.PrivateMemorySize);
Console.WriteLine(" physical memory: {0}", thisProc.WorkingSet);
}
}
ProcessName:main
Process: 25/03/2007 2:25:08 PM, ID: 2968
CPU time: 00:00:00.0312500
priority class: Normal priority: 8
virtual memory: 90906624
private memory: 9187328
physical memory: 4984832