Source
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system information: %s", zbx_strerror(errno)));
/*
** 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 zbx_mntopt_t mntopts[] = {
{MNT_ASYNC, "asynchronous"},
{MNT_AUTOMOUNTED, "automounted"},
{MNT_DISCARD, "discard"},
{MNT_EXTATTR, "extattr"},
{MNT_IGNORE, "hidden"},
{MNT_LOG, "log"},
{MNT_NOATIME, "noatime"},
{MNT_NOCOREDUMP, "nocoredump"},
{MNT_NODEV, "nodev"},
{MNT_NODEVMTIME, "nodevmtime"},
{MNT_NOEXEC, "noexec"},
{MNT_NOSUID, "nosuid"},
{MNT_RDONLY, "read-only"},
{MNT_RELATIME, "relatime"},
{MNT_SOFTDEP, "soft dependencies"},
{MNT_SYMPERM, "symperm"},
{MNT_SYNCHRONOUS, "synchronous"},
{MNT_UNION, "union"},
{MNT_EXPORTED, "NFS exported"},
{MNT_EXNORESPORT, "non-reserved ports"},
{MNT_EXPUBLIC, "WebNFS exports"},
{MNT_LOCAL, "local"},
{MNT_QUOTA, "with quotas"},
{0, NULL},
};
static int get_fs_size_stat(const char *fs, zbx_uint64_t *total, zbx_uint64_t *free,
zbx_uint64_t *used, double *pfree, double *pused, char **error)
{