Physical Memory on remote machine.
Keywords: Physical Memory on remote local machine.
Question
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......Reply:
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\ _TotalHere is some sample code..
NOTE: this code can be used to get physical memory on Local *or* Remote machines....
AddExtender("wproc34I.dll") 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) else Message("tGetData", "Is designed to run on NT") endif exit
Article ID: W14548Filename: Physical Memory on Remote Machine.txt