From 74df1da603ef8cc5f7ea90d21c9b4c92a4ae3ddc Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 12 Jun 2011 21:27:28 +0200 Subject: [PATCH] more improvements for vzlogger --- misc/controller/vzlogger/config.log | 862 ++++++++++++++++++ misc/controller/vzlogger/debian/control | 2 +- misc/controller/vzlogger/debian/files | 1 + .../vzlogger/debian/vzlogger.debhelper.log | 45 + .../debian/vzlogger.postinst.debhelper | 10 + .../vzlogger/debian/vzlogger.postrm.debhelper | 5 + .../vzlogger/debian/vzlogger.prerm.debhelper | 9 + .../vzlogger/debian/vzlogger.substvars | 2 + .../vzlogger/debian/vzlogger/DEBIAN/conffiles | 2 + .../vzlogger/debian/vzlogger/DEBIAN/control | 17 + .../vzlogger/debian/vzlogger/DEBIAN/md5sums | 4 + .../vzlogger/debian/vzlogger/DEBIAN/postinst | 12 + .../vzlogger/debian/vzlogger/DEBIAN/postrm | 7 + .../vzlogger/debian/vzlogger/DEBIAN/prerm | 11 + .../debian/vzlogger/etc/init.d/vzlogger | 151 +++ .../debian/vzlogger/etc/vzlogger.conf | 11 + .../vzlogger/debian/vzlogger/usr/bin/vzlogger | Bin 0 -> 25480 bytes .../usr/share/doc/vzlogger/changelog.gz | Bin 0 -> 138 bytes .../vzlogger/usr/share/doc/vzlogger/copyright | 32 + .../vzlogger/usr/share/man/man1/vzlogger.1.gz | Bin 0 -> 1145 bytes misc/controller/vzlogger/src/api.c | 37 +- misc/controller/vzlogger/src/api.h | 2 +- misc/controller/vzlogger/src/local.c | 4 +- misc/controller/vzlogger/src/main.c | 77 +- misc/controller/vzlogger/src/main.h | 4 +- misc/controller/vzlogger/src/queue.c | 40 +- misc/controller/vzlogger/src/queue.h | 13 +- misc/controller/vzlogger/vzlogger.conf | 3 +- 28 files changed, 1303 insertions(+), 60 deletions(-) create mode 100644 misc/controller/vzlogger/config.log create mode 100644 misc/controller/vzlogger/debian/files create mode 100644 misc/controller/vzlogger/debian/vzlogger.debhelper.log create mode 100644 misc/controller/vzlogger/debian/vzlogger.postinst.debhelper create mode 100644 misc/controller/vzlogger/debian/vzlogger.postrm.debhelper create mode 100644 misc/controller/vzlogger/debian/vzlogger.prerm.debhelper create mode 100644 misc/controller/vzlogger/debian/vzlogger.substvars create mode 100644 misc/controller/vzlogger/debian/vzlogger/DEBIAN/conffiles create mode 100644 misc/controller/vzlogger/debian/vzlogger/DEBIAN/control create mode 100644 misc/controller/vzlogger/debian/vzlogger/DEBIAN/md5sums create mode 100755 misc/controller/vzlogger/debian/vzlogger/DEBIAN/postinst create mode 100755 misc/controller/vzlogger/debian/vzlogger/DEBIAN/postrm create mode 100755 misc/controller/vzlogger/debian/vzlogger/DEBIAN/prerm create mode 100755 misc/controller/vzlogger/debian/vzlogger/etc/init.d/vzlogger create mode 100644 misc/controller/vzlogger/debian/vzlogger/etc/vzlogger.conf create mode 100755 misc/controller/vzlogger/debian/vzlogger/usr/bin/vzlogger create mode 100644 misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/changelog.gz create mode 100644 misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/copyright create mode 100644 misc/controller/vzlogger/debian/vzlogger/usr/share/man/man1/vzlogger.1.gz diff --git a/misc/controller/vzlogger/config.log b/misc/controller/vzlogger/config.log new file mode 100644 index 0000000..0a53c6e --- /dev/null +++ b/misc/controller/vzlogger/config.log @@ -0,0 +1,862 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by vzlogger configure 0.2, which was +generated by GNU Autoconf 2.67. Invocation command line was + + $ ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/vzlogger --disable-maintainer-mode --disable-dependency-tracking + +## --------- ## +## Platform. ## +## --------- ## + +hostname = steffen-laptop +uname -m = x86_64 +uname -r = 2.6.32-5-amd64 +uname -s = Linux +uname -v = #1 SMP Wed May 18 23:13:22 UTC 2011 + +/usr/bin/uname -p = unknown +/bin/uname -X = unknown + +/bin/arch = unknown +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/sbin +PATH: /usr/bin +PATH: /sbin +PATH: /bin +PATH: /usr/bin/X11 + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:2271: checking for a BSD-compatible install +configure:2339: result: /usr/bin/install -c +configure:2350: checking whether build environment is sane +configure:2400: result: yes +configure:2541: checking for a thread-safe mkdir -p +configure:2580: result: /bin/mkdir -p +configure:2593: checking for gawk +configure:2609: found /usr/bin/gawk +configure:2620: result: gawk +configure:2631: checking whether make sets $(MAKE) +configure:2653: result: yes +configure:2788: checking for gcc +configure:2804: found /usr/bin/gcc +configure:2815: result: gcc +configure:3044: checking for C compiler version +configure:3053: gcc --version >&5 +gcc (Debian 4.4.5-8) 4.4.5 +Copyright (C) 2010 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:3064: $? = 0 +configure:3053: gcc -v >&5 +Using built-in specs. +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 4.4.5 (Debian 4.4.5-8) +configure:3064: $? = 0 +configure:3053: gcc -V >&5 +gcc: '-V' option must have argument +configure:3064: $? = 1 +configure:3053: gcc -qversion >&5 +gcc: unrecognized option '-qversion' +gcc: no input files +configure:3064: $? = 1 +configure:3084: checking whether the C compiler works +configure:3106: gcc -g -O2 conftest.c >&5 +configure:3110: $? = 0 +configure:3158: result: yes +configure:3161: checking for C compiler default output file name +configure:3163: result: a.out +configure:3169: checking for suffix of executables +configure:3176: gcc -o conftest -g -O2 conftest.c >&5 +configure:3180: $? = 0 +configure:3202: result: +configure:3224: checking whether we are cross compiling +configure:3232: gcc -o conftest -g -O2 conftest.c >&5 +configure:3236: $? = 0 +configure:3243: ./conftest +configure:3247: $? = 0 +configure:3262: result: no +configure:3267: checking for suffix of object files +configure:3289: gcc -c -g -O2 conftest.c >&5 +configure:3293: $? = 0 +configure:3314: result: o +configure:3318: checking whether we are using the GNU C compiler +configure:3337: gcc -c -g -O2 conftest.c >&5 +configure:3337: $? = 0 +configure:3346: result: yes +configure:3355: checking whether gcc accepts -g +configure:3375: gcc -c -g conftest.c >&5 +configure:3375: $? = 0 +configure:3416: result: yes +configure:3433: checking for gcc option to accept ISO C89 +configure:3497: gcc -c -g -O2 conftest.c >&5 +configure:3497: $? = 0 +configure:3510: result: none needed +configure:3541: checking for style of include used by make +configure:3569: result: GNU +configure:3594: checking dependency style of gcc +configure:3704: result: none +configure:3774: checking for pkg-config +configure:3792: found /usr/bin/pkg-config +configure:3804: result: /usr/bin/pkg-config +configure:3829: checking pkg-config is at least version 0.9.0 +configure:3832: result: yes +configure:3842: checking for DEPS +configure:3849: $PKG_CONFIG --exists --print-errors "json >= 0.9 libcurl >= 7.21.0 libmicrohttpd >= 0.9.3" +configure:3852: $? = 0 +configure:3865: $PKG_CONFIG --exists --print-errors "json >= 0.9 libcurl >= 7.21.0 libmicrohttpd >= 0.9.3" +configure:3868: $? = 0 +configure:3925: result: yes +configure:3937: checking how to run the C preprocessor +configure:3968: gcc -E conftest.c +configure:3968: $? = 0 +configure:3982: gcc -E conftest.c +conftest.c:11:28: error: ac_nonexistent.h: No such file or directory +configure:3982: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| /* end confdefs.h. */ +| #include +configure:4007: result: gcc -E +configure:4027: gcc -E conftest.c +configure:4027: $? = 0 +configure:4041: gcc -E conftest.c +conftest.c:11:28: error: ac_nonexistent.h: No such file or directory +configure:4041: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| /* end confdefs.h. */ +| #include +configure:4070: checking for grep that handles long lines and -e +configure:4128: result: /bin/grep +configure:4133: checking for egrep +configure:4195: result: /bin/grep -E +configure:4200: checking for ANSI C header files +configure:4220: gcc -c -g -O2 conftest.c >&5 +configure:4220: $? = 0 +configure:4293: gcc -o conftest -g -O2 conftest.c >&5 +configure:4293: $? = 0 +configure:4293: ./conftest +configure:4293: $? = 0 +configure:4304: result: yes +configure:4317: checking for sys/types.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for sys/stat.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for stdlib.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for string.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for memory.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for strings.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for inttypes.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for stdint.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4317: checking for unistd.h +configure:4317: gcc -c -g -O2 conftest.c >&5 +configure:4317: $? = 0 +configure:4317: result: yes +configure:4332: checking fcntl.h usability +configure:4332: gcc -c -g -O2 conftest.c >&5 +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking fcntl.h presence +configure:4332: gcc -E conftest.c +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking for fcntl.h +configure:4332: result: yes +configure:4332: checking stddef.h usability +configure:4332: gcc -c -g -O2 conftest.c >&5 +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking stddef.h presence +configure:4332: gcc -E conftest.c +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking for stddef.h +configure:4332: result: yes +configure:4332: checking for stdint.h +configure:4332: result: yes +configure:4332: checking for stdlib.h +configure:4332: result: yes +configure:4332: checking for string.h +configure:4332: result: yes +configure:4332: checking sys/time.h usability +configure:4332: gcc -c -g -O2 conftest.c >&5 +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking sys/time.h presence +configure:4332: gcc -E conftest.c +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking for sys/time.h +configure:4332: result: yes +configure:4332: checking termios.h usability +configure:4332: gcc -c -g -O2 conftest.c >&5 +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking termios.h presence +configure:4332: gcc -E conftest.c +configure:4332: $? = 0 +configure:4332: result: yes +configure:4332: checking for termios.h +configure:4332: result: yes +configure:4332: checking for unistd.h +configure:4332: result: yes +configure:4344: checking for mode_t +configure:4344: gcc -c -g -O2 conftest.c >&5 +configure:4344: $? = 0 +configure:4344: gcc -c -g -O2 conftest.c >&5 +conftest.c: In function 'main': +conftest.c:65: error: expected expression before ')' token +configure:4344: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TERMIOS_H 1 +| #define HAVE_UNISTD_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((mode_t))) +| return 0; +| ; +| return 0; +| } +configure:4344: result: yes +configure:4355: checking for size_t +configure:4355: gcc -c -g -O2 conftest.c >&5 +configure:4355: $? = 0 +configure:4355: gcc -c -g -O2 conftest.c >&5 +conftest.c: In function 'main': +conftest.c:65: error: expected expression before ')' token +configure:4355: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TERMIOS_H 1 +| #define HAVE_UNISTD_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((size_t))) +| return 0; +| ; +| return 0; +| } +configure:4355: result: yes +configure:4370: checking for stdlib.h +configure:4370: result: yes +configure:4380: checking for GNU libc compatible malloc +configure:4404: gcc -o conftest -g -O2 conftest.c >&5 +configure:4404: $? = 0 +configure:4404: ./conftest +configure:4404: $? = 0 +configure:4414: result: yes +configure:4437: checking for stdlib.h +configure:4437: result: yes +configure:4447: checking for GNU libc compatible realloc +configure:4471: gcc -o conftest -g -O2 conftest.c >&5 +configure:4471: $? = 0 +configure:4471: ./conftest +configure:4471: $? = 0 +configure:4481: result: yes +configure:4502: checking whether strerror_r is declared +configure:4502: gcc -c -g -O2 conftest.c >&5 +configure:4502: $? = 0 +configure:4502: result: yes +configure:4515: checking for strerror_r +configure:4515: gcc -o conftest -g -O2 conftest.c >&5 +configure:4515: $? = 0 +configure:4515: result: yes +configure:4524: checking whether strerror_r returns char * +configure:4548: gcc -c -g -O2 conftest.c >&5 +conftest.c: In function 'main': +conftest.c:73: error: invalid type argument of 'unary *' (have 'int') +conftest.c:74: warning: initialization makes pointer from integer without a cast +configure:4548: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TERMIOS_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_MALLOC 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_REALLOC 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| +| char buf[100]; +| char x = *strerror_r (0, buf, sizeof buf); +| char *p = strerror_r (0, buf, sizeof buf); +| return !p || x; +| +| ; +| return 0; +| } +configure:4586: result: no +configure:4597: checking for gettimeofday +configure:4597: gcc -o conftest -g -O2 conftest.c >&5 +configure:4597: $? = 0 +configure:4597: result: yes +configure:4597: checking for memset +configure:4597: gcc -o conftest -g -O2 conftest.c >&5 +conftest.c:59: warning: conflicting types for built-in function 'memset' +configure:4597: $? = 0 +configure:4597: result: yes +configure:4597: checking for sqrt +configure:4597: gcc -o conftest -g -O2 conftest.c >&5 +conftest.c:60: warning: conflicting types for built-in function 'sqrt' +/tmp/ccgAyKgc.o: In function `main': +/home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/conftest.c:71: undefined reference to `sqrt' +collect2: ld returned 1 exit status +configure:4597: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "vzlogger" +| #define PACKAGE_TARNAME "vzlogger" +| #define PACKAGE_VERSION "0.2" +| #define PACKAGE_STRING "vzlogger 0.2" +| #define PACKAGE_BUGREPORT "info@steffenvogel.de" +| #define PACKAGE_URL "" +| #define PACKAGE "vzlogger" +| #define VERSION "0.2" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_FCNTL_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TERMIOS_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_MALLOC 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_REALLOC 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define HAVE_GETTIMEOFDAY 1 +| #define HAVE_MEMSET 1 +| /* end confdefs.h. */ +| /* Define sqrt to an innocuous variant, in case declares sqrt. +| For example, HP-UX 11i declares gettimeofday. */ +| #define sqrt innocuous_sqrt +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char sqrt (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef sqrt +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char sqrt (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_sqrt || defined __stub___sqrt +| choke me +| #endif +| +| int +| main () +| { +| return sqrt (); +| ; +| return 0; +| } +configure:4597: result: no +configure:4597: checking for strchr +configure:4597: gcc -o conftest -g -O2 conftest.c >&5 +conftest.c:60: warning: conflicting types for built-in function 'strchr' +configure:4597: $? = 0 +configure:4597: result: yes +configure:4597: checking for strtol +configure:4597: gcc -o conftest -g -O2 conftest.c >&5 +configure:4597: $? = 0 +configure:4597: result: yes +configure:4608: checking whether to build with debug information +configure:4617: result: no +configure:4751: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by vzlogger config.status 0.2, which was +generated by GNU Autoconf 2.67. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on steffen-laptop + +config.status:882: creating Makefile +config.status:882: creating src/Makefile +config.status:882: creating docs/Makefile +config.status:882: creating config.h +config.status:1110: executing depfiles commands +configure:6075: WARNING: unrecognized options: --disable-maintainer-mode + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_c_compiler_gnu=yes +ac_cv_env_CC_set= +ac_cv_env_CC_value= +ac_cv_env_CFLAGS_set=set +ac_cv_env_CFLAGS_value='-g -O2' +ac_cv_env_CPPFLAGS_set=set +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_DEPS_CFLAGS_set= +ac_cv_env_DEPS_CFLAGS_value= +ac_cv_env_DEPS_LIBS_set= +ac_cv_env_DEPS_LIBS_value= +ac_cv_env_LDFLAGS_set=set +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_PKG_CONFIG_LIBDIR_set= +ac_cv_env_PKG_CONFIG_LIBDIR_value= +ac_cv_env_PKG_CONFIG_PATH_set= +ac_cv_env_PKG_CONFIG_PATH_value= +ac_cv_env_PKG_CONFIG_set= +ac_cv_env_PKG_CONFIG_value= +ac_cv_env_build_alias_set=set +ac_cv_env_build_alias_value=x86_64-linux-gnu +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_func_gettimeofday=yes +ac_cv_func_malloc_0_nonnull=yes +ac_cv_func_memset=yes +ac_cv_func_realloc_0_nonnull=yes +ac_cv_func_sqrt=no +ac_cv_func_strchr=yes +ac_cv_func_strerror_r=yes +ac_cv_func_strerror_r_char_p=no +ac_cv_func_strtol=yes +ac_cv_have_decl_strerror_r=yes +ac_cv_header_fcntl_h=yes +ac_cv_header_inttypes_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stddef_h=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_time_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_termios_h=yes +ac_cv_header_unistd_h=yes +ac_cv_objext=o +ac_cv_path_EGREP='/bin/grep -E' +ac_cv_path_GREP=/bin/grep +ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_mkdir=/bin/mkdir +ac_cv_prog_AWK=gawk +ac_cv_prog_CPP='gcc -E' +ac_cv_prog_ac_ct_CC=gcc +ac_cv_prog_cc_c89= +ac_cv_prog_cc_g=yes +ac_cv_prog_make_make_set=yes +ac_cv_type_mode_t=yes +ac_cv_type_size_t=yes +am_cv_CC_dependencies_compiler_type=none +pkg_cv_DEPS_CFLAGS='-I/usr/include/json ' +pkg_cv_DEPS_LIBS='-ljson -lcurl -lmicrohttpd ' + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run aclocal-1.11' +AMDEPBACKSLASH='' +AMDEP_FALSE='' +AMDEP_TRUE='#' +AMTAR='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run tar' +AUTOCONF='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run autoconf' +AUTOHEADER='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run autoheader' +AUTOMAKE='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run automake-1.11' +AWK='gawk' +CC='gcc' +CCDEPMODE='depmode=none' +CFLAGS='-g -O2' +CPP='gcc -E' +CPPFLAGS='' +CYGPATH_W='echo' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +DEPS_CFLAGS='-I/usr/include/json ' +DEPS_LIBS='-ljson -lcurl -lmicrohttpd ' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +EGREP='/bin/grep -E' +EXEEXT='' +GREP='/bin/grep' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +LDFLAGS='' +LIBOBJS='' +LIBS='' +LTLIBOBJS='' +MAKEINFO='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/missing --run makeinfo' +MKDIR_P='/bin/mkdir -p' +OBJEXT='o' +PACKAGE='vzlogger' +PACKAGE_BUGREPORT='info@steffenvogel.de' +PACKAGE_NAME='vzlogger' +PACKAGE_STRING='vzlogger 0.2' +PACKAGE_TARNAME='vzlogger' +PACKAGE_URL='' +PACKAGE_VERSION='0.2' +PATH_SEPARATOR=':' +PKG_CONFIG='/usr/bin/pkg-config' +PKG_CONFIG_LIBDIR='' +PKG_CONFIG_PATH='' +SET_MAKE='' +SHELL='/bin/bash' +STRIP='' +VERSION='0.2' +ac_ct_CC='gcc' +am__EXEEXT_FALSE='' +am__EXEEXT_TRUE='#' +am__fastdepCC_FALSE='' +am__fastdepCC_TRUE='#' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__quote='' +am__tar='${AMTAR} chof - "$$tardir"' +am__untar='${AMTAR} xf -' +bindir='${exec_prefix}/bin' +build_alias='x86_64-linux-gnu' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host_alias='' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${prefix}/share/info' +install_sh='${SHELL} /home/stv0g/workspace/volkszaehler.org/misc/controller/vzlogger/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${prefix}/lib/vzlogger' +localedir='${datarootdir}/locale' +localstatedir='/var' +mandir='${prefix}/share/man' +mkdir_p='/bin/mkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +prefix='/usr' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "vzlogger" +#define PACKAGE_TARNAME "vzlogger" +#define PACKAGE_VERSION "0.2" +#define PACKAGE_STRING "vzlogger 0.2" +#define PACKAGE_BUGREPORT "info@steffenvogel.de" +#define PACKAGE_URL "" +#define PACKAGE "vzlogger" +#define VERSION "0.2" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_MALLOC 1 +#define HAVE_STDLIB_H 1 +#define HAVE_REALLOC 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_MEMSET 1 +#define HAVE_STRCHR 1 +#define HAVE_STRTOL 1 +#define NDEBUG /**/ + +configure: exit 0 diff --git a/misc/controller/vzlogger/debian/control b/misc/controller/vzlogger/debian/control index edd563d..f6b3bb5 100644 --- a/misc/controller/vzlogger/debian/control +++ b/misc/controller/vzlogger/debian/control @@ -2,7 +2,7 @@ Source: vzlogger Section: net Priority: optional Maintainer: Steffen Vogel -Build-Depends: debhelper (>= 7.0.50~) +Build-Depends: debhelper (>= 7.0.50~), pkg-config (>= 0.25) Standards-Version: 3.8.4 Homepage: http://wiki.volkszaehler.org/software/controller/vzlogger Vcs-Git: git://github.com/volkszaehler/volkszaehler.org.git diff --git a/misc/controller/vzlogger/debian/files b/misc/controller/vzlogger/debian/files new file mode 100644 index 0000000..7db2c0e --- /dev/null +++ b/misc/controller/vzlogger/debian/files @@ -0,0 +1 @@ +vzlogger_0.2_amd64.deb net optional diff --git a/misc/controller/vzlogger/debian/vzlogger.debhelper.log b/misc/controller/vzlogger/debian/vzlogger.debhelper.log new file mode 100644 index 0000000..2d06fcd --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger.debhelper.log @@ -0,0 +1,45 @@ +dh_auto_configure +dh_auto_build +dh_auto_test +dh_prep +dh_installdirs +dh_auto_install +dh_install +dh_installdocs +dh_installchangelogs +dh_installexamples +dh_installman +dh_installcatalogs +dh_installcron +dh_installdebconf +dh_installemacsen +dh_installifupdown +dh_installinfo +dh_pysupport +dh_installinit +dh_installmenu +dh_installmime +dh_installmodules +dh_installlogcheck +dh_installlogrotate +dh_installpam +dh_installppp +dh_installudev +dh_installwm +dh_installxfonts +dh_bugfiles +dh_lintian +dh_gconf +dh_icons +dh_perl +dh_usrlocal +dh_link +dh_compress +dh_fixperms +dh_strip +dh_makeshlibs +dh_shlibdeps +dh_installdeb +dh_gencontrol +dh_md5sums +dh_builddeb diff --git a/misc/controller/vzlogger/debian/vzlogger.postinst.debhelper b/misc/controller/vzlogger/debian/vzlogger.postinst.debhelper new file mode 100644 index 0000000..2b8fba8 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger.postinst.debhelper @@ -0,0 +1,10 @@ +# Automatically added by dh_installinit +if [ -x "/etc/init.d/vzlogger" ]; then + update-rc.d vzlogger defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d vzlogger start || exit $? + else + /etc/init.d/vzlogger start || exit $? + fi +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger.postrm.debhelper b/misc/controller/vzlogger/debian/vzlogger.postrm.debhelper new file mode 100644 index 0000000..b05eb22 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger.postrm.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_installinit +if [ "$1" = "purge" ] ; then + update-rc.d vzlogger remove >/dev/null +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger.prerm.debhelper b/misc/controller/vzlogger/debian/vzlogger.prerm.debhelper new file mode 100644 index 0000000..c841e62 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger.prerm.debhelper @@ -0,0 +1,9 @@ +# Automatically added by dh_installinit +if [ -x "/etc/init.d/vzlogger" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d vzlogger stop || exit $? + else + /etc/init.d/vzlogger stop || exit $? + fi +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger.substvars b/misc/controller/vzlogger/debian/vzlogger.substvars new file mode 100644 index 0000000..7c9e557 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger.substvars @@ -0,0 +1,2 @@ +shlibs:Depends=libc6 (>= 2.3.4), libcurl3 (>= 7.16.2-1), libjson0, libmicrohttpd10 +misc:Depends= diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/conffiles b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/conffiles new file mode 100644 index 0000000..6afdb34 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/conffiles @@ -0,0 +1,2 @@ +/etc/vzlogger.conf +/etc/init.d/vzlogger diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/control b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/control new file mode 100644 index 0000000..dc97fdd --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/control @@ -0,0 +1,17 @@ +Package: vzlogger +Version: 0.2 +Architecture: amd64 +Maintainer: Steffen Vogel +Installed-Size: 112 +Depends: libc6 (>= 2.3.4), libcurl3 (>= 7.16.2-1), libjson0, libmicrohttpd10 +Section: net +Priority: optional +Homepage: http://wiki.volkszaehler.org/software/controller/vzlogger +Description: program for logging measurements to an volkszaehler.org middelware + vzlogger... + * is a tiny shell tool to log measurements of a wide variety of + smartmeters, sensors & protocols against the volkszaehler.org middleware. + * can run as a daemon or can be invoked periodically by cron. + * includes a tiny onboard httpd to serve + realtime readings to the ajax web frontend. + * is written in pure ansi c and should run on most embedded devices. diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/md5sums b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/md5sums new file mode 100644 index 0000000..fcded29 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/md5sums @@ -0,0 +1,4 @@ +8fa7aec7174dbeb8a1c32fb55ecac55c usr/bin/vzlogger +dd95570da959bb157be4953e996ab8cf usr/share/doc/vzlogger/changelog.gz +38632dd7fa88edb0c2d049ff22e862d3 usr/share/doc/vzlogger/copyright +fd5b637cf1823a1b8202c7ad5242b9cf usr/share/man/man1/vzlogger.1.gz diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postinst b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postinst new file mode 100755 index 0000000..4f63e1d --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +set -e +# Automatically added by dh_installinit +if [ -x "/etc/init.d/vzlogger" ]; then + update-rc.d vzlogger defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d vzlogger start || exit $? + else + /etc/init.d/vzlogger start || exit $? + fi +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postrm b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postrm new file mode 100755 index 0000000..9b6b4f4 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +# Automatically added by dh_installinit +if [ "$1" = "purge" ] ; then + update-rc.d vzlogger remove >/dev/null +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger/DEBIAN/prerm b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/prerm new file mode 100755 index 0000000..a9545d8 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/DEBIAN/prerm @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +# Automatically added by dh_installinit +if [ -x "/etc/init.d/vzlogger" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d vzlogger stop || exit $? + else + /etc/init.d/vzlogger stop || exit $? + fi +fi +# End automatically added section diff --git a/misc/controller/vzlogger/debian/vzlogger/etc/init.d/vzlogger b/misc/controller/vzlogger/debian/vzlogger/etc/init.d/vzlogger new file mode 100755 index 0000000..0ba899a --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/etc/init.d/vzlogger @@ -0,0 +1,151 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: vzlogger +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: logging measurements to an volkszaehler.org middelware +### END INIT INFO + +# Author: Steffen Vogel + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC=vzlogger # Introduce a short description here +NAME=vzlogger # Introduce the short server's name here +DAEMON=/usr/sbin/vzlogger # Introduce the server's location here +DAEMON_ARGS="" # Arguments to run the daemon with +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/misc/controller/vzlogger/debian/vzlogger/etc/vzlogger.conf b/misc/controller/vzlogger/debian/vzlogger/etc/vzlogger.conf new file mode 100644 index 0000000..f0ef159 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/etc/vzlogger.conf @@ -0,0 +1,11 @@ +; vzlogger configuration +; use tabs, spaces as delimiter +; use ; to introduce a comment + +;prot intval uuid middleware options +;1wire 3 52960fe0-8882-11e0-b356-85eba28c1922 http://localhost/workspace/volkszaehler.org/htdocs/middleware /mnt/1wire/10.12E6D3000800/temperature +;obis 10 ef0e9adf-cd9e-4d9a-92c5-b4fb4c89ff98 http://volkszaehler.org/demo/middleware.php /dev/ttyS0 +;rawS0 10 27a1b4c0-8f8a-11e0-ad82-db6efbc4ba2e http://volkszaehler.org/demo/middleware.php /dev/ttyUSB2 +random 3 52960fe0-8882-11e0-b356-85eba28c1922 http://localhost/workspace/volkszaehler.org/htdocs/middleware 40 +;random 7 473d35b0-945b-11e0-beb1-918e8c2ce5a0 http://volkszaehler.org/demo/middleware.php 10 + diff --git a/misc/controller/vzlogger/debian/vzlogger/usr/bin/vzlogger b/misc/controller/vzlogger/debian/vzlogger/usr/bin/vzlogger new file mode 100755 index 0000000000000000000000000000000000000000..966b4e6101285422f5026ef0b8f781d28131bafe GIT binary patch literal 25480 zcmdUX3w%`7x$n*kf@mgM(Wvye)rkg`kRU?jArlf{M+S|AM-(s_lF37d%s4X%L9K=+ zLB=sP+G;%>+oGpc+j?5+?Nvk@27-W|J|eylZHd;$-bPCVMXI&A|Nq)+C7YD__5AL= z=l*_o!Jcn@|Mji4zV)qdJ@%TcxnsU}L262hrb4QArAAKA^$5uR)U-{j1S_#3EmQMo z6SZ@+F+ei#cti@R9aA(Ri&ivK%B6v(GoC7eRF55zbfV3n4m&6fNm<`W@W`l5|5jnM zilQX~U_R=qEfp+iwH=Xk^H`hRe7a1R`KTWA<;i?`QeM$P7L1^%Y9HIiXQFK1#8eMB z@*WbcRD6z5VGCg8??-Dz{Aww1wa1P~>X!8>s`6cne4>3a+dm^p&nbb%HPfd}3Diyw zG&VK2PHrulK6(1I{75i=s?a|h1+mJ7S1%JqDtnv;j&;*q>`SH>?|S|G->!c3(A-bA zeQ6f#ugc56ZG#VK^?0V^VK@(u2ajEvrm_4gJPhaKxfIV7JTvexu>93{D#;+^;F*J` z8c!V_)ec05{emvAf&jwVHqovCJqgbw$(MkZ;aP%boWvGOdZnb-f*N>cN`8T)Cxc!u z<7a@*$3yp6gy%9mD$qs@%kh-rDa3OX9`@5Ec&@|4P>$yU5ljA&CzIxauEetn&q6%P zO%T;;@kn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)v|Z`Ip+Xt14gZgAKW^sCpnGg6en0uSdk0zgq6Es%8F! z+91meDu1@*J4WSKzyGi2+5$=sDL(wWP>R26RDQK@7dMrWmZbzGRrM>l8xiWS?B7=E z5lL;Of@p1O!)&wvQ2&F#o%yw^J+>qr3xQ``&M>%9!R%s*P+(R?pt z>3d3lweQc9`3G4z0>=-7%CFk>TVT%mbL4wdj$9~}yvXdxuke>g_?1csrGMPSq%%e0Q2CzKmY&$ literal 0 HcmV?d00001 diff --git a/misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/changelog.gz b/misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/changelog.gz new file mode 100644 index 0000000000000000000000000000000000000000..fd7690497f4bd6419b63733ee30be823ea12b7d3 GIT binary patch literal 138 zcmV;50CoQ#iwFP!0000210~4I3IZV%2H?F<@h`iL9HoM$3vFvz(cYS)38FCSL_K{) z-|`#YAvwoAMkMtZHRfV&f!C|lr)j}0BuWUfrbD80G5kA8~^|S literal 0 HcmV?d00001 diff --git a/misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/copyright b/misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/copyright new file mode 100644 index 0000000..903ad63 --- /dev/null +++ b/misc/controller/vzlogger/debian/vzlogger/usr/share/doc/vzlogger/copyright @@ -0,0 +1,32 @@ +This work was packaged for Debian by: + Steffen Vogel on Thu, 09 Jun 2011 16:04:25 +0200 + +It was downloaded from: + http://volkszaehler.org + +Upstream Author(s): + Steffen Vogel + +Copyright: + Copyright (C) 2011 Steffen Vogel + +License: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +The Debian packaging is: + Copyright (C) 2011 Steffen Vogel + and is licensed under the GPL version 3, see above. diff --git a/misc/controller/vzlogger/debian/vzlogger/usr/share/man/man1/vzlogger.1.gz b/misc/controller/vzlogger/debian/vzlogger/usr/share/man/man1/vzlogger.1.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb5aa836243163f3232527f49647cbe6caa75f45 GIT binary patch literal 1145 zcmV-<1cv(`iwFP!000021C3QpZ{s!)z57=Ta%hvSEywAhMNlk|c%6?$Ha0BpF50?4 zDQRSJO_2ggS@Hh*&QOw_WOHZ^iNblDk2i0I(fS1b*Uug9hcNqeHH|M}^lk*&nmp&P zK}0TYq;(!DVMU1^?GPTXKFx;U3R9~L5(J?Xq@r>G9b;;A_8cD1rmOq;1ejb5;o^KUISEb|3WXy#*|(aC@r87d2~Xh*)VQN~7I)G~y&+o&P>Bsje6_90 zln8;9Ql!?nA>@YdI0tp5QkA^Krh2@8iKbzwW)S z^9B43regLT{1b2=X7O}+zhKF}f<_SuVzuDYck6r!q#*%b>OCnNX$HJ8{EKsZnV-oC z*vJfFC#*zbhE5#y$hQh-3bZpM^`E#{Z&IVk_eKz-J_z#7;uLamFLO$T23u<8)^D?J$~5>z!$xONiKpy6&&a2=F>X@~?Y6Qp)# zkkOo`=%Uc8d1zBSSQSXa-RZ=UPLCpQS4}NL#zu9S}E!=rR`EH z1H2VHCwH%N!_&s)^z^Jp>5xQEe~ixMhR7PUUjf)=l@>y4R0MkubuBZRo~jBH+xy5` zAFTk`N2iJQ;D}Q#P8pH{!vwA29q+|(LPe20bCDvP1{F|4L*MP$(M9###i%mYv!m5? z0sP$!?F(neyG47Krl;ad)c58MdXM;Bi>Cw<B+~JPg%ZrhlZW{=ZKTd>NuH);`!ak%Bh>b2Y~pja#pgT}%lP8gi#Gr3 z&$sblT3dRFXtVI+i6LQaV5?0-gI{k*VBHI7F|>uxcvg9yFUR8mdA(%XwK-h`zzz6^UNQW(T literal 0 HcmV?d00001 diff --git a/misc/controller/vzlogger/src/api.c b/misc/controller/vzlogger/src/api.c index 93da881..764d69f 100644 --- a/misc/controller/vzlogger/src/api.c +++ b/misc/controller/vzlogger/src/api.c @@ -78,7 +78,7 @@ size_t curl_custom_write_callback(void *ptr, size_t size, size_t nmemb, void *da memcpy(&(response->data[response->size]), ptr, realsize); response->size += realsize; - //response->data[response->size] = 0; + response->data[response->size] = 0; return realsize; } @@ -88,24 +88,28 @@ json_object * api_json_tuples(channel_t *ch, bool_t all) { json_object *json_tuples = json_object_new_array(); - int index = ch->queue.read_p; + size_t index = ch->queue.read_p; + size_t end = (all) ? ch->queue.read_p : ch->queue.write_p; do { pthread_mutex_lock(&ch->mutex); - rd = ch->queue.buf[index]; + queue_get(&ch->queue, index, &rd); pthread_mutex_unlock(&ch->mutex); - struct json_object *json_tuple = json_object_new_array(); + if (rd.tv.tv_sec) { /* skip empty buffers */ + struct json_object *json_tuple = json_object_new_array(); - int timestamp = rd.tv.tv_sec * 1000 + rd.tv.tv_usec / 1000; + unsigned long timestamp = rd.tv.tv_sec * 1000 + rd.tv.tv_usec / 1000; - json_object_array_add(json_tuple, json_object_new_int(timestamp)); - json_object_array_add(json_tuple, json_object_new_double(rd.value)); + json_object_array_add(json_tuple, json_object_new_double(timestamp)); + json_object_array_add(json_tuple, json_object_new_double(rd.value)); - json_object_array_add(json_tuples, json_tuple); + json_object_array_add(json_tuples, json_tuple); + } index++; - index %= ch->queue.size; - } while (index != (all) ? ch->queue.read_p : ch->queue.write_p); + index %= ch->queue.size; /* increment pointer */ + + } while (index != end); return json_tuples; } @@ -115,6 +119,7 @@ CURL * api_curl_init(channel_t *ch) { struct curl_slist *header = NULL; char url[255], agent[255]; + /* prepare header & url */ sprintf(agent, "User-Agent: vzlogger/%s (%s)", VZ_VERSION, curl_version()); /* build user agent */ sprintf(url, "%s/data/%s.json", ch->middleware, ch->uuid); /* build url */ @@ -124,7 +129,7 @@ CURL * api_curl_init(channel_t *ch) { curl = curl_easy_init(); if (!curl) { - print(-1, "Cannot create curl handle", ch); + print(-1, "CURL: cannot create handle", ch); exit(EXIT_FAILURE); } @@ -169,7 +174,7 @@ void api_parse_exception(CURLresponse response, char *err) { * * Logs buffered readings against middleware */ -void *api_thread(void *arg) { +void * api_thread(void *arg) { CURL *curl; channel_t *ch = (channel_t *) arg; /* casting argument */ @@ -179,14 +184,13 @@ void *api_thread(void *arg) { do { /* start thread mainloop */ CURLresponse response; - int curl_code; - long int http_code; + long int http_code, curl_code; char *json_str; /* initialize response */ response.data = NULL; response.size = 0; - + pthread_mutex_lock(&ch->mutex); while (queue_is_empty(&ch->queue)) { /* detect spurious wakeups */ pthread_cond_wait(&ch->condition, &ch->mutex); /* sleep until new data has been read */ @@ -194,7 +198,6 @@ void *api_thread(void *arg) { pthread_mutex_unlock(&ch->mutex); json_str = json_object_to_json_string(api_json_tuples(ch, FALSE)); - print(1, "JSON request body: %s", ch, json_str); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json_str); @@ -202,12 +205,10 @@ void *api_thread(void *arg) { curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) &response); curl_code = curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code); if (curl_code == CURLE_OK && http_code == 200) { /* everything is ok */ print(1, "Request succeeded with code: %i", ch, http_code); - queue_clear(&ch->queue); } else { /* error */ diff --git a/misc/controller/vzlogger/src/api.h b/misc/controller/vzlogger/src/api.h index dc156a9..54b9dce 100644 --- a/misc/controller/vzlogger/src/api.h +++ b/misc/controller/vzlogger/src/api.h @@ -42,7 +42,7 @@ typedef struct { int curl_custom_debug_callback(CURL *curl, curl_infotype type, char *data, size_t size, void *custom); size_t curl_custom_write_callback(void *ptr, size_t size, size_t nmemb, void *data); -json_object * api_build_json(channel_t *ch); +json_object * api_json_tuples(channel_t *ch, bool_t all); void * api_thread(void *arg); #endif /* _API_H_ */ diff --git a/misc/controller/vzlogger/src/local.c b/misc/controller/vzlogger/src/local.c index 51d8f3a..3a1c0bd 100644 --- a/misc/controller/vzlogger/src/local.c +++ b/misc/controller/vzlogger/src/local.c @@ -52,8 +52,8 @@ int handle_request(void *cls, struct MHD_Connection *connection, const char *url if (strcmp(url, "/") == 0 || strcmp(ch->uuid, url + 1) == 0) { pthread_mutex_lock(&ch->mutex); - /* wait for new data comet-like blocking of HTTP response */ - pthread_cond_wait(&ch->condition, &ch->mutex); // TODO use pthread_cond_timedwait() + /* wait for new data comet-like blocking of HTTP response */ + pthread_cond_wait(&ch->condition, &ch->mutex); // TODO use pthread_cond_timedwait() pthread_mutex_unlock(&ch->mutex); struct json_object *json_tuples = api_json_tuples(ch, TRUE); diff --git a/misc/controller/vzlogger/src/main.c b/misc/controller/vzlogger/src/main.c index 2e68d0f..19ee1d1 100644 --- a/misc/controller/vzlogger/src/main.c +++ b/misc/controller/vzlogger/src/main.c @@ -74,7 +74,7 @@ static struct option long_options[] = { /** * Descriptions vor command line options */ -static char * long_options_descs[] = { +static char *long_options_descs[] = { "config file with channel -> uuid mapping", "run as daemon", "activate local interface (tiny webserver)", @@ -85,10 +85,12 @@ static char * long_options_descs[] = { NULL /* stop condition for iterator */ }; -/* Global variables */ +/* + * Global variables + */ channel_t chans[MAX_CHANNELS]; // TODO use dynamic allocation options_t opts = { /* setting default options */ - "vzlogger.conf", /* config file */ + NULL, /* config file */ 8080, /* port for local interface */ 0, /* debug level / verbosity */ FALSE, /* daemon mode */ @@ -209,15 +211,41 @@ void parse_options(int argc, char * argv[], options_t * opts) { exit((c == '?') ? EXIT_FAILURE : EXIT_SUCCESS); } } + + if (opts->config == NULL) { /* search for config file */ + if (access("vzlogger.conf", R_OK) == 0) { + opts->config = "vzlogger.conf"; + } + else if (access("/etc/vzlogger.conf", R_OK) == 0) { + opts->config = "/etc/vzlogger.conf"; + } + else { /* search in home directory */ + char *home_config = malloc(255); + strcat(home_config, getenv("HOME")); /* get home dir */ + strcat(home_config, "/.vzlogger.conf"); /* append my filename */ + + if (access(home_config, R_OK) == 0) { + opts->config = home_config; + } + } + } } -int parse_channels(char * filename, channel_t * chans) { +int parse_channels(char *filename, channel_t *chans) { + if (filename == NULL) { + fprintf(stderr, "No config file found! Please specify with --config!\n"); + exit(EXIT_FAILURE); + } + FILE *file = fopen(filename, "r"); /* open configuration */ if (file == NULL) { perror(filename); /* why didn't the file open? */ exit(EXIT_FAILURE); } + else { + print(2, "Start parsing configuration from %s", NULL, filename); + } char line[256]; int chan_num = 0, line_num = 1; @@ -308,22 +336,33 @@ int parse_channels(char * filename, channel_t * chans) { */ void *read_thread(void *arg) { channel_t *ch = (channel_t *) arg; /* casting argument */ - print(1, "Started reading thread", ch); /* initalize channel */ ch->handle = ch->prot->init_func(ch->options); /* init sensor/meter */ do { - reading_t rd = ch->prot->read_func(ch->handle); /* aquire reading */ + /** + * Aquire reading, + * may be blocking if mode == MODE_METER + */ + reading_t rd = ch->prot->read_func(ch->handle); pthread_mutex_lock(&ch->mutex); - queue_push(&ch->queue, rd); + if (!queue_push(&ch->queue, rd)) { + print(6, "Warning queue is full, discarding first tuple!", ch); + } pthread_cond_broadcast(&ch->condition); /* notify webserver and logging thread */ pthread_mutex_unlock(&ch->mutex); print(1, "Value read: %.1f", ch, rd.value); - if (opts.verbose > 5) queue_print(&ch->queue); /* Debugging */ + + /* Debugging */ + if (opts.verbose >= 10) { + char *queue_str = queue_print(&ch->queue); + print(10, "Queue dump: %s write_p = %lu\t read_p = %lu", ch, queue_str, ch->queue.write_p, ch->queue.read_p); + free(queue_str); + } if (ch->prot->mode != MODE_METER) { /* for meters, the read_func call is blocking */ print(5, "Next reading in %i seconds", ch, ch->interval); @@ -342,9 +381,9 @@ void *read_thread(void *arg) { /** * The main loop */ -int main(int argc, char * argv[]) { +int main(int argc, char *argv[]) { int num_chans; - struct MHD_Daemon * d; + struct MHD_Daemon *httpd_handle = NULL; parse_options(argc, argv, &opts); /* parse command line arguments */ num_chans = parse_channels(opts.config, chans); /* parse channels from configuration */ @@ -354,9 +393,10 @@ int main(int argc, char * argv[]) { curl_global_init(CURL_GLOBAL_ALL); /* global intialization for all threads */ for (int i = 0; i < num_chans; i++) { - channel_t * ch = &chans[i]; + channel_t *ch = &chans[i]; - queue_init(&ch->queue, (BUFFER_LENGTH / ch->interval) + 1); /* initialize queue to buffer 10 minutes of data */ + /* initialize queue to buffer data */ + queue_init(&ch->queue, (BUFFER_LENGTH / ch->interval) + 1); /* initialize thread syncronization helpers */ pthread_mutex_init(&ch->mutex, NULL); @@ -369,7 +409,7 @@ int main(int argc, char * argv[]) { /* start webserver for local interface */ if (opts.local) { - d = MHD_start_daemon( + httpd_handle = MHD_start_daemon( MHD_USE_THREAD_PER_CONNECTION, opts.port, NULL, NULL, @@ -380,25 +420,28 @@ int main(int argc, char * argv[]) { } /* wait for all threads to terminate */ + // TODO bind signal for termination for (int i = 0; i < num_chans; i++) { channel_t * ch = &chans[i]; pthread_join(ch->reading_thread, NULL); pthread_join(ch->logging_thread, NULL); + // TODO close protocol handles + free(ch->middleware); free(ch->uuid); free(ch->options); - queue_free(&ch->queue); pthread_cond_destroy(&ch->condition); pthread_mutex_destroy(&ch->mutex); } - if (opts.local) { /* stop webserver */ - MHD_stop_daemon(d); + /* stop webserver */ + if (httpd_handle) { + MHD_stop_daemon(httpd_handle); } - return 0; + return EXIT_SUCCESS; } diff --git a/misc/controller/vzlogger/src/main.h b/misc/controller/vzlogger/src/main.h index 46b1156..5ffcf5c 100644 --- a/misc/controller/vzlogger/src/main.h +++ b/misc/controller/vzlogger/src/main.h @@ -36,8 +36,8 @@ #define VZ_VERSION "0.2" #define MAX_CHANNELS 16 -#define RETRY_PAUSE 10 //600 /* seconds to wait after failed request */ -#define BUFFER_LENGTH 600 /* in seconds */ +#define RETRY_PAUSE 10 //600 /* seconds to wait after failed request */ +#define BUFFER_LENGTH 60 //600 /* in seconds */ #ifndef TRUE #define TRUE 1 diff --git a/misc/controller/vzlogger/src/queue.c b/misc/controller/vzlogger/src/queue.c index e7af0ec..37435c8 100644 --- a/misc/controller/vzlogger/src/queue.c +++ b/misc/controller/vzlogger/src/queue.c @@ -3,17 +3,17 @@ #include "queue.h" -queue_t * queue_init(queue_t *q, size_t size) { +bool_t queue_init(queue_t *q, size_t size) { q->buf = malloc(sizeof(reading_t) * size); /* keep one slot open */ if (q->buf) { q->size = size; q->read_p = q->write_p = 0; /* queue is empty */ - return q; + return TRUE; } - else { /* cannot allocat memory */ - return NULL; + else { /* cannot allocate memory */ + return FALSE; } } @@ -30,16 +30,34 @@ void queue_clear(queue_t *q) { q->read_p = q->write_p; } -void queue_push(queue_t *q, reading_t rd) { - q->buf[q->write_p] = rd; - q->write_p++; +bool_t queue_push(queue_t *q, reading_t rd) { + q->buf[q->write_p] = rd; /* copy data to buffer */ + q->write_p++; /* increment write pointer */ q->write_p %= q->size; + + if (q->read_p == q->write_p) { /* queue full */ + q->read_p++; /* discarding first tuple */ + return FALSE; + } + + return TRUE; +} + +bool_t queue_get(queue_t *q, size_t index, reading_t *rd) { + *rd = q->buf[index]; + + return (index < q->size); } -void queue_print(queue_t *q) { - printf("Queue dump: [%.1f", q->buf[0].value); +char * queue_print(queue_t *q) { + char *buf = malloc(q->size * 6); + char *ret = buf; + + buf += sprintf(buf, "[%.1f", q->buf[0].value); for (int i = 1; i < q->size; i++) { - printf("|%.2f", q->buf[i].value); + buf += sprintf(buf, "|%.2f", q->buf[i].value); } - printf("] write_p = %i\t read_p = %i\n", q->write_p, q->read_p); + buf += sprintf(buf, "]"); + + return ret; } diff --git a/misc/controller/vzlogger/src/queue.h b/misc/controller/vzlogger/src/queue.h index e790f66..3832f22 100644 --- a/misc/controller/vzlogger/src/queue.h +++ b/misc/controller/vzlogger/src/queue.h @@ -41,20 +41,19 @@ typedef char bool_t; typedef struct { size_t size; - int read_p; - int write_p; - int fill_count; + size_t read_p; + size_t write_p; reading_t *buf; } queue_t; -queue_t * queue_init(queue_t *q, size_t size); +bool_t queue_init(queue_t *q, size_t size); bool_t queue_is_empty(queue_t *q); -void queue_push(queue_t *q, reading_t rd); +bool_t queue_get(queue_t *q, size_t index, reading_t *rd); +bool_t queue_push(queue_t *q, reading_t rd); void queue_clear(queue_t *q); void queue_free(queue_t *q); -void queue_print(queue_t *q); - +char * queue_print(queue_t *q); #endif /* _QUEUE_H_ */ diff --git a/misc/controller/vzlogger/vzlogger.conf b/misc/controller/vzlogger/vzlogger.conf index fe8742a..f0ef159 100644 --- a/misc/controller/vzlogger/vzlogger.conf +++ b/misc/controller/vzlogger/vzlogger.conf @@ -6,5 +6,6 @@ ;1wire 3 52960fe0-8882-11e0-b356-85eba28c1922 http://localhost/workspace/volkszaehler.org/htdocs/middleware /mnt/1wire/10.12E6D3000800/temperature ;obis 10 ef0e9adf-cd9e-4d9a-92c5-b4fb4c89ff98 http://volkszaehler.org/demo/middleware.php /dev/ttyS0 ;rawS0 10 27a1b4c0-8f8a-11e0-ad82-db6efbc4ba2e http://volkszaehler.org/demo/middleware.php /dev/ttyUSB2 -random 5 473d35b0-945b-11e0-beb1-918e8c2ce5a0 http://volkszaehler.org/demo/middleware.php 40 +random 3 52960fe0-8882-11e0-b356-85eba28c1922 http://localhost/workspace/volkszaehler.org/htdocs/middleware 40 +;random 7 473d35b0-945b-11e0-beb1-918e8c2ce5a0 http://volkszaehler.org/demo/middleware.php 10