Source
sz_cpu_phys_util = ZBX_SIZE_T_ALIGN8(sizeof(ZBX_CPU_UTIL_PCT_AIX)) * MAX_COLLECTOR_HISTORY * (cpu_count + 1);
/*
** Zabbix
** 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 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.
**/
/* defined in sysinfo lib */
extern int get_cpu_num_win32(void);
ZBX_COLLECTOR_DATA *collector = NULL;
extern ZBX_THREAD_LOCAL unsigned char process_type;
extern ZBX_THREAD_LOCAL int server_num, process_num;
static int shm_id;
int my_diskstat_shmid = ZBX_NONEXISTENT_SHMID;
ZBX_DISKDEVICES_DATA *diskdevices = NULL;
zbx_mutex_t diskstats_lock = ZBX_MUTEX_NULL;
/******************************************************************************
* *
* Purpose: returns the number of processors which are currently online *
* (i.e., available). *
* *
* Return value: number of CPUs *
* *
******************************************************************************/
static int zbx_get_cpu_num(void)
{
return get_cpu_num_win32();
struct pst_dynamic psd;
if (-1 == pstat_getdynamic(&psd, sizeof(struct pst_dynamic), 1, 0))
goto return_one;