I inquired typeperf counters and instances, but couldn't find anything about the total memory. I only found
\Memory\Availble Bytes
\Memory\Cache Bytes
\Process\Private Bytes
\Process\Working Set
and adding any combination of them didn't match the total memory in task manager.
I also tried
systeminfo | findstr /C:"Total Physical Memory"
but this only worked in english mode(chcp 437). I am not an American and making program for various countries.. and above all, this takes too long time.
Please, anyone know good idea to get total memory in Windows with only cmd? Or please explain me the relation of memories so that I can calculate the total memory from typeperf queries..
Try this
Viktar's answer (
wmic memorychip get capacity
) gives you the capacity of each Dimm (which will work fine, if you have only one Dimm installed but gives you one value per Dimm if there is installed more than one). To get the size of total memory use:How can I get total physical memory
Use the following command:
Example output:
Source SuperUser answer What's the equivalent command of “wmic memlogical” in Windows 7? by 8088