cbonjovi
asked on
How to get process cpu time ?
Hi to all,
how can I do to get the cpu time of a process ?
(I mean the one I can see on TaskBar for that process)
Regards,
Christian
how can I do to get the cpu time of a process ?
(I mean the one I can see on TaskBar for that process)
Regards,
Christian
Which windows version?
Go to this page (http://www.fastlib.net) and download the ocx package, in the sample code who come with the package, you will find an example
ASKER
Win2K or XP
cbonjovi,
This should have what you are looking for. It retrieves all info about processes. I have used this under NT and it works fine.
I do not know about Xp of 2K but I think it should be fine.
http://www.allapi.net/apilist/example.php?example=Enumerate%20Processes
Cheers,
Ed.
This should have what you are looking for. It retrieves all info about processes. I have used this under NT and it works fine.
I do not know about Xp of 2K but I think it should be fine.
http://www.allapi.net/apilist/example.php?example=Enumerate%20Processes
Cheers,
Ed.
ASKER
No Elmo,
I can't find info about cpu resources used by a process.
Regards
I can't find info about cpu resources used by a process.
Regards
sorry about that - My Bad!
ASKER
I'd like to get the cpu resources used by a process with a simple api or something like this
Any idea?
Any idea?
http://www.allapi.net/apilist/apifunction.php?apifunction=GetProcessMemoryInfo
This API will allow you to get the Memory usage. Is that the kinda thing you are looking for?
Ed,
This API will allow you to get the Memory usage. Is that the kinda thing you are looking for?
Ed,
ASKER
No Sorry,
no memory info, but cpu usage for process
no memory info, but cpu usage for process
ASKER
Is there any API or RegistryKey to get the CPU resources used by a process (I mean the one I see on Task Manager)
Regards
Regards
cbonjovi,
There are a number of different API's for interacting with the Process list, there are probably others but these are the main ones:
1. GetProcessHeap
2. GetProcessMemoryInfo
3. GetProcessTimes
4. GetProcessWindowStation
5. GetCurrentProcess
The API you will need is GetProcessTimes:
http://www.allapi.net/apilist/apifunction.php?apifunction=GetProcessTimes
This Link will explain the Code API for you and the following link will give you an example:
http://www.allapi.net/apilist/example.php?example=ProcessTimes
I hope this helps because I am running out of Ideas,
Good luck,
Ed.
There are a number of different API's for interacting with the Process list, there are probably others but these are the main ones:
1. GetProcessHeap
2. GetProcessMemoryInfo
3. GetProcessTimes
4. GetProcessWindowStation
5. GetCurrentProcess
The API you will need is GetProcessTimes:
http://www.allapi.net/apilist/apifunction.php?apifunction=GetProcessTimes
This Link will explain the Code API for you and the following link will give you an example:
http://www.allapi.net/apilist/example.php?example=ProcessTimes
I hope this helps because I am running out of Ideas,
Good luck,
Ed.
cbonjovi,
Any Update here. Did it work for you?
Cheers,
Ed.
Any Update here. Did it work for you?
Cheers,
Ed.
ASKER
No Elmo,
sorry for the later.
The GetProcessTimes API returns the time and date a process started...
What I need is:
any API or RegistryKey to get the CPU resources used by a process (I mean the one I see on Task Manager)
Regards
Chris
sorry for the later.
The GetProcessTimes API returns the time and date a process started...
What I need is:
any API or RegistryKey to get the CPU resources used by a process (I mean the one I see on Task Manager)
Regards
Chris
CBonjovi,
Maybe I am still unclear as to what you are looking for.
Is it the Image Name of the Process (Well a list of them)?
I am running under NT so When I look at the Task manager I see three tabs
1. Applications (List of apps currently running)
2. Processes (List of Process currently running)
- Image Name
- PID
- CPU
- CPU Time
- Mem Usage
3. Performance (Shows CPU usage + mem usage)
Are you looking for any of these things?
Cheers,
Ed.
Maybe I am still unclear as to what you are looking for.
Is it the Image Name of the Process (Well a list of them)?
I am running under NT so When I look at the Task manager I see three tabs
1. Applications (List of apps currently running)
2. Processes (List of Process currently running)
- Image Name
- PID
- CPU
- CPU Time
- Mem Usage
3. Performance (Shows CPU usage + mem usage)
Are you looking for any of these things?
Cheers,
Ed.
ASKER
OK Elmo,
I'm looking for Processes->CPU info
Cheers,
Chris
I'm looking for Processes->CPU info
Cheers,
Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Chris,
Any luck? Could you give me an update?
Cheers,
Ed.
Any luck? Could you give me an update?
Cheers,
Ed.
Hi cbonjovi,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept Elmo_'s comment(s) as an answer.
cbonjovi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept Elmo_'s comment(s) as an answer.
cbonjovi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange