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.

Physical Memory on remote machine.

Keywords: 	 Physical Memory on remote local machine.


How can you get the 'Total Physical Memory' from a Remote machine? I tried using the process extender to get us memory usage on a remote machine, but the only counter I see regarding memory is total *available* bytes......


I didn't find any specific 'performance counter strings' that can specify total physical memory. The closest thing I found was.....

You can approximate the physical memory on a remote machine by querying the following performance counters and summing the total of the 3 following counters:

\\remote\Memory\Available Bytes
\\remote\Memory\Cache Bytes
\\remote\Process\Working Set\ _Total 

Here is some sample code..

NOTE: this code can be used to get physical memory on Local *or* Remote machines....

if WinVersion(4) == 4; NT
   availablebytes = tGetData("\\Machine\Memory\Available bytes",0)/1024
   cachebytes = tGetData("\\Machine\Memory\Cache bytes",0)/1024
   totalworkset = tGetData("\\Machine\Process(_Total)\Working Set",0)/1024
   physicalmemMB = (availablebytes + cachebytes + totalworkset)/1024
   str = strcat("Available bytes     : ",availablebytes,@CRLF,"Cache bytes         : ",cachebytes,@CRLF,"Working set total  : ", totalworkset,@CRLF,"_______________________",@CRLF,"Physical Memory (MB): ",physicalmemMB)
   Message("Approximation of Physical Memory",str)
  Message("tGetData", "Is designed to run on NT")

Article ID:   W14548
Filename:   Physical Memory on Remote Machine.txt
File Created: 2017:07:28:12:58:39
Last Updated: 2013:04:01:08:10:55