[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

monitoring manged thread cpu utilization

Neil Colvin

11/12/2002 3:37:00 PM

Is there a way to obtain the cpu utilization for a managed
thread? The ProcessThread class contains complete cpu
information, but the Thread class does not. Since there
seems to be no mapping from ProcessThread to Thread, there
is no obvious solution.
4 Answers

(Mike Clay (MSFT))

11/13/2002 11:21:00 PM

0

Hi Neil,

I've been researching this. Other than perfmon, I don't know of any way to
get that info through code. I'lll keep looking, but I have not found a way
to grab that info from the Thread class.

Mike Clay, MCSD
Beta Technical Support


This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.

Neil Colvin

11/15/2002 8:48:00 PM

0

I have not found any way to use perfmon to get the info...it also monitor
ProcessThreads, not managed Threads.

This is a big development problem.. It is virtually impossible to do real
peformance tuning of managed threads without some way to do this!

"Mike Clay (MS)" <mclay@online.microsoft.com> wrote in message
news:MrslsL2iCHA.2488@cpmsftngxa06...
> Hi Neil,
>
> I've been researching this. Other than perfmon, I don't know of any way
to
> get that info through code. I'lll keep looking, but I have not found a
way
> to grab that info from the Thread class.
>
> Mike Clay, MCSD
> Beta Technical Support
>
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> © 2002 Microsoft Corporation. All rights reserved.
>


Willy Denoyette [MVP]

11/15/2002 8:59:00 PM

0

Managed threads and OS threads map 1:1 in the current version of the CLR, so it should be easy to monitor them using perf counter
objects.

Willy.

"Neil Colvin" <ncolvinonline@nivloc.biz> wrote in message news:Ob3ah$NjCHA.1784@tkmsftngp09...
> I have not found any way to use perfmon to get the info...it also monitor
> ProcessThreads, not managed Threads.
>
> This is a big development problem.. It is virtually impossible to do real
> peformance tuning of managed threads without some way to do this!
>
> "Mike Clay (MS)" <mclay@online.microsoft.com> wrote in message
> news:MrslsL2iCHA.2488@cpmsftngxa06...
> > Hi Neil,
> >
> > I've been researching this. Other than perfmon, I don't know of any way
> to
> > get that info through code. I'lll keep looking, but I have not found a
> way
> > to grab that info from the Thread class.
> >
> > Mike Clay, MCSD
> > Beta Technical Support
> >
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > © 2002 Microsoft Corporation. All rights reserved.
> >
>
>


Neil Colvin

11/17/2002 5:41:00 AM

0

That is great...but how do I find the OS Thread (ProcessThread) which
corresponds to my ManagedThread so I can use the performance APIs to get
information about it (in C# code)?

I need to determine how much processor time a specific managed thread took
between two points in the code (and there are many mangaed threads running
sumtaneously in the application).


"Willy Denoyette [MVP]" <willy.denoyette@pandora.be> wrote in message
news:#LqEZEOjCHA.348@tkmsftngp10...
> Managed threads and OS threads map 1:1 in the current version of the CLR,
so it should be easy to monitor them using perf counter
> objects.
>
> Willy.
>
> "Neil Colvin" <ncolvinonline@nivloc.biz> wrote in message
news:Ob3ah$NjCHA.1784@tkmsftngp09...
> > I have not found any way to use perfmon to get the info...it also
monitor
> > ProcessThreads, not managed Threads.
> >
> > This is a big development problem.. It is virtually impossible to do
real
> > peformance tuning of managed threads without some way to do this!
> >
> > "Mike Clay (MS)" <mclay@online.microsoft.com> wrote in message
> > news:MrslsL2iCHA.2488@cpmsftngxa06...
> > > Hi Neil,
> > >
> > > I've been researching this. Other than perfmon, I don't know of any
way
> > to
> > > get that info through code. I'lll keep looking, but I have not found
a
> > way
> > > to grab that info from the Thread class.
> > >
> > > Mike Clay, MCSD
> > > Beta Technical Support
> > >
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > © 2002 Microsoft Corporation. All rights reserved.
> > >
> >
> >
>
>