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?

 

Comments (24)

  1. William Robertson says:

    devenv

    ConsoleApplicat

    Hhow did you get it to display longer process names?

  2. 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??

  3. 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

  4. 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.

  5. William Robertson says:

    Home machine:

    vsmsvr

    devenv

    ConsoleApplicat

    aspnet_wp

    Mp3Collector

    Does anyone know what the vsmsvr is?

  6. Joe Cheng says:

    Reflector (trying to debug 1.1/Whidbey incompatibility)

    ruby (RubyDotNet bridge)

    iexplore (Onfolio add-in)

    VCSExpress

    dexplore (help?)

    firefox (Onfolio add-in)

    devenv

  7. Albert says:

    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)

  8. Ben Monroe says:

    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.

  9. Very boring list from me:

    TimeZone — From microsoft.com/download. Very useful when living far away from home :)

    dotnetprocs.ex — this program..

  10. Joe Duffy says:

    cILli.vshost

    tl

    SharpReader

    Reflector

    VCSExpress

    VCSExpress#1

    OUTLOOK

    Wrox20.vshost

  11. Sudhakar says:

    devenv

    TimeZone

    PaintDotNet.ex

    aspnet_wp

    ConsoleApplica

    Imspire GSuite

  12. 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"?

  13. Karthik says:

    "tasklist /m mscoree.dll" works as well.

  14. Corrado Cavalli says:

    What about Win98 and Me? :-(

  15. Luc Cluitmans says:

    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.

  16. rama says:

    w3wp

    devenv#1

    SPSNotification

    RuleEngineUpdat (BizTalk)

    ENTSSO (Single Sign On)

    mssdmn

    BTSNTSvc (BizTalk)

    mmc

    ConsoleApp

    spsadmin (Sharepoint)

    devenv

  17. Jeff Parker says:

    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

  18. null says:

    program <– the query

    dsidebar

    TCServer

    TabTip

    KeyboardSurrog

  19. Pure Nonsense says:

    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 :))

  20. LF says:

    Not an easy way, but can get you process and the AppDomain names and path:

    http://www.bearcanyon.com/dotnet/#corpub

  21. Adventurer says:

    TraceSessionManager

    devenv

    ConsoleApplication4.vshost

    VisualCronService

    aspnet_wp

  22. FontCacheServi

    devenv

    ShowManaged.ex

    dexplore

    aspnet_wp

    SharpReader.ex

  23. 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