Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Tumilovics <andrejs.tumilovics@zabbix.com>2020-04-09 13:46:09 +0300
committerMichael Veksler <Mihails.Vekslers@zabbix.com>2020-04-15 08:40:05 +0300
commit64f1fcc41d8e3f7d5d266f5188b4472e57e5a3ec (patch)
tree394d8df68a8ecbcd641de3f9d945fcefe4c8d2a5 /include/perfmon.h
parentf86b4766b6da12229e8b79cd63235f04ab96a840 (diff)
...G...... [ZBX-17140] fixed builtin counter index rewrite on localized Windows systems
(cherry picked from commit f334b7edba021396a4b0aeaae1c63e376db16fbc)
Diffstat (limited to 'include/perfmon.h')
-rw-r--r--include/perfmon.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/perfmon.h b/include/perfmon.h
index f1795562250..767fdc724fd 100644
--- a/include/perfmon.h
+++ b/include/perfmon.h
@@ -27,13 +27,10 @@
/* this struct must be only modified along with mapping builtin_counter_ref[] in perfmon.c */
typedef enum
{
- PCI_SYSTEM = 0,
- PCI_PROCESSOR,
- PCI_PROCESSOR_INFORMATION,
- PCI_PROCESSOR_TIME,
- PCI_PROCESSOR_QUEUE_LENGTH,
+ PCI_PROCESSOR_QUEUE_LENGTH = 0,
PCI_SYSTEM_UP_TIME,
- PCI_TERMINAL_SERVICES,
+ PCI_PROCESSOR_TIME,
+ PCI_INFORMATION_PROCESSOR_TIME,
PCI_TOTAL_SESSIONS,
PCI_MAX_INDEX = PCI_TOTAL_SESSIONS
}
@@ -92,6 +89,10 @@ PDH_STATUS calculate_counter_value(const char *function, const char *counterpath
wchar_t *get_counter_name(DWORD pdhIndex);
int check_counter_path(char *counterPath, int convert_from_numeric);
int init_builtin_counter_indexes(void);
+DWORD get_builtin_object_index(zbx_builtin_counter_ref_t ref);
DWORD get_builtin_counter_index(zbx_builtin_counter_ref_t ref);
+#define get_builtin_object_name(ctr) get_counter_name(get_builtin_object_index(ctr))
+#define get_builtin_counter_name(ctr) get_counter_name(get_builtin_counter_index(ctr))
+
#endif /* ZABBIX_PERFMON_H */