Source
xxxxxxxxxx
for (attr_id = 0; NULL != attrList[attr_id] && 0 != strcmp(attrList[attr_id], "vmsize"); attr_id++)
/*
** 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/>.
**/
/* ConvertSidToStringSid */
typedef struct
{
unsigned int pid;
unsigned int ppid;
unsigned int tid;
char *name;
zbx_uint64_t processes;
zbx_uint64_t threads;
zbx_int64_t handles;
char *user;
char *sid;
double cputime_user;
double cputime_system;
double page_faults;
double io_read_b;
double io_write_b;
double io_other_b;
double io_read_op;
double io_write_op;
double io_other_op;
double vmsize;
double wkset;
}
proc_data_t;
ZBX_PTR_VECTOR_DECL(proc_data_ptr, proc_data_t *)
ZBX_PTR_VECTOR_IMPL(proc_data_ptr, proc_data_t *)
/* function 'zbx_get_process_username' require 'userName' with size 'MAX_NAME' */
static int zbx_get_process_username(HANDLE hProcess, char *userName, char *sid)
{
HANDLE tok;