Measure total server memory used by SQL Server:
SELECT cntr_value / 1024.0 AS TotalServerMemoryMB
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)';
For physical (if VM host is stealing) and buffer use:
SELECT CAST(physical_memory_in_bytes / (1024.0 * 1024.0 * 1024.0) AS DECIMAL(20, 2)) AS PhysicalMemoryGB,
CAST((bpool_committed * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS BufferPoolCommittedMemoryGB
FROM sys.dm_os_sys_info;
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato