diff options
author | Sergey Poznyakoff <gray@Pirx.gnu.org.ua> | 2009-04-28 16:27:03 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@Pirx.gnu.org.ua> | 2009-04-28 16:27:03 +0300 |
commit | 20d7f1d7e051c6b021a3f5d088985a74c3370b29 (patch) | |
tree | 5c5dc1c1b401e055096b8ec216a6bd97eb76a520 /src/tagr.h | |
parent | 29e4b3da0990aca9db232dc3ce0a57722ccf1cac (diff) | |
download | tagr-20d7f1d7e051c6b021a3f5d088985a74c3370b29.tar.gz tagr-20d7f1d7e051c6b021a3f5d088985a74c3370b29.tar.bz2 |
Store timestamps. Implement zero-unknown option.
* src/graph.c (draw_graph): Use timestamps from queue entries.
Implement zero_unknown_option.
* src/output.c: Store timestamps in traffic_history entries.
* src/readconfig.c (cb_monitor, cb_server): Fix checks for
empty ID.
(tagr_kw): New keyword cut-out-fraction.
(readconfig): Reset cut_out_fraction if it is < 1.0.
* src/report.c: Print timestamps.
* src/stat.c (cut_out_fraction): New variable.
(ovf_t, overflow): Remove (spurious now) arguments.
(interpolate, overflow, update_stats): Don't interpolate if
time interval between this sample and the lastly taken one
is greater than step * cut_out_fraction.
* src/tagr.h (TAGR_CUT_OUT): New define.
Diffstat (limited to 'src/tagr.h')
-rw-r--r-- | src/tagr.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -25,6 +25,7 @@ #define TAGR_PIDFILE "/var/run/tagr.pid" #define TAGR_DBNAME "tagr.db" #define TAGR_DBMODE 0600 +#define TAGR_CUT_OUT 1.5 #define _(s) gettext (s) #define N_(s) s @@ -48,6 +49,7 @@ extern int log_to_stderr; extern char *pidfile; extern unsigned update_interval; extern int single_process_option; +extern double cut_out_fraction; extern char *user; extern char *basedir; @@ -76,13 +78,10 @@ extern int color_percent[3]; extern char **number_suffix; extern size_t number_suffix_count; -void assign_string (char **pstr, const char *s); -void assign_string_n (char **pstr, const char *s, size_t length); - int readconfig (void); void config_help (void); void define_symbol (char *s); -void decode_buffer (); + struct monitor *find_monitor (const char *name); struct monitor *find_monitor_id (const char *id); @@ -166,6 +165,7 @@ void verbose (int level, const char *fmt, ...); struct traffic_history { + time_t time; double inrate; double outrate; }; |