author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 28 Oct 2007 15:46:58 +0000 (16:46 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 28 Oct 2007 15:46:58 +0000 (16:46 +0100) | ||
commit | aed8c4a152fc95c52fb913834b847942eadc2c67 | |
tree | ea607896292c6cc3e36e5815e2466cdb3f583584 | tree | snapshot |
parent | bc6790409971d84b1c8aa7201667c869e155e03b | commit | diff |
src/utils_cache.[ch]: Added a global cache for all values that are dispatched.
The cache translates counter values to gauge values using the last counter
value available. This can then be used to check against threshold values, as
we'll need to do for monitoring functionality.
Right now the cache doesn't do much: It sits there and caches the values, but
is not yet ever queried. The already implemented (but so far unused) function
`uc_get_rate' returns an array of gauge_t values.
The longterm goal is to have the network, rrdtool and unixsock plugins use this
cache, too. This will require some `plugin specific' data with appropriate
control structures and, which is likely the hardest part, some clever locking
for all that.
The cache translates counter values to gauge values using the last counter
value available. This can then be used to check against threshold values, as
we'll need to do for monitoring functionality.
Right now the cache doesn't do much: It sits there and caches the values, but
is not yet ever queried. The already implemented (but so far unused) function
`uc_get_rate' returns an array of gauge_t values.
The longterm goal is to have the network, rrdtool and unixsock plugins use this
cache, too. This will require some `plugin specific' data with appropriate
control structures and, which is likely the hardest part, some clever locking
for all that.
src/Makefile.am | diff | blob | history | |
src/plugin.c | diff | blob | history | |
src/utils_cache.c | [new file with mode: 0644] | blob |
src/utils_cache.h | [new file with mode: 0644] | blob |