« Imagine Children's Museum | Main | All My Base Are Belong To Them »

November 24, 2004

List of Managed Processes - In Monad

Krzysztof Cwalina, a .Net architect type, had a blog entry showing how to list all managed code processes on your machine.

The code is pretty simple in C#:

PerformanceCounterCategory clr = new PerformanceCounterCategory(".NET CLR Memory");
foreach(string process in clr.GetInstanceNames()) {
     if(process != "_Global_") {
         Console.WriteLine(process);
     }
}

But you still have to compile a program, etc...b-o-r-i-n-g!! In Monad, it's much easier: you can just type, from the command prompt, the following two lines:

$pcc = new-object System.Diagnostics.PerformanceCounterCategory ".NET CLR Memory"
foreach ($p in $pcc.GetInstanceNames()) { if ($p -ne "_Global_") { $p } }

On my machine it returns the following list:

KeyboardSurrogate
tabtip
tcserver
msh

msh is Monad; I'm not sure what the other stuff is.

Posted by AdamBa at November 24, 2004 08:47 PM

Trackback Pings

TrackBack URL for this entry:
http://proudlyserving.com/cgi-bin/mt-tb.cgi/90

Comments

Adam, are you on a tablet PC? A quick web search of those terms seems to be rich on TabletPC hits. Thats pretty cool.

Posted by: Senkwe at November 25, 2004 06:12 AM

Yes, I do have a tablet! A Toshiba Portege M200, in fact. I don't use the ink feature, but I do like having the touch pen to use instead of the pad "mouse".

- adam

Posted by: Adam Barr at November 25, 2004 09:55 AM