diff options
Diffstat (limited to 'src/libs/zbxsysinfo/linux/uptime.c')
-rw-r--r-- | src/libs/zbxsysinfo/linux/uptime.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/zbxsysinfo/linux/uptime.c b/src/libs/zbxsysinfo/linux/uptime.c index b7e94d3688e..4e8683081d5 100644 --- a/src/libs/zbxsysinfo/linux/uptime.c +++ b/src/libs/zbxsysinfo/linux/uptime.c @@ -19,13 +19,17 @@ #include "common.h" #include "sysinfo.h" +#include "log.h" int SYSTEM_UPTIME(AGENT_REQUEST *request, AGENT_RESULT *result) { struct sysinfo info; if (0 != sysinfo(&info)) + { + SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system information: %s", zbx_strerror(errno))); return SYSINFO_RET_FAIL; + } SET_UI64_RESULT(result, info.uptime); |