Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/zbxsysinfo/common/system.c')
-rw-r--r--src/libs/zbxsysinfo/common/system.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libs/zbxsysinfo/common/system.c b/src/libs/zbxsysinfo/common/system.c
index 8848d736efd..40dc805201a 100644
--- a/src/libs/zbxsysinfo/common/system.c
+++ b/src/libs/zbxsysinfo/common/system.c
@@ -17,14 +17,15 @@
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
-#include "system.h"
+#include "../sysinfo.h"
#include "zbxsysinfo_common.h"
+#include "system.h"
#include "zbxtime.h"
#if defined(_WINDOWS) || defined(__MINGW32__)
# include "zbxsysinfo.h"
-# include "perfmon.h"
+# include "zbxwin32.h"
# pragma comment(lib, "user32.lib")
#endif
@@ -33,7 +34,7 @@
* Comments: Thread-safe *
* *
******************************************************************************/
-int SYSTEM_LOCALTIME(AGENT_REQUEST *request, AGENT_RESULT *result)
+int system_localtime(AGENT_REQUEST *request, AGENT_RESULT *result)
{
char *type, buf[32];
long milliseconds;
@@ -72,7 +73,7 @@ int SYSTEM_LOCALTIME(AGENT_REQUEST *request, AGENT_RESULT *result)
return SYSINFO_RET_OK;
}
-int SYSTEM_USERS_NUM(AGENT_REQUEST *request, AGENT_RESULT *result)
+int system_users_num(AGENT_REQUEST *request, AGENT_RESULT *result)
{
#if defined(_WINDOWS) || defined(__MINGW32__)
char counter_path[64];
@@ -82,14 +83,14 @@ int SYSTEM_USERS_NUM(AGENT_REQUEST *request, AGENT_RESULT *result)
ZBX_UNUSED(request);
zbx_snprintf(counter_path, sizeof(counter_path), "\\%u\\%u",
- (unsigned int)get_builtin_object_index(PCI_TOTAL_SESSIONS),
- (unsigned int)get_builtin_counter_index(PCI_TOTAL_SESSIONS));
+ (unsigned int)zbx_get_builtin_object_index(PCI_TOTAL_SESSIONS),
+ (unsigned int)zbx_get_builtin_counter_index(PCI_TOTAL_SESSIONS));
request_tmp.nparam = 1;
request_tmp.params = zbx_malloc(NULL, request_tmp.nparam * sizeof(char *));
request_tmp.params[0] = counter_path;
- ret = PERF_COUNTER(&request_tmp, result);
+ ret = perf_counter(&request_tmp, result);
zbx_free(request_tmp.params);
@@ -97,6 +98,6 @@ int SYSTEM_USERS_NUM(AGENT_REQUEST *request, AGENT_RESULT *result)
#else
ZBX_UNUSED(request);
- return EXECUTE_INT("who | wc -l", result);
+ return execute_int("who | wc -l", result);
#endif
}