Source
zabbix_log(LOG_LEVEL_DEBUG, "End of %s() extended diskstat shared memory: old_max:%d new_max:%d old_size:"
/*
** Zabbix
** Copyright (C) 2001-2023 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;
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;
return (int)psd.psd_proc_cnt;