Source
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/* number of process states */
/* the process statistics */
typedef struct
{
double busy_max;
double busy_min;
double busy_avg;
double idle_max;
double idle_min;
double idle_avg;
int count;
}
zbx_process_info_t;
int get_process_type_forks(unsigned char proc_type);
int init_selfmon_collector(char **error);
void free_selfmon_collector(void);
void update_selfmon_counter(unsigned char state);
void collect_selfmon_stats(void);
void get_selfmon_stats(unsigned char proc_type, unsigned char aggr_func, int proc_num, unsigned char state,
double *value);
int zbx_get_all_process_stats(zbx_process_info_t *stats);
void zbx_sleep_loop(int sleeptime);
void zbx_sleep_forever(void);
void zbx_wakeup(void);
int zbx_sleep_get_remainder(void);
/* ZABBIX_ZBXSELF_H */