DECLARE_STAT(&gReleased, NULL, FALSE, NULL, GuestStatID_MemNeededReservation, GuestUnitsKiB, GuestTypeUint64),
- DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "MemAvailable", GuestStatID_Linux_MemAvailable, GuestUnitsKiB, GuestTypeUint64),
+ DECLARE_STAT(&gReleased, MEMINFO_FILE, FALSE, "MemAvailable", GuestStatID_Linux_MemAvailable, GuestUnitsKiB, GuestTypeUint64),
+ DECLARE_STAT(&gReleased, MEMINFO_FILE, FALSE, "SReclaimable", GuestStatID_Linux_MemSlabReclaim, GuestUnitsKiB, GuestTypeUint64),
+ DECLARE_STAT(&gReleased, MEMINFO_FILE, FALSE, "Buffers", GuestStatID_Linux_MemBuffers, GuestUnitsKiB, GuestTypeUint64),
+ DECLARE_STAT(&gReleased, MEMINFO_FILE, FALSE, "Cached", GuestStatID_Linux_MemCached, GuestUnitsKiB, GuestTypeUint64),
+ DECLARE_STAT(&gReleased, MEMINFO_FILE, FALSE, "MemTotal", GuestStatID_Linux_MemTotal, GuestUnitsKiB, GuestTypeUint64),
+
DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "Inactive(file)", GuestStatID_Linux_MemInactiveFile, GuestUnitsKiB, GuestTypeUint64),
- DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "SReclaimable", GuestStatID_Linux_MemSlabReclaim, GuestUnitsKiB, GuestTypeUint64),
- DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "Buffers", GuestStatID_Linux_MemBuffers, GuestUnitsKiB, GuestTypeUint64),
- DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "Cached", GuestStatID_Linux_MemCached, GuestUnitsKiB, GuestTypeUint64),
DECLARE_STAT(&gInternal, ZONEINFO_FILE, TRUE, "low", GuestStatID_Linux_LowWaterMark, GuestUnitsPages, GuestTypeUint64),
- DECLARE_STAT(&gInternal, MEMINFO_FILE, FALSE, "MemTotal", GuestStatID_Linux_MemTotal, GuestUnitsKiB, GuestTypeUint64),
#if PUBLISH_EXPERIMENTAL_STATS
DECLARE_STAT(&gExperimental, MEMINFO_FILE, FALSE, "SwapTotal", GuestStatID_SwapFilesCurrent, GuestUnitsKiB, GuestTypeUint64),
if ((int64)memAvailable < 0) {
memAvailable = 0;
}
+
+ GuestInfoStoreStatByID(GuestStatID_Linux_MemAvailable,
+ collector,
+ memAvailable);
}
}