aboutsummaryrefslogtreecommitdiff
path: root/src/output.c
AgeCommit message (Collapse)AuthorFiles
2009-04-30Grid step is double-precision.Sergey Poznyakoff1
* src/grid.c (struct grid): vmin, vmax and cur are double. All uses updated. * src/output.c (add_stats): Add zero stats if the queue is empty. * src/readconfig.c: The argument to y-step is double. * src/tagr.h (struct monitor.ystep): Change to double. (struct grid_class.next): Return double. (grid_next): Return double. (grid_create): Change proto. * src/graph.c: Update grid_next return values.
2009-04-29Fix locking issues. Improve stream interface.Sergey Poznyakoff1
* gnulib.modules: Add c-type, c-strcase, crypto/md5, xgetdomainname, xgethostname. * src/Makefile.am (tagr_SOURCES): Add apop.c, udb.c, xhostname.c * src/graph.c (draw_graph): Rename `now' to `start'. * src/main.c (hostname, rebuild_last_option): New globals. (main): Init hostname. * src/output.c (update_output): Change semantics of the last parameter. * src/readconfig.c (cb_facility): Use c_strcasecmp. (tagr_kw): New keywords: hostname, udb-file, lock-count, lock-timeout, idle-timeout. * src/report.c: Fix locking issues. (update_monitor): Change semantics of the last parameter. (rebuild): Likewise. * src/server.c: Rewrite stream interface. * src/tagr.h (TAGR_ARG_UNUSED, TAGR_PRINTFLIKE): New macros. (lock_retry_count_option, lock_retry_timeout_option) (stream_idle_timeout, hostname): New declarations. (TAGR_UPD_FORCE, TAGR_UPD_LASTTIME): New defines. (trim_crlf, tagr_local_hostnamem tagr_auth_init, tagr_auth) (tagr_udb_name) (udb_get_passwordudb_free_password): New declarations. * TODO: Update
2009-04-28Store timestamps. Implement zero-unknown option.Sergey Poznyakoff1
* 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.
2009-04-26Introduce formats in preprocessor variables.Sergey Poznyakoff1
* configure.ac: Version 1.9.90 * NEWS: Likewise. * etc/Makefile.am (EXTRA_DIST): Add logfilter.awk uptmpl.sed * etc/logfilter.awk: New file * etc/uptmpl.sed: New file * etc/tagr.tmpl: Update * etc/upgrade.awk: Add copyleft header * gnulib.modules: Add fprintftime. * src/graph.c (rate_unit): Change to "Bytes per Second". (number_suffix, number_suffix_count): Move to grid.c * src/html.gram.y: Work with formats. * src/html.lex.l: Likewise. * src/output.c (update_output): Store NOW as a number and provide a formatting function for it. * src/tagr.h (union value, value_format_fn): New types. (pp_value_t): New members: fmt, format (add_numeric_value, add_string_value): Change return type. (init_value): New proto.
2009-04-26Improve graphical presentation. Other bugfixes.Sergey Poznyakoff1
* src/graph.c (draw_graph): Cut off values of Y greater than YMAX Use scale_sample to prepare data. * src/grid.c (ygrid_create): New function. (ygrid_next): Use data prepared by ygrid_create. * src/main.c (change_user): Bugfix. Update calls to open_db Move log initialization to the proper place. * src/output.c (scale_sample): New function. (add_stats): Use scale_sample to prepare data. (cb_monitor): Initialize scale and ystep. (cb_double): New function. (monitor_kw): New keywords: scale, y-step and swap. * src/report.c (open_db): Take an argument specifying whether the database will be written to. All callers updated. * src/tagr.h (struct monitor): New members: scale, ystep and swap. max_rate is ulong. (TAGR_DB_RD, TAGR_DB_WR): New macros. (open_db): Update proto. (scale_sample): New proto.
2009-04-25More bugfixes.Sergey Poznyakoff1
* Makefile.am (SUBDIRS): Add etc. * etc/Makefile.am: New file. * src/html.gram.y (create_html): Bugfixes. (add_value): Replace existing entry, if found. * src/log.c (log_facility, log_tag, log_print_severity): New variables. * src/main.c (sig_child): Collect all terminated subprocesses. (main): Redo syslog initialization. Use daemon. * src/output.c (add_stats): Exit immediately if the queue is empty. (update_output): Redefine some symbols unconditionally. * src/readconfig.c: Logging configuration. * src/tagr.h (log_facility, log_tag, log_print_severity): New variables.
2009-04-25BugfixesSergey Poznyakoff1
* AUTHORS: Update emails. * NEWS: Update. * gnulib.modules: Add version-etc * src/main.c: Implement --version. * src/output.c, src/tagr.h, src/html.gram.y: Add missing protos and includes. * configure.ac, Makefile.am: Add etc * etc/Makefile.am: New file.
2009-04-25Bugfixes.Sergey Poznyakoff1
* src/html.gram.y (write_symtab): Bugfix. * src/main.c: Implement restart. (main): Implement UNIX sockets. * src/output.c (do_update_output): Bugfix. * src/readconfig.c (free_monitors): New function. * src/report.c (update_monitor): Take third argument. (rebuild): Take an argument. * src/tagr.h (update_interval): New extern. (rebuild): Update proto.
2009-04-25Normalize terminology.Sergey Poznyakoff1
* etc/upgrade.awk: Translate "router" to "monitor". Divide max rate by 8. * src/graph.c (rate_unit): New global. (draw_graph): Take monitor as an argument. Make rate units configurable. * src/readconfig.c (find_router, find_router_id): Rename to find_monitor, find_monitor_id. Rename "router" section to "monitor". New statement "rate-units", allowed both at top level and within a monitor. * src/tagr.h (HostData): Rename to monitor. Add new field: rate_unit. Rename `max' to `max_rate'. Remove t, in, out. (rate_unit): New declaration. (find_router, find_router_id): Rename to find_monitor, find_monitor_id. (struct last_sample): Rename to struct traffic_sample. * src/output.c, src/report.c, src/stat.c: Update
2009-04-25Switch to GPLv3+Sergey Poznyakoff1
2009-04-25Build html pagesSergey Poznyakoff1
* src/html.gram.y (read_symtab, write_symtab): Re-add. * src/output.c: Update images only when needed or requested. Build html page and symbol table. * src/report.c (update_router): Update_output takes four args. * src/tagr.h: Likewise.
2009-04-25Finish implementation of draw_graph.Sergey Poznyakoff1
* src/grid.c: New file. * src/Makefile.am (tagr_SOURCES): Add grid.c * src/graph.c: Finish implementation of draw_graph. * src/output.c: Update calls to draw_graph. * src/report.c (update_router): Use tr->last.time when updating graphs. * src/tagr.h (grid_t, struct grid_class): New types. (grid_create, grid_next, grid_destroy): New protos. (grid_class_y, grid_class_x_2h, grid_class_x_wday) (grid_class_x_week, grid_class_x_month): New externs. (draw_graph): Change prototype.
2009-04-24Fix statistics gathering algorithm. Start implementing drawing functions.Sergey Poznyakoff1
* src/output.c: New file. * src/Makefile.am (tagr_SOURCES): Add output.c * src/graph.c (draw_graph): New function. * src/main.c (mkfilename): Allow for suffix=NULL * src/report.c (tr_init): Set queue sizes to exactly the number of the corresponding samples. (update_output): New function. (rebuild): Implement * src/stat.c (interpolate): Avoid interpolation if time span is less than the step. Use queue_put to store the data and always call the overflow procedure, if supplied. (overflow): Fix condition. (compute_avg): New function. (ovf_monthly, ovf_weekly, ovf_daily): Add verbose diagnostics. (_convert): Additional argument: overflow function. (convert_yearly, convert_monthly, convert_weekly): Compute the average. Add verbose diagnostics. (convert_daily): Add verbose diagnostics. * src/tagr.h (update_output, draw_graph): New protos.

Return to:

Send suggestions and report system problems to the System administrator.