summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-09-21 13:33:42 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-09-22 11:20:57 +0200
commit14c3f6e51b2830f7bcaa595f9ce1838d1b963826 (patch)
tree830c061f3c16c34362ff7ccf683ac6a0f494dafb /configure.ac
parent6fa702170e9420139b047a8817ee978f6fcbd916 (diff)
downloadconnman-14c3f6e51b2830f7bcaa595f9ce1838d1b963826.tar.gz
connman-14c3f6e51b2830f7bcaa595f9ce1838d1b963826.tar.bz2
connman-14c3f6e51b2830f7bcaa595f9ce1838d1b963826.zip
Store stats information into separate files
Currently the statistic information is stored into the profile file. This results in rewriting the whole file if connann_stats_save is called. This results in too many disk I/Os for low power devices. Furthermore, only the current value is stored. There is no way to find out how many bytes have been transfered in the last month. First, each service statistic is stored into a separate files under /var/lib/connman having a *.data extension. This file contains fixed sized records of stats counters and will be mmap into memory. It is used like a ring buffer. If the buffer is full or after a certain period (e.g. a month), the raw data will be summerized into the *.info file. Currently the summary is not implented yet. This will be implemented in the next round of patches.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 24c61ff4..6dc3546b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,17 @@ fi
AM_CONDITIONAL(NTPD, test "${enable_ntpd}" != "no")
AM_CONDITIONAL(NTPD_BUILTIN, test "${enable_ntpd}" = "builtin")
+AC_ARG_WITH(stats-max-file-size, AC_HELP_STRING([--with-stats-max-file-size=SIZE],
+ [Maximal size of a statistics round robin file]),
+ [stats_max_file_size=${withval}])
+
+if (test -z "${stats_max_file_size}"); then
+ # default size is 512 kByte
+ stats_max_file_size="512 * 8 * 128"
+fi
+
+AC_DEFINE_UNQUOTED([STATS_MAX_FILE_SIZE], (${stats_max_file_size}), [Maximal size of a statistics round robin file])
+
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GLib >= 2.16 is required))
AC_SUBST(GLIB_CFLAGS)