"% Processor Time",
"AliIM");
logfile("% Processor Time:" + PTCounter.NextValue().ToString());
//内存
PerformanceCounter WSCounter = new PerformanceCounter("Process",
"Working Set",
"AliIM");
logfile("Working Set:" + ((double)WSCounter.NextValue() / 1024).ToString());
PerformanceCounter MemeryCounter = new PerformanceCounter("Process",
"Working Set Peak",
"AliIM");
logfile("Working Set Peak:" + ((double)MemeryCounter.NextValue() / 1024).ToString());
//虚拟内存
PerformanceCounter PBCounter = new PerformanceCounter("Process",
"Private Bytes",
"AliIM");
logfile("Private Bytes:" + ((double)PBCounter.NextValue() / 1024).ToString());
PerformanceCounter HCCounter = new PerformanceCounter("Process",
"Handle Count",
"AliIM");
logfile("Handle Count:" + HCCounter.NextValue() .ToString());
PerformanceCounter TCCounter = new PerformanceCounter("Process",
"Thread Count",
"AliIM");
logfile("Thread Count:" + TCCounter.NextValue() .ToString());
process = System.Diagnostics.Process.GetProcessesByName("AliIM")[0];
logfile("GDI Objects Count:" + GetGuiResources(process.Handle, 0));