summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-15 06:26:15 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-15 06:26:15 +0000
commit07a1df2dedbf44c0477b80b22fc1bfa55228600b (patch)
tree7ba21a1f295f247626d9036139d918f4c4365bcf
parent3f2917ce4aee15bcacfe55f6ef21fbd87dda2f32 (diff)
downloadzabbix-07a1df2dedbf44c0477b80b22fc1bfa55228600b.tar.gz
zabbix-07a1df2dedbf44c0477b80b22fc1bfa55228600b.tar.xz
zabbix-07a1df2dedbf44c0477b80b22fc1bfa55228600b.zip
- [DEV-168] added support of system.users.num under Windows
Windows binaries git-svn-id: svn://svn.zabbix.com/trunk@5704 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rwxr-xr-xbin/win32/zabbix_agentd.exebin200704 -> 200704 bytes
-rw-r--r--bin/win32/zabbix_get.exebin110592 -> 110592 bytes
-rw-r--r--bin/win32/zabbix_sender.exebin122880 -> 122880 bytes
-rwxr-xr-xbin/win64/zabbix_agentd.exebin285184 -> 285184 bytes
-rw-r--r--include/perfmon.h2
-rw-r--r--src/libs/zbxsysinfo/common/system.c13
6 files changed, 11 insertions, 4 deletions
diff --git a/bin/win32/zabbix_agentd.exe b/bin/win32/zabbix_agentd.exe
index 21685803..6781c814 100755
--- a/bin/win32/zabbix_agentd.exe
+++ b/bin/win32/zabbix_agentd.exe
Binary files differ
diff --git a/bin/win32/zabbix_get.exe b/bin/win32/zabbix_get.exe
index 123ea711..f51bf1e8 100644
--- a/bin/win32/zabbix_get.exe
+++ b/bin/win32/zabbix_get.exe
Binary files differ
diff --git a/bin/win32/zabbix_sender.exe b/bin/win32/zabbix_sender.exe
index 67488fd9..72f441ec 100644
--- a/bin/win32/zabbix_sender.exe
+++ b/bin/win32/zabbix_sender.exe
Binary files differ
diff --git a/bin/win64/zabbix_agentd.exe b/bin/win64/zabbix_agentd.exe
index eb8e1904..8567a4eb 100755
--- a/bin/win64/zabbix_agentd.exe
+++ b/bin/win64/zabbix_agentd.exe
Binary files differ
diff --git a/include/perfmon.h b/include/perfmon.h
index 8aa81dfa..70f6d7fe 100644
--- a/include/perfmon.h
+++ b/include/perfmon.h
@@ -33,6 +33,8 @@
#define PCI_PROCESSOR_TIME (6)
#define PCI_PROCESSOR_QUEUE_LENGTH (44)
#define PCI_SYSTEM_UP_TIME (674)
+#define PCI_TERMINAL_SERVICES (2176)
+#define PCI_TOTAL_SESSIONS (2178)
//
// Performance Countername structure
diff --git a/src/libs/zbxsysinfo/common/system.c b/src/libs/zbxsysinfo/common/system.c
index 8119ed83..c0f7f452 100644
--- a/src/libs/zbxsysinfo/common/system.c
+++ b/src/libs/zbxsysinfo/common/system.c
@@ -22,6 +22,10 @@
#include "system.h"
+#ifdef _WINDOWS
+ #include "perfmon.h"
+#endif /* _WINDOWS */
+
int SYSTEM_LOCALTIME(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
{
assert(result);
@@ -36,10 +40,11 @@ int SYSTEM_LOCALTIME(const char *cmd, const char *param, unsigned flags, AGENT_R
int SYSTEM_UNUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
{
#if defined(_WINDOWS)
-# ifdef TODO
-# error Realize function SYSTEM_UNUM!!!
-# endif /* todo */
- return SYSINFO_RET_FAIL;
+ char counter_path[64];
+
+ zbx_snprintf(counter_path, sizeof(counter_path), "\\%d\\%d", PCI_TERMINAL_SERVICES, PCI_TOTAL_SESSIONS);
+
+ return PERF_MONITOR(cmd, counter_path, flags, result);
#else
assert(result);