Go Back   Technology Questions > Hardware Questions > Electronics > Smartphones

Smartphones This is the Microsoft General Public Smartphones Newsgroup.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 03-20-2008, 06:20 PM
Vipul Pathak
Tablet PC Guest
 
Posts: n/a
Detecting CPU usage of a Process ...

Hello Everyone,

I am designing a Task Manager for Windows Mobile Smartphone. I am using
CreateToolhelp32Snapshot() to gether process information. I have an
additional need to including CPU usage and Battery consumption by every
process.

Does any one has an Idea of how to detect CPU Usage and Battery Usage by a
given process on the Device ?

Thanks in Advance,

*(Vipul)() ;


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 03-20-2008, 06:20 PM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
  #2 (permalink)  
Old 03-21-2008, 07:10 AM
Paul G. Tobey [eMVP]
Tablet PC Guest
 
Posts: n/a
Re: Detecting CPU usage of a Process ...

There's no way to get "battery usage" for a process. That doesn't make
sense.

As for CPU, look at GetThreadTimes() and add up the times for all threads in
each process.

Paul T.

"Vipul Pathak" <vpathak_NoSpam@boxtoneRemoveThis.com> wrote in message
news:uutDwjviIHA.5504@TK2MSFTNGP05.phx.gbl...
> Hello Everyone,
>
> I am designing a Task Manager for Windows Mobile Smartphone. I am using
> CreateToolhelp32Snapshot() to gether process information. I have an
> additional need to including CPU usage and Battery consumption by every
> process.
>
> Does any one has an Idea of how to detect CPU Usage and Battery Usage by a
> given process on the Device ?
>
> Thanks in Advance,
>
> *(Vipul)() ;
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 03-21-2008, 07:30 AM
Vipul Pathak
Tablet PC Guest
 
Posts: n/a
Re: Detecting CPU usage of a Process ...

Thanks Paul ...

In order to get the CPU usage in percentage, I will be using the following
Algorithm:

T1, T2, Tn are threads of their respective processes P1, P2, Pn etc.

=========================================
Time_P1 = (GetThreadTimes(T1)+GetThreadTimes(T2)+ ..... GetThreadTimes(Tn))
;
Time_P2 = (GetThreadTimes(T1)+GetThreadTimes(T2)+ ..... GetThreadTimes(Tn))
;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
System is not detecting Mic Shilps Vista Hardware 1 02-26-2008 01:51 AM
IE7 process memory usage Perry Diels Internet Explorer 7 06-29-2007 02:41 AM
Generic Host Process for Win32 Services -- 100% CPU usage wal Windows XP 5 05-22-2007 09:30 PM
SYSTEM Process at 100% cpu usage ebayer10@earthlink.net Windows XP 6 01-04-2007 04:04 AM
detecting usb devices yawnmoth Windows XP 4 01-04-2007 02:40 AM


All times are GMT -8. The time now is 05:42 PM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0