Source
8
8
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
9
** See the GNU Affero General Public License for more details.
10
10
**
11
11
** You should have received a copy of the GNU Affero General Public License along with this program.
12
12
** If not, see <https://www.gnu.org/licenses/>.
13
13
**/
14
14
15
15
#ifndef ZABBIX_ZBXSELF_H
16
16
#define ZABBIX_ZBXSELF_H
17
17
18
-
#define ZBX_PROCESS_STATE_IDLE 0
19
-
#define ZBX_PROCESS_STATE_BUSY 1
20
-
#define ZBX_PROCESS_STATE_COUNT 2 /* number of process states */
21
-
22
18
#define ZBX_SELFMON_AGGR_FUNC_ONE 0
23
19
#define ZBX_SELFMON_AGGR_FUNC_AVG 1
24
20
#define ZBX_SELFMON_AGGR_FUNC_MAX 2
25
21
#define ZBX_SELFMON_AGGR_FUNC_MIN 3
26
22
27
23
#define ZBX_SELFMON_DELAY 1
28
24
29
25
#ifndef _WINDOWS
30
-
#include "zbxcommon.h"
31
26
#include "zbxthreads.h"
32
27
#include "zbxstats.h"
33
28
34
29
ZBX_THREAD_ENTRY(zbx_selfmon_thread, args);
35
30
36
31
int zbx_init_selfmon_collector(zbx_get_config_forks_f get_config_forks, char **error);
37
32
void zbx_free_selfmon_collector(void);
38
33
void zbx_update_selfmon_counter(const zbx_thread_info_t *info, unsigned char state);
39
34
void zbx_get_selfmon_stats(unsigned char proc_type, unsigned char aggr_func, int proc_num, unsigned char state,
40
35
double *value);