WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: mcvpjd3 on January 28, 2015, 02:15:38 AM

Title: Simple script to get Private Working Set
Post by: mcvpjd3 on January 28, 2015, 02:15:38 AM
I'm just trying to do a simple script to monitor some process and the amount of memory they consume. I've had a look at tGetProcInfo and this will show me the Working Set size, but I'm actually looking to try get the Private Working Set size, is there any way to do this in Winbatch?

Thanks
Title: Re: Simple script to get Private Working Set
Post by: td on January 28, 2015, 08:31:11 AM
Many ways including WMI and dotNet but since you mentioned the process extender:

Code (winbatch) Select
; Private working set of the browser I am currently using to enter this reply.
counterstring="\Process(Firefox)\Working Set - Private"
intdat=tGetData(counterstring,0)
fltdat=tGetData(counterstring,1)
Message("tGetData for %counterstring%",StrCat("Float Value: ",fltdat,@CRLF,"Int Value: ",intdat))