aboutsummaryrefslogtreecommitdiff
path: root/src/readconfig.c
AgeCommit message (Collapse)AuthorFiles
2009-05-30Adjust vertical axis as needed.HEADmasterSergey Poznyakoff1
* src/graph.c (default_monitor): New global. (find_max): New function. (draw_graph): Adjust max rate if requested. * src/grid.c (ygrid_create): Use mon->ystep_absolute to determine the type of grid. * src/readconfig.c (cb_monitor): Handle `monitor default'. (monitor_kw): New statements: max-adjust and y-step-absolute. (tagr_kw): Remove rate-units kw. * src/tagr.h (struct monitor): New members: max_adjust and ystep_absolute. (default_monitor): New extern.
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-28Move network code into a separate file. Introduce a proof-of-concept stream ↵Sergey Poznyakoff1
server. * src/server.c: New file * src/Makefile.am (tagr_SOURCES): Add server.c * TODO: Update. * etc/upgrade.awk: Update. * gnulib.modules: Add strtoumax. * src/main.c (listen_sockaddr, recv_buffer): Remove. (decode_buffer): Remove (see server.c) (get_port): Remove. (tagr_idle): New function. (main): Remove select loop. Use server functions instead. * src/readconfig.c: New configuration file statement "server". * src/tagr.h (listen_sockaddr, rateup) (port, progname): Remove. (tagr_server_type): New enum. (register_server, open_servers, close_servers) (server_loop, tagr_idle): New protos.
2009-04-27Provide i18n markersSergey Poznyakoff1
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-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-23BugfixesSergey Poznyakoff1
* src/main.c (read_input): Open and close the database. Fix scanf spec. Set log_to_stderr before opening the socket. * src/readconfig.c: Use callback for reading color specs. * src/tagr.h (use_stderr): Remove extern.
2009-04-22Bugfixes.Sergey Poznyakoff1
* src/log.c (vlogmsg): New function. (logmsg, verbose): Call vlogmsg. * src/main.c: Implement `reader' mode. * src/readconfig.c (readconfig): Initialize preprocessor command line before starting parsing. Initialize sd_base once the parsing finished. * src/report.c (report): Take timestamp as the second argument. * src/report.h: Likewise.
2009-04-21Minor changesSergey Poznyakoff1
2009-04-21Use "grecs" submodule for configuration parsing.Sergey Poznyakoff1
* Makefile.am (ACLOCAL_AMFLAGS): Add -I grecs/am. (SUBDIRS): grecs (ChangeLog): New rule. * ChangeLog: Rename to ChangeLog.svn * doc: Rename to etc. * etc/upgrade.awk: New file. * bootstrap.conf: Initialize "grecs". * configure.ac: Call GRECS_SETUP. (AC_CONFIG_FILES): Add grecs/Makefile and grecs/src/Makefile. * gnulib.modules: Add gitlog-to-changelog and sysexits. * src/Makefile.am (LDADD, INCLUDES): Add grecs. (AM_CPPFLAGS): Define additional variables. * src/log.c (use_stderr): Remove. Use log_to_stderr instead. (grecs_print_diag): New function. * src/main.c: Redo command-line support. (listen_sockaddr): New global. * src/readconfig.c: Rewrite. * src/tagr.h: Include sysexits.h and grecs.h (listen_sockaddr, log_to_stderr, pidfile): New externs. * src/main.c, src/stat.c, src/report.c: Use sysexits codes.
2008-07-11Reorganize project directory layout.Sergey Poznyakoff1
* README-hacking: New file. * src: New directory * src/Makefile.am: New file. * graph.c, readconfig.c, tagr.h, log.c, report.h, queue.c: Move to src * main.c: Move to src, fix a minor bug in main. * html.l: Move to src/html.lex.l. * html.y: Move to src/html.gram.y. * lib/argcv.c, lib/argcv.h: Move to src. * config, INSTALL: Remove * README_hacking: New file. * configure.ac, Makefile.am: Update for new gnulib and new directory structure. * bootstrap: Update from gnulib. * gnulib.modules: New file. * bootstrap.conf: New file. git-svn-id: file:///svnroot/tagr/trunk@89 7c378d0d-a4e4-4a64-9229-dfce8bfd23d4

Return to:

Send suggestions and report system problems to the System administrator.