Listing of Managed Processes

I just discovered a cool way of listing all processes that run managed code. 

 

using System.Diagnostics;

using System;

 

class Program {

 

    static void Test() {

        PerformanceCounterCategory clr = new PerformanceCounterCategory(".NET CLR Memory");

        foreach(string process in clr.GetInstanceNames()) {

            if(process != "_Global_") {

                Console.WriteLine(process);

            }

        }

    }

}

 

Does anybody know an easier way to do it?

 

On my machine it prints (but it’s a pretty clean machine):

devenv

OUTLOOK

ConsoleTest.vshost

 

Anybody wants to share their list?

 

Published 18 November 04 08:49 by kcwalina
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# William Robertson said on November 18, 2004 10:08 PM:
devenv
ConsoleApplicat

Hhow did you get it to display longer process names?
# Brad Abrams[MSFT] said on November 18, 2004 10:49 PM:
Cool stuff Here is what is running on my machine..

ETClient - Internal Telephony app
TCServer - ?
FontCacheService - From an early Avalon build I have
SharpReader you know
ConsoleApplication1.vshost - this app ;-)
VCSExpress - VS..
KeyboardSurrogate - Tablet??
OUTLOOK - From LookOut
TabTip - From Tablet??
# Scott Mitchell said on November 19, 2004 12:16 AM:
devenv <br>OUTLOOK.EXE <br>ScrabbleSolver (a little console app I wrote that, given a set of letters, lists all of the legal scrabble word permutations) <br>Reflector <br>RSSBandit
# Barry Dorrans said on November 19, 2004 12:32 AM:
Explorer.EXE#1
aspnet_wp : Obvious
Explorer.EXE
ConsoleApplica : The lister
OUTLOOK.EXE : News Gator Again
ReportingServi : Yukon beta
SQLAGENT90.EXE : Yukon beta
devenv

But Explorer? Really? I wonder what that is. Unless it's the newsgator toolbar I have no idea what's going on there.


# William Robertson said on November 19, 2004 12:44 AM:
Home machine:

vsmsvr
devenv
ConsoleApplicat
aspnet_wp
Mp3Collector

Does anyone know what the vsmsvr is?
# Joe Cheng said on November 19, 2004 1:03 AM:
Reflector (trying to debug 1.1/Whidbey incompatibility)
ruby (RubyDotNet bridge)
iexplore (Onfolio add-in)
VCSExpress
dexplore (help?)
firefox (Onfolio add-in)
devenv
# Albert said on November 19, 2004 1:10 AM:
Merge (Some araxis merge plugin)
Reflector (Lutz's)
OUTLOOK.EXE (an email reader)
devenv (an ide to develop apps that print out process lists)
acad (AutoCAD, a CAD package)
# Ben Monroe said on November 19, 2004 1:49 AM:
Thanks for the tip.

My list:

Reflector
TimeZone
OUTLOOK
nunit-gui
explorer
SharpReader
ConsoleApplication1.vshost
VCSExpress
FxCop

I'm not sure why explorer is there though.
# Andreas Häber said on November 19, 2004 1:55 AM:
Very boring list from me:
TimeZone -- From microsoft.com/download. Very useful when living far away from home :)
dotnetprocs.ex -- this program..
# Joe Duffy said on November 19, 2004 2:13 AM:
cILli.vshost
tl
SharpReader
Reflector
VCSExpress
VCSExpress#1
OUTLOOK
Wrox20.vshost
# Sudhakar said on November 19, 2004 2:26 AM:
devenv
TimeZone
PaintDotNet.ex
aspnet_wp
ConsoleApplica
Imspire GSuite
# Adrian Florea said on November 19, 2004 2:28 AM:
On my machine, a lot of other ".NET CLR xxx" performance counter categories produce the same result as the ".NET CLR Memory" category:

.NET CLR Loading
.NET CLR Exceptions
.NET CLR Jit
.NET CLR LocksAndThreads
.NET CLR Security
.NET CLR Remoting
.NET CLR Interop

How did you choose between, let's say, ".NET CLR Memory", ".NET CLR Loading" and ".NET CLR LocksAndThreads"?
# Karthik said on November 19, 2004 2:47 AM:
"tasklist /m mscoree.dll" works as well.
# Corrado Cavalli said on November 19, 2004 3:24 AM:
What about Win98 and Me? :-(
# Luc Cluitmans said on November 19, 2004 5:39 AM:
Not much here, today:

devenv
NetApps
RSSBandit

(NetApps is the application producing this list, compiled from the code above)

"tasklist /m mscoree.dll" is not completely equivalent; that one also includes processes that host or monitor managed apps, without being a managed app themselves:

aspnet_admin.exe
procexp.exe
RSSBandit.exe
devenv.exe

Note the presence of aspnet_admin and process explorer (free download from http://www.sysinternals.com/ ).

That being said, recent versions of process explorer highlight .NET applications differently than non-net applications, which makes it a faster way of seeing what processes are .NET applications.
# rama said on November 19, 2004 9:14 AM:
w3wp
devenv#1
SPSNotification
RuleEngineUpdat (BizTalk)
ENTSSO (Single Sign On)
mssdmn
BTSNTSvc (BizTalk)
mmc
ConsoleApp
spsadmin (Sharepoint)
devenv
# Jeff Parker said on November 19, 2004 9:33 AM:
NDocGui
WebHelper (VSIP Plugin I made)
nunit-gui
devenv#1 (VS 2)
SnippetCompiler
devenv#2 (VS 3)
output
SharpReader
devenv (VS 1)

Have Biztalk shut down currently because I 2 Virtual Machines running as well. But would have all the standard Biztalk stuff normally as well
# null said on November 20, 2004 2:17 AM:
program <-- the query
dsidebar
TCServer
TabTip
KeyboardSurrog
# Pure Nonsense said on November 20, 2004 4:56 PM:
If it's extremely slow, then it is java (sort of managed), if it is a bit faster but uses lots of memory (WinForms), it is .Net and if it's fast but crashes now and then, it's unmanaged.

Sysinternals Process Explorer does the rest (just take a look at the dlls which are loaded in the process :))
# LF said on November 21, 2004 8:35 PM:
Not an easy way, but can get you process and the AppDomain names and path:

http://www.bearcanyon.com/dotnet/#corpub
# Mike Stall's .NET Debugging Blog said on November 25, 2004 12:49 AM:
# Adventurer said on December 1, 2004 7:32 AM:
TraceSessionManager
devenv
ConsoleApplication4.vshost
VisualCronService
aspnet_wp
# Ian Griffiths said on December 1, 2004 2:58 PM:
FontCacheServi
devenv
ShowManaged.ex
dexplore
aspnet_wp
SharpReader.ex
# Jason Whittington said on December 2, 2004 2:51 PM:
The ICorPublishProcess COM interface is a little more "official" way to do it. Chris Sells posted a little utility using it on his site:

http://www.sellsbrothers.com/tools/#corpub

Leave a Comment

(required) 
(optional)
(required) 
Page view tracker