X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcollectd.h;h=582d524a50fa563bfea95d5a3345c4022ef3b5b4;hb=ed3b4a8fe6377817e1dadfbc713c4cc5c0bc4444;hp=7f163bd51e24ee8024db416381301d79df3147cb;hpb=cc0d31d626faaedad019aa9a68bea64cbeefc7e2;p=collectd.git diff --git a/src/collectd.h b/src/collectd.h index 7f163bd5..582d524a 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -35,8 +35,8 @@ # include #endif #if STDC_HEADERS -#include -#include +# include +# include #else # if HAVE_STDLIB_H # include @@ -95,6 +95,12 @@ # endif #endif +#if HAVE_ASSERT_H +# include +#else +# define assert(...) /* nop */ +#endif + #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) @@ -118,6 +124,9 @@ #if HAVE_CTYPE_H # include #endif +#if HAVE_SYS_PARAM_H +# include +#endif #if HAVE_SYSLOG # define syslog(...) syslog(__VA_ARGS__) @@ -137,31 +146,21 @@ # define closelog(...) /**/ #endif -#ifndef HAVE_RRD_H -#undef HAVE_LIBRRD +#if HAVE_KSTAT_H +# include #endif -#ifdef HAVE_LIBRRD -#include -#endif /* HAVE_LIBRRD */ - -/* Won't work without the header file */ -#ifndef HAVE_KSTAT_H -#undef HAVE_LIBKSTAT +#if HAVE_RRD_H +# include #endif - -#ifdef HAVE_LIBKSTAT -#include -#include -#endif /* HAVE_LIBKSTAT */ - -/* Won't work without the header file */ -#ifndef HAVE_STATGRAB_H -#undef HAVE_LIBSTATGRAB +#if HAVE_PTH_H +# include #endif - -#ifdef HAVE_LIBSTATGRAB -#include +#if HAVE_STATGRAB_H +# include +#endif +#if HAVE_SENSORS_SENSORS_H +# include #endif #ifndef PACKAGE_NAME @@ -188,15 +187,40 @@ #define PIDFILE PREFIX "/var/run/" PACKAGE_NAME ".pid" #endif +#ifndef LOGFILE +#define LOGFILE PREFIX"/var/log/"PACKAGE_NAME"/"PACKAGE_NAME".log" +#endif + #ifndef PLUGINDIR #define PLUGINDIR PREFIX "/lib/" PACKAGE_NAME #endif #define MODE_SERVER 0x01 #define MODE_CLIENT 0x02 -#define MODE_LOCAL 0x03 +#define MODE_LOCAL 0x04 + +#ifndef COLLECTD_STEP +# define COLLECTD_STEP "10" +#endif + +#ifndef COLLECTD_HEARTBEAT +# define COLLECTD_HEARTBEAT "25" +#endif + +#ifndef COLLECTD_ROWS +# define COLLECTD_ROWS "1200" +#endif + +#ifndef COLLECTD_XFF +# define COLLECTD_XFF 0.1 +#endif extern time_t curtime; + +#ifdef HAVE_LIBRRD extern int operating_mode; +#endif + +/* int main (int argc, char **argv); */ #endif /* COLLECTD_H */