aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.c
AgeCommit message (Collapse)Author
2021-10-20relay: Overload state on DNS timeout is now X% over Y secsDavid Goulet
With this commit, we will only report a general overload state if we've seen more than X% of DNS timeout errors over Y seconds. Previous behavior was to report when a single timeout occured which is really too small of a threshold. The value X is a consensus parameters called "overload_dns_timeout_scale_percent" which is a scaled percentage (factor of 1000) so we can represent decimal points for X like 0.5% for instance. Its default is 1000 which ends up being 1%. The value Y is a consensus parameters called "overload_dns_timeout_period_secs" which is the time period for which will gather DNS errors and once over, we assess if that X% has been reached ultimately triggering a general overload signal. Closes #40491 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-13relay: Move "overload-general" from extra-info to server descriptor.Alexander Færøy
Fixes #40364 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-18Terminate rep_hist_get_overload_stats_lines() with an NL.tor-0.4.6.1-alphaNick Mathewson
We use it in router.c, where chunks are joined with "", not with NL... so leaving off the terminating NL will lead to an unparseable extrainfo. Found by toralf. Bug not in any released Tor.
2021-03-17Fix compiler warning about signed/unsigned conversion.George Kadianakis
``` src/feature/stats/rephist.c: In function ‘overload_happened_recently’: src/feature/stats/rephist.c:215:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (overload_time > approx_time() - 3600 * n_hours) { ``` from https://gitlab.torproject.org/tpo/core/tor/-/issues/40341#note_2729364
2021-03-17Merge branch 'mr/334'George Kadianakis
2021-03-17Rate-limit counter should increase once per minute.George Kadianakis
2021-03-17Implement backbone of overload statistics.George Kadianakis
- Implement overload statistics structure. - Implement function that keeps track of overload statistics. - Implement function that writes overload statistics to descriptor. - Unittest for the whole logic.
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-19hs: Remove v2 statsDavid Goulet
We still keep v2 rendezvous stats since we will allow them until the network has entirely phased out. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-23Revert HSv3 stats string formatting to its old %u self.George Kadianakis
The rest of rephist.c is doing the same kind of unsigned casting. For example see rep_hist_format_buffer_stats() and rep_hist_format_exit_stats(). The previous switch to %ld made Appveyor fail: https://ci.appveyor.com/project/torproject/tor/builds/36118502
2020-11-17Merge branch 'tor-gitlab/mr/182' into masterDavid Goulet
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-11-03Add more docs about the HSv3 stat collection period.George Kadianakis
2020-11-03Improve string formatting in rep_hist_format_hs_stats().George Kadianakis
2020-11-03Switch v3_onions_seen_this_period to digest256map_t.George Kadianakis
2020-11-03Abstract v2/v3 "format stats to str" logic into a single function.George Kadianakis
2020-11-03Abstract v2/v3 "write stats to file" logic into a single function.George Kadianakis
2020-11-03Write unittests for v3 metrics.George Kadianakis
2020-11-03Introduce v3 stat formatting functions.George Kadianakis
They will be merged with the v2 ones in later commits.
2020-11-03Introduce generic HS stats methods that apply to v2 and v3.George Kadianakis
2020-11-03Implement support for "v3 rend traffic" stat.George Kadianakis
2020-11-03Implement support for "unique v3 onions" stat.George Kadianakis
2020-11-03Introduce v3_stats_t structure and some of its methods.George Kadianakis
2020-11-02Make room for v3: Complete move from hs_stats_t to hs_v2_stats_t.George Kadianakis
2020-11-02Make room for v3: s/hs_stats/hs_v2_stats/George Kadianakis
2020-11-02Make room for v3: Rename rephist objects to signify they are v2-only.George Kadianakis
2020-07-10Change connstats.c identifers to start with conn_statsNick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ rep_hist_conn_stats_init conn_stats_init \ rep_hist_note_or_conn_bytes conn_stats_note_or_conn_bytes \ rep_hist_reset_conn_stats conn_stats_reset \ rep_hist_format_conn_stats conn_stats_format \ rep_hist_conn_stats_write conn_stats_save \ rep_hist_conn_stats_term conn_stats_terminate \ bidi_map_free_all conn_stats_free_all
2020-07-10Split bidi connection-stats code into a new C file.Nick Mathewson
2020-07-10Split bandwidth history functions into a separate C file.Nick Mathewson
These are logically independent from the rest of rephist, and make more sense in isolation. The next patch will rename them too.
2020-07-01control: Add a key to GETINFO to fetch the circuit onion handshake rephist ↵Neel Chauhan
values
2020-03-05Merge branch 'clang_format_prep_3'Nick Mathewson
2020-02-10Use semicolons after HT_PROTOTYPE and HT_GENERATE.Nick Mathewson
2020-02-10stats: Fix a function comment typo in rephist.cteor
Comment-only change.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-14Rework rep_hist_log_link_protocol_counts()rl1987
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-25Extract all the "am I a server" functions from router.cNick Mathewson
2018-09-25Move all authdir_mode_*() functions into authmode.hNick Mathewson
2018-09-25Move self-test functionality into its own file.Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-18Merge branch 'bug23512-v4-033' into bug23512-v4-masterMike Perry
2018-09-12Merge remote-tracking branch 'tor-github/pr/280'Nick Mathewson
2018-09-04Merge branch 'bug24104_029_squashed'Nick Mathewson
2018-08-19Rework predicted_ports_prediction_time_remaining() to fix CID 1438153rl1987
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.