Batch file to output performance data from Task Manager

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
Simply put, there are metrics presented in the Performance tab of the Windows XP Task Manager that I would like to record. Specifically, I need Total Physical Memory, Total Commit Charge, and Peak Commit Charge.

A log is not required, since I just require the 3 numbers as a snapshot in time, and not a whole history. I can use the MEM command to output the Total Physical Memory, but the other 2 variables are eluding me.

Any ideas?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Task Manager, and Performance Monitor, get their information from the WMI. Actually, that may not be correct. PM definitely does. TM may go a layer down. But in any case the WMI objects are easily scriptable in VB, and shell script. So you can write a simple script that will open up the correct objects and simply poll them and log them out every so often. Here is a link to an article on scripting the WMI objects.