summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxsysinfo/openbsd
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-12 15:24:16 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-12 15:24:16 +0000
commit883163bc42892ffe0885e94b701ef9da4da3cf70 (patch)
treed9b8592102201e0396de3807a223d5b87c72f1bd /src/libs/zbxsysinfo/openbsd
parente929cc4053168b46b81475715e98230eed01badc (diff)
downloadzabbix-883163bc42892ffe0885e94b701ef9da4da3cf70.tar.gz
zabbix-883163bc42892ffe0885e94b701ef9da4da3cf70.tar.xz
zabbix-883163bc42892ffe0885e94b701ef9da4da3cf70.zip
- fixed system.cpu.util[] (Eugene)
- improved configuration script (Eugene) - fixed floats values (Eugene) - developed agent result convertion (Eugene) - more fixes - TODO: WinXX agent \!\!\! git-svn-id: svn://svn.zabbix.com/trunk@3886 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxsysinfo/openbsd')
-rw-r--r--src/libs/zbxsysinfo/openbsd/Makefile.am6
-rw-r--r--src/libs/zbxsysinfo/openbsd/cpu.c5
-rw-r--r--src/libs/zbxsysinfo/openbsd/openbsd.c49
3 files changed, 18 insertions, 42 deletions
diff --git a/src/libs/zbxsysinfo/openbsd/Makefile.am b/src/libs/zbxsysinfo/openbsd/Makefile.am
index 06659da1..92dc918f 100644
--- a/src/libs/zbxsysinfo/openbsd/Makefile.am
+++ b/src/libs/zbxsysinfo/openbsd/Makefile.am
@@ -1,8 +1,10 @@
## Process this file with automake to produce Makefile.in
-noinst_LIBRARIES = libzbxsysinfo2.a
+noinst_LIBRARIES = libspecsysinfo.a
-libzbxsysinfo2_a_SOURCES = \
+libspecsysinfo_a_CPPFLAGS = -I@top_srcdir@/src/zabbix_agent/
+
+libspecsysinfo_a_SOURCES = \
cpu.c \
diskio.c \
diskspace.c \
diff --git a/src/libs/zbxsysinfo/openbsd/cpu.c b/src/libs/zbxsysinfo/openbsd/cpu.c
index c9d3e4b7..e7da71f3 100644
--- a/src/libs/zbxsysinfo/openbsd/cpu.c
+++ b/src/libs/zbxsysinfo/openbsd/cpu.c
@@ -22,11 +22,6 @@
#include "common.h"
#include "sysinfo.h"
-int OLD_CPU(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
-{
- return get_stat(cmd, flags, result);
-}
-
static int get_cpu_data(unsigned long long *idle,
unsigned long long *user,
unsigned long long *nice,
diff --git a/src/libs/zbxsysinfo/openbsd/openbsd.c b/src/libs/zbxsysinfo/openbsd/openbsd.c
index 35104abf..eb32f748 100644
--- a/src/libs/zbxsysinfo/openbsd/openbsd.c
+++ b/src/libs/zbxsysinfo/openbsd/openbsd.c
@@ -17,7 +17,6 @@
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
-#include "config.h"
#include "common.h"
#include "sysinfo.h"
@@ -25,42 +24,26 @@ ZBX_METRIC parameters_specific[]=
/* KEY FLAG FUNCTION ADD_PARAM TEST_PARAM */
{
- {"agent.ping", 0, AGENT_PING, 0, 0},
- {"agent.version", 0, AGENT_VERSION, 0, 0},
+ {"kernel.maxfiles", 0, KERNEL_MAXFILES, 0, 0},
+ {"kernel.maxproc", 0, KERNEL_MAXPROC, 0, 0},
- {"kernel.maxfiles", 0, KERNEL_MAXFILES, 0, 0},
- {"kernel.maxproc", 0, KERNEL_MAXPROC, 0, 0},
+ {"vfs.fs.size", CF_USEUPARAM, VFS_FS_SIZE, 0, "/"},
+ {"vfs.fs.inode", CF_USEUPARAM, VFS_FS_INODE, 0, "/,free"},
- {"vfs.file.exists", CF_USEUPARAM, VFS_FILE_EXISTS, 0, "/etc/passwd"},
- {"vfs.file.time", CF_USEUPARAM, VFS_FILE_TIME, 0, "/etc/passwd,modify"},
- {"vfs.file.size", CF_USEUPARAM, VFS_FILE_SIZE, 0, "/etc/passwd"},
- {"vfs.file.regexp", CF_USEUPARAM, VFS_FILE_REGEXP, 0, "/etc/passwd,root"},
- {"vfs.file.regmatch", CF_USEUPARAM, VFS_FILE_REGMATCH, 0, "/etc/passwd,root"},
- {"vfs.fs.size", CF_USEUPARAM, VFS_FS_SIZE, 0, "/,free"},
- {"vfs.fs.inode", CF_USEUPARAM, VFS_FS_INODE, 0, "/,free"},
+ {"vfs.dev.read", CF_USEUPARAM, VFS_DEV_READ, 0, "hda,bytes"},
+ {"vfs.dev.write", CF_USEUPARAM, VFS_DEV_WRITE, 0, "hda,operations"},
- {"vfs.dev.read", CF_USEUPARAM, VFS_DEV_READ, 0, "hda,bytes"},
- {"vfs.dev.write", CF_USEUPARAM, VFS_DEV_WRITE, 0, "hda,operations"},
+ {"net.tcp.listen", CF_USEUPARAM, NET_TCP_LISTEN, 0, "80"},
- {"vfs.file.cksum", CF_USEUPARAM, VFS_FILE_CKSUM, 0, "/etc/services"},
- {"vfs.file.md5sum", CF_USEUPARAM, VFS_FILE_MD5SUM, 0, "/etc/services"},
-
-
- {"net.tcp.dns", CF_USEUPARAM, CHECK_DNS, 0, "127.0.0.1,localhost"},
- {"net.tcp.listen", CF_USEUPARAM, NET_TCP_LISTEN, 0, "80"},
- {"net.tcp.port", CF_USEUPARAM, CHECK_PORT, 0, ",80"},
- {"net.tcp.service", CF_USEUPARAM, CHECK_SERVICE, 0, "ssh,127.0.0.1,22"},
- {"net.tcp.service.perf",CF_USEUPARAM, CHECK_SERVICE_PERF, 0, "ssh,127.0.0.1,22"},
-
- {"net.if.in", CF_USEUPARAM, NET_IF_IN, 0, "lo,bytes"},
- {"net.if.out", CF_USEUPARAM, NET_IF_OUT, 0, "lo,bytes"},
- {"net.if.total", CF_USEUPARAM, NET_IF_TOTAL, 0, "lo,bytes"},
+ {"net.if.in", CF_USEUPARAM, NET_IF_IN, 0, "lo,bytes"},
+ {"net.if.out", CF_USEUPARAM, NET_IF_OUT, 0, "lo,bytes"},
+ {"net.if.total", CF_USEUPARAM, NET_IF_TOTAL, 0, "lo,bytes"},
{"net.if.collisions", CF_USEUPARAM, NET_IF_COLLISIONS, 0, "lo"},
- {"vm.memory.size", CF_USEUPARAM, VM_MEMORY_SIZE, 0, "free"},
+ {"vm.memory.size", CF_USEUPARAM, VM_MEMORY_SIZE, 0, "free"},
- {"proc.num", CF_USEUPARAM, PROC_NUM, 0, "inetd,,"},
- {"proc.mem", CF_USEUPARAM, PROC_MEMORY, 0, "inetd,,"},
+ {"proc.num", CF_USEUPARAM, PROC_NUM, 0, "inetd,,"},
+ {"proc.mem", CF_USEUPARAM, PROC_MEMORY, 0, "inetd,,"},
{"system.cpu.switches", 0, SYSTEM_CPU_SWITCHES, 0, 0},
{"system.cpu.intr", 0, SYSTEM_CPU_INTR, 0, 0},
@@ -71,11 +54,7 @@ ZBX_METRIC parameters_specific[]=
{"system.swap.in", CF_USEUPARAM, SYSTEM_SWAP_IN, 0, "all,pages"},
{"system.swap.out", CF_USEUPARAM, SYSTEM_SWAP_OUT, 0, "all,count"},
- {"system.hostname", 0, SYSTEM_HOSTNAME, 0, 0},
-
- {"system.uname", 0, SYSTEM_UNAME, 0, 0},
- {"system.uptime", 0, SYSTEM_UPTIME, 0, 0},
- {"system.users.num", 0, SYSTEM_UNUM, 0, 0},
+ {"system.uptime", 0, SYSTEM_UPTIME, 0, 0},
{0}
};