int KERNEL_MAXPROC(const char *cmd, int argc,const char **argv,SYSINFO_RESULT *result) { int ret = UGERR; uint64_t value; if (UGOK == read_uint64_from_procfs("/proc/sys/kernel/pid_max", &value)) { SET_UI64_RESULT(result, value); ret = UGOK; } return ret; }
int KERNEL_MAXPROC(AGENT_REQUEST *request, AGENT_RESULT *result) { zbx_uint64_t value; if (SYSINFO_RET_FAIL == read_uint64_from_procfs("/proc/sys/kernel/pid_max", &value)) { SET_MSG_RESULT(result, zbx_strdup(NULL, "Cannot obtain data from /proc/sys/kernel/pid_max.")); return SYSINFO_RET_FAIL; } SET_UI64_RESULT(result, value); return SYSINFO_RET_OK; }
int KERNEL_MAXPROC(AGENT_REQUEST *request, AGENT_RESULT *result) { int ret = SYSINFO_RET_FAIL; zbx_uint64_t value; if (SYSINFO_RET_OK == read_uint64_from_procfs("/proc/sys/kernel/pid_max", &value)) { SET_UI64_RESULT(result, value); ret = SYSINFO_RET_OK; } return ret; }
int KERNEL_MAXPROC(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { int ret = SYSINFO_RET_FAIL; zbx_uint64_t value; if (SYSINFO_RET_OK == read_uint64_from_procfs("/proc/sys/kernel/pid_max", &value)) { SET_UI64_RESULT(result, value); ret = SYSINFO_RET_OK; } return ret; }
int KERNEL_MAXFILES(AGENT_REQUEST *request, AGENT_RESULT *result) { zbx_uint64_t value; ZBX_UNUSED(request); if (SYSINFO_RET_FAIL == read_uint64_from_procfs("/proc/sys/fs/file-max", &value)) { SET_MSG_RESULT(result, zbx_strdup(NULL, "Cannot obtain data from /proc/sys/fs/file-max.")); return SYSINFO_RET_FAIL; } SET_UI64_RESULT(result, value); return SYSINFO_RET_OK; }