I am creating a simple script that outputs the current user logged in, CPU usage for the current system and the available memory?
I have managed to get the current user/
typeperf "\processor(_Total)\% Processor Time" -SC 1 -y
or
C:\>logman create counter CPU_Usage3 -c "\Processor(_Total)\% Processor Time" -f csv -o %temp%\cpu.csv
The command completed successfully.
C:\>logman start CPU_Usage3
The command completed successfully.
C:\>logman stop CPU_Usage3
The command completed successfully.
C:\>type %temp%\cpu*.csv
The system cannot find the file specified.
Typeperf is not available for WindowsXP home ,but logman requires admin privileges and creates a temp file. TYPEPERF . LOGMAN . For the memory check these counters: http://ss64.com/nt/syntax-performance-counters.html