Updated to match the latest changes in AppInterface

This commit is contained in:
Pierre Pronchery 2009-10-31 18:33:42 +00:00
parent 6d18e80713
commit 7a17eb47bd
4 changed files with 132 additions and 0 deletions

21
data/Makefile Normal file
View File

@ -0,0 +1,21 @@
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
all:
clean:
distclean: clean
install: all
$(MKDIR) $(DESTDIR)$(PREFIX)/etc/AppInterface
$(INSTALL) -m 0644 Probe.interface $(DESTDIR)$(PREFIX)/etc/AppInterface/Probe.interface
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/etc/AppInterface/Probe.interface
.PHONY: all clean distclean install uninstall

52
data/Probe.h Normal file
View File

@ -0,0 +1,52 @@
/* $Id$ */
#ifndef Probe_H
# define Probe_H
# include <stdint.h>
# include <System.h>
/* types */
typedef Buffer * BUFFER;
typedef int32_t INT32;
typedef uint32_t UINT32;
typedef String const * STRING;
typedef BUFFER BUFFER_IN;
typedef INT32 INT32_IN;
typedef UINT32 UINT32_IN;
typedef STRING STRING_IN;
typedef Buffer * BUFFER_OUT;
typedef int32_t * INT32_OUT;
typedef uint32_t * UINT32_OUT;
typedef String ** STRING_OUT;
typedef Buffer * BUFFER_INOUT;
typedef int32_t * INT32_INOUT;
typedef uint32_t * UINT32_INOUT;
typedef String ** STRING_INOUT;
/* functions */
UINT32 Probe_uptime();
UINT32 Probe_load_1();
UINT32 Probe_load_5();
UINT32 Probe_load_15();
UINT32 Probe_ram_total();
UINT32 Probe_ram_free();
UINT32 Probe_ram_shared();
UINT32 Probe_ram_buffer();
UINT32 Probe_swap_total();
UINT32 Probe_swap_free();
UINT32 Probe_users();
UINT32 Probe_procs();
UINT32 Probe_ifrxbytes(STRING interface);
UINT32 Probe_iftxbytes(STRING interface);
UINT32 Probe_voltotal(STRING volume);
UINT32 Probe_volfree(STRING volume);
#endif /* !Probe_H */

55
data/Probe.interface Normal file
View File

@ -0,0 +1,55 @@
#$Id$
service=Probe
port=4243
[uptime]
ret=UINT32
[load_1]
ret=UINT32
[load_5]
ret=UINT32
[load_15]
ret=UINT32
[ram_total]
ret=UINT32
[ram_free]
ret=UINT32
[ram_shared]
ret=UINT32
[ram_buffer]
ret=UINT32
[swap_total]
ret=UINT32
[swap_free]
ret=UINT32
[users]
ret=UINT32
[procs]
ret=UINT32
[ifrxbytes]
ret=UINT32
arg1=STRING,interface
[iftxbytes]
ret=UINT32
arg1=STRING,interface
[voltotal]
ret=UINT32
arg1=STRING,volume
[volfree]
ret=UINT32
arg1=STRING,volume

4
data/project.conf Normal file
View File

@ -0,0 +1,4 @@
dist=Makefile,Probe.interface,Probe.h
[Probe.interface]
install=$(PREFIX)/etc/AppInterface