Analysis: Random Access Memory (RAM) Properties (Windows)

(imported topic written by MrFixit)

Two properties in this analysis returns with the error “Singular expression refers to non-unique object”. I think you need to tweak these for some hardware that will return multiple results.

Below are the changes that I made to address the error conditions.

Number of Free RAM Slots

q: if (exists wmi) then (((sum of (string values of selects “MemoryDevices from Win32_PhysicalMemoryArray where Use=‘3’” of wmi as integer)) - (number of (selects “DeviceLocator from Win32_PhysicalMemory where MemoryType!=‘11’” of wmi))) as string) else (“N/A”)

A: 9

Number of Used RAM slots / Total Number of RAM Slots

q: if (exists wmi) then ((number of (selects “DeviceLocator from Win32_PhysicalMemory where MemoryType!=‘11’” of wmi) as string) & " / " & ((sum of (string values of selects “MemoryDevices from Win32_PhysicalMemoryArray where Use=‘3’” of wmi as integer)) as string)) else (“N/A”)

A: 9 / 18

How to get Number of Free memory slot in Unix