Source
if (1 == invalid_user) /* handle 0 for non-existent user after all parameters have been parsed and validated */
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
static kvm_t *kd = NULL;
typedef struct
{
int pid;
int ppid;
char *name;
char *cmdline;
char *state;
zbx_uint64_t processes;
char *user;
char *group;
zbx_uint64_t uid;
zbx_uint64_t gid;
zbx_uint64_t cputime_user;
zbx_uint64_t cputime_system;
zbx_uint64_t ctx_switches;
zbx_uint64_t page_faults;
zbx_uint64_t io_read_op;
zbx_uint64_t io_write_op;
zbx_uint64_t vsize;
zbx_uint64_t rss;
zbx_uint64_t size;
zbx_uint64_t tsize;
zbx_uint64_t dsize;
zbx_uint64_t ssize;
zbx_uint64_t swap;
}
proc_data_t;
ZBX_PTR_VECTOR_DECL(proc_data_ptr, proc_data_t *)
ZBX_PTR_VECTOR_IMPL(proc_data_ptr, proc_data_t *)
/******************************************************************************
* *
* Purpose: frees process data structure *