WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


Process ID

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to get CPU usage from a Task Manager Window

Keywords: 	  CPU usage Task Manager  Process Information Extender


How can I get CPU usage from a task manager window


Look in the Process Information Extender help file, at the function tBrowseCntrs. This function will launch perfmon.exe, and you can select which process you want to monitor.

For CPU Usage, select, "% Processor Time", and hit the OK button. Then in the following script, you'll see that tGetData returns the total CPU time, either as an integer value or as a floating point number.


counterstring=tBrowseCntrs (0,0,0,0,0)
Message("tBrowseCntrs returned full counter path",counterstring)
if WinVersion(4)==4; NT
   Message("tGetData for %counterstring%",strcat("Float Value:",fltdat,@CRLF,"Int Value: ",intdat))

Article ID:   W14547
Filename:   Get CPU Usage.txt
File Created: 2017:07:28:13:58:38
Last Updated: 2013:04:01:09:08:49