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..
Here's how: Press Ctrl + Shift + Esc to launch Task Manager. Or, right-click the Taskbar and select Task Manager. Select the Performance tab to see current RAM usage displayed in the Memory box, and total RAM capacity listed under Physical Memory.
vmstat Command to Report Virtual Memory Statistics. The vmstat command is a useful tool that reports virtual memory statistics. vmstat provides general information about processes, memory, paging, block IO, traps, and CPU activity.
Press the Windows key , type Properties, and then press Enter . In the System Properties window, the Installed memory (RAM) entry displays the total amount of RAM installed in the computer. For example, in the picture below, there is 4 GB of memory installed in the computer.
Right-click on Start menu button and then click on Task Manager . Click on Performance tab and then on Memory option. The Memory option shows details such as Total memory, used memory and available memory. This option also shows two graphs related to the Memory in the server.
Use the following command:
wmic ComputerSystem get TotalPhysicalMemory
Example output:
TotalPhysicalMemory
4275273728
Total Physical Memory
wmic ComputerSystem get TotalPhysicalMemory
Available Physical Memory
wmic OS get FreePhysicalMemory
Virtual Memory Max Size
wmic OS get TotalVirtualMemorySize
Virtual Memory Available
wmic OS get FreeVirtualMemory
You can combine them as follows into one command:
wmic ComputerSystem get TotalPhysicalMemory && wmic OS get FreePhysicalMemory,TotalVirtualMemorySize,FreeVirtualMemory
Source SuperUser answer What's the equivalent command of “wmic memlogical” in Windows 7? by 8088
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With