diff options
author | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2019-09-25 15:01:05 +0300 |
---|---|---|
committer | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2019-09-25 15:01:05 +0300 |
commit | f42c6963931ffe89d1a552684a9ca6b716ceb62a (patch) | |
tree | 1407bbdc8e772567928072b52c689364754e2aae /include | |
parent | 4462daaf824cef7c88cd8afbb526b9b715d1c379 (diff) | |
parent | 586bc348b0c0c0602489ec4bd5e465edf6cb8397 (diff) |
.......... [ZBXNEXT-2946] updated to the latest trunk
Diffstat (limited to 'include')
-rw-r--r-- | include/perfmon.h | 14 | ||||
-rw-r--r-- | include/sysinfo.h | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/perfmon.h b/include/perfmon.h index 1221ff459d7..38b15ff691f 100644 --- a/include/perfmon.h +++ b/include/perfmon.h @@ -41,6 +41,13 @@ typedef enum } zbx_perf_counter_status_t; +typedef enum +{ + PERF_COUNTER_LANG_DEFAULT = 0, + PERF_COUNTER_LANG_EN +} +zbx_perf_counter_lang_t; + typedef struct perf_counter_id { struct perf_counter_id *next; @@ -55,6 +62,7 @@ typedef struct perf_counter_data char *name; char *counterpath; int interval; + zbx_perf_counter_lang_t lang; zbx_perf_counter_status_t status; HCOUNTER handle; PDH_RAW_COUNTER rawValues[2]; /* rate counters need two raw values */ @@ -69,12 +77,12 @@ zbx_perf_counter_data_t; PDH_STATUS zbx_PdhMakeCounterPath(const char *function, PDH_COUNTER_PATH_ELEMENTS *cpe, char *counterpath); PDH_STATUS zbx_PdhOpenQuery(const char *function, PDH_HQUERY query); PDH_STATUS zbx_PdhAddCounter(const char *function, zbx_perf_counter_data_t *counter, PDH_HQUERY query, - const char *counterpath, PDH_HCOUNTER *handle); + const char *counterpath, zbx_perf_counter_lang_t lang, PDH_HCOUNTER *handle); PDH_STATUS zbx_PdhCollectQueryData(const char *function, const char *counterpath, PDH_HQUERY query); PDH_STATUS zbx_PdhGetRawCounterValue(const char *function, const char *counterpath, PDH_HCOUNTER handle, PPDH_RAW_COUNTER value); -PDH_STATUS calculate_counter_value(const char *function, const char *counterpath, double *value); +PDH_STATUS calculate_counter_value(const char *function, const char *counterpath, zbx_perf_counter_lang_t lang, double *value); wchar_t *get_counter_name(DWORD pdhIndex); -int check_counter_path(char *counterPath); +int check_counter_path(char *counterPath, int convert_from_numeric); #endif /* ZABBIX_PERFMON_H */ diff --git a/include/sysinfo.h b/include/sysinfo.h index 355e9935170..16d236662de 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -272,6 +272,7 @@ int VM_MEMORY_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result); #ifdef _WINDOWS int USER_PERF_COUNTER(AGENT_REQUEST *request, AGENT_RESULT *result); int PERF_COUNTER(AGENT_REQUEST *request, AGENT_RESULT *result); +int PERF_COUNTER_EN(AGENT_REQUEST *request, AGENT_RESULT *result); int SERVICE_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result); int SERVICE_INFO(AGENT_REQUEST *request, AGENT_RESULT *result); int SERVICE_STATE(AGENT_REQUEST *request, AGENT_RESULT *result); |