1 /* 2 ** Zabbix 3 ** Copyright (C) 2001-2021 Zabbix SIA 4 ** 5 ** This program is free software; you can redistribute it and/or modify 6 ** it under the terms of the GNU General Public License as published by 7 ** the Free Software Foundation; either version 2 of the License, or 8 ** (at your option) any later version. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ** GNU General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU General Public License 16 ** along with this program; if not, write to the Free Software 17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 **/ 19 20 #ifndef ZABBIX_PERFSTAT_H 21 #define ZABBIX_PERFSTAT_H 22 23 #ifndef _WINDOWS 24 # error "This module is only available for Windows OS" 25 #endif 26 27 #include "perfmon.h" 28 29 zbx_perf_counter_data_t *add_perf_counter(const char *name, const char *counterpath, int interval, 30 zbx_perf_counter_lang_t lang, char **error); 31 void remove_perf_counter(zbx_perf_counter_data_t *counter); 32 33 typedef enum 34 { 35 ZBX_SINGLE_THREADED, 36 ZBX_MULTI_THREADED 37 } 38 zbx_threadedness_t; 39 40 int init_perf_collector(zbx_threadedness_t threadedness, char **error); 41 void free_perf_collector(void); 42 void collect_perfstat(void); 43 44 int get_perf_counter_value_by_name(const char *name, double *value, char **error); 45 int get_perf_counter_value_by_path(const char *counterpath, int interval, zbx_perf_counter_lang_t lang, 46 double *value, char **error); 47 int get_perf_counter_value(zbx_perf_counter_data_t *counter, int interval, double *value, char **error); 48 int refresh_object_cache(void); 49 wchar_t *get_object_name_local(char *eng_name); 50 51 #endif 52