From: Oliver Kurth Date: Fri, 6 Jul 2018 21:31:55 +0000 (-0700) Subject: Remove the new guest metrics feature switch, permanently enabling the X-Git-Tag: stable-10.3.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6172812c021469704c51817693c6c8f6bf226509;p=thirdparty%2Fopen-vm-tools.git Remove the new guest metrics feature switch, permanently enabling the collection of new guest metrics for vROps.. --- diff --git a/open-vm-tools/lib/include/guestStats.h b/open-vm-tools/lib/include/guestStats.h index c59b97c88..4f5fa6d88 100644 --- a/open-vm-tools/lib/include/guestStats.h +++ b/open-vm-tools/lib/include/guestStats.h @@ -34,6 +34,7 @@ #include "vm_basic_types.h" #define PUBLISH_EXPERIMENTAL_STATS 0 +#define ADD_NEW_STATS 0 /* * Version 1: Legacy data diff --git a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c index e6c551e42..b1323b7db 100644 --- a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c +++ b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c @@ -58,7 +58,9 @@ static Bool gInternal = FALSE; #if PUBLISH_EXPERIMENTAL_STATS static Bool gExperimental = PUBLISH_EXPERIMENTAL_STATS; #endif +#if ADD_NEW_STATS static Bool gUnstable = FALSE; +#endif #define DECLARE_STAT(publish, file, isRegExp, locatorString, reportID, units, dataType) \ { file, publish, isRegExp, locatorString, reportID, units, dataType } @@ -128,9 +130,9 @@ GuestInfoQuery guestInfoQuerySpecTable[] = { DECLARE_STAT(&gExperimental, STAT_FILE, FALSE, "processes", GuestStatID_ProcessCreationRate, GuestUnitsNumberPerSecond, GuestTypeDouble), #endif - DECLARE_STAT(&gUnstable, STAT_FILE, FALSE, "procs_running", GuestStatID_Linux_CpuRunQueue, GuestUnitsNumber, GuestTypeUint64), - DECLARE_STAT(&gUnstable, NULL, FALSE, NULL, GuestStatID_Linux_DiskRequestQueue, GuestUnitsNumber, GuestTypeUint64), - DECLARE_STAT(&gUnstable, NULL, FALSE, NULL, GuestStatID_Linux_DiskRequestQueueAvg, GuestUnitsNumber, GuestTypeDouble), + DECLARE_STAT(&gReleased, STAT_FILE, FALSE, "procs_running", GuestStatID_Linux_CpuRunQueue, GuestUnitsNumber, GuestTypeUint64), + DECLARE_STAT(&gReleased, NULL, FALSE, NULL, GuestStatID_Linux_DiskRequestQueue, GuestUnitsNumber, GuestTypeUint64), + DECLARE_STAT(&gReleased, NULL, FALSE, NULL, GuestStatID_Linux_DiskRequestQueueAvg, GuestUnitsNumber, GuestTypeDouble), }; #define N_QUERIES (sizeof guestInfoQuerySpecTable / sizeof(GuestInfoQuery)) @@ -869,10 +871,8 @@ GuestInfoCollect(GuestInfoCollector *collector) // IN/OUT: } GuestInfoDeriveMemNeeded(collector); - if (gUnstable) { - GuestInfoDecreaseCpuRunQueueByOne(collector); - GuestInfoProcDiskStatsData(collector); - } + GuestInfoDecreaseCpuRunQueueByOne(collector); + GuestInfoProcDiskStatsData(collector); } @@ -1528,10 +1528,12 @@ GuestInfo_StatProviderPoll(gpointer data) g_debug("Entered guest info stats gather.\n"); +#if ADD_NEW_STATS gUnstable = g_key_file_get_boolean(ctx->config, CONFGROUPNAME_GUESTINFO, "enable-unstable-stats", NULL); +#endif /* Send the vmstats to the VMX. */ DynBuf_Init(&stats);