aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'sebastian/bug2497' into maint-0.2.2Nick Mathewson2011-04-28
|\
| * Don't report empty bw-history lines in extrainfoSebastian Hahn2011-04-19
| | | | | | | | | | | | | | | | | | | | | | Some tor relays would report lines like these in their extrainfo documents: dirreq-write-history 2011-03-14 16:46:44 (900 s) This was confusing to some people who look at the stats. It would happen whenever a relay first starts up, or when a relay has dirport disabled. Change this so that lines without actual bw entries are omitted. Implements ticket 2497.
* | fix some comments before they create conflictsRoger Dingledine2011-04-26
| |
* | Fix compilation in last patchNick Mathewson2011-04-26
| |
* | Fix more of bug 2704Sebastian Hahn2011-04-26
| | | | | | | | | | | | The last entry of the *Maxima values in the state file was inflated by a factor of NUM_SECS_ROLLING_MEASURE (currently 10). This could lead to a wrong maximum value propagating through the state file history.
* | Prevent hugely inflated observed bandwidth valuesSebastian Hahn2011-04-19
| | | | | | | | | | | | | | | | | | When reading the bw history from the state file, we'd add the 900-second value as traffic that occured during one second. Fix that by adding the average value to each second. This bug was present since 0.2.0.5-alpha, but was hidden until 0.2.23-alpha when we started using the saved values.
* | Don't sometimes undercount bw averageSebastian Hahn2011-04-19
|/ | | | | This fixes the first part of bug 2704. It should occur only rarely when no bw maxima are known. Bugfix on 0.2.2.23-alpha. Fixes bug 2704.
* Free circuits_for_buffer_stats on shutdownNick Mathewson2011-04-07
|
* Fix up some cell-queue stats issues in rephist.cNick Mathewson2011-04-07
| | | | | | | | - Document the structure and variables. - Make circuits_for_buffer_stats into a static variable. - Don't die horribly if interval_length is 0. - Remove the unused local_circ_id field. - Reorder the fields of circ_buffer_stats_t for cleaner alignment layout.
* Merge remote-tracking branch 'public/xxx_fixups' into maint-0.2.2Nick Mathewson2011-04-07
|\ | | | | | | | | Conflicts: src/or/or.h
| * Triage the XXX022 and XXX021 comments remaining in the codeNick Mathewson2011-03-25
| | | | | | | | | | Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate.
* | Use timevals, not time_t, when expiring circuits.Nick Mathewson2011-03-30
|/ | | | | | | | | | | | | | We've got millisecond timers now, we might as well use them. This change won't actually make circuits get expiered with microsecond precision, since we only call the expiry functions once per second. Still, it should avoid the situation where we have a circuit get expired too early because of rounding. A couple of the expiry functions now call tor_gettimeofday: this should be cheap since we're only doing it once per second. If it gets to be called more often, though, we should onsider having the current time be an argument again.
* Remove a useless doxygen commentNick Mathewson2011-03-16
|
* Clarify threat description and avoid negative uptimes.Nick Mathewson2011-03-11
|
* Use observed instead of declared uptime for HSDirSebastian Hahn2011-03-11
| | | | | | | | It is important to verify the uptime claim of a relay instead of just trusting it, otherwise it becomes too easy to blackhole a specific hidden service. rephist already has data available that we can use here. Bugfix on 0.2.0.10-alpha.
* Merge remote branch 'sebastian/bug1035' into maint-0.2.2Nick Mathewson2011-03-08
|\
| * clarify an assertSebastian Hahn2011-02-26
| | | | | | | | also log about running changes, even on a bridge authority.
| * Routers count as down when they change ORPort, tooSebastian Hahn2011-02-08
| | | | | | | | | | | | | | | | | | | | rransom noticed that a change of ORPort is just as bad as a change of IP address from a client's perspective, because both mean that the relay is not available to them while the new information hasn't propagated. Change the bug1035 fix accordingly. Also make sure we don't log a bridge's IP address (which might happen when we are the bridge authority).
| * Fix spelling and an unused #defineSebastian Hahn2011-02-07
| | | | | | | | both noticed by rransom
| * Fix compile without warnings on OS X 10.6Sebastian Hahn2010-12-27
| |
| * Handle negative run lengths in wfu/mtbf calculationsNick Mathewson2010-11-22
| |
| * Treat routers whose IPs have changed as having been down for MTBF/routerinfoNick Mathewson2010-11-22
| | | | | | | | calculation purposes.
* | Avoid spurious bwhist parsing failuresNick Mathewson2011-03-01
| | | | | | | | | | | | | | | | | | | | This should fix a bug that special ran into, where if your state file didn't record period maxima, it would never decide that it had successfully parsed itself unless you got lucky with your uninitialized-variable values. This patch also tries to improve error messags in the case where a maximum value legitimately doesn't parse.
* | Fix two potential bugs in the bug1863 code.Karsten Loesing2011-02-24
| |
* | fix some spelling in rephist commentsNick Mathewson2011-01-10
| |
* | Add Maxima lists to bandwidth state.Nick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | | | Right now, Tor routers don't save the maxima values from the bw_history_t between sessions. That's no good, since we use those values to determine bandwidth. This code adds a new BWHist.*Maximum set of values to the state file. If they're not present, we estimate them by taking the observed total bandwidth and dividing it by the period length, which provides a lower bound. This should fix bug 1863. I'm calling it a feature.
* | On bwhist state load failure, clear dir_read/write hist tooNick Mathewson2011-01-10
| |
* | Fix bug when parsing bwhist with unexpected IntervalNick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, our state parsing code would fail to parse a bwhist correctly if the Interval was anything other than the default hardcoded 15 minutes. This change makes the parsing less incorrect, though the resulting history array might get strange values in it if the intervals don't match the one we're using. (That is, if stuff was generated in 15 minute intervals, and we read it into an array that expects 30 minute intervals, we're fine, since values can be combined pairwise. But if we generate data at 30 minute intervals and read it into 15 minute intervals, alternating buckets will be empty.) Bugfix on 0.1.1.11-alpha.
* | Turn the loop bodies of rep_hist_save/load_state into functionsNick Mathewson2011-01-10
| | | | | | | | | | | | | | The trick of looping from i=0..4 , switching on i to set up some variables, then running some common code is much better expressed by just calling a function 4 times with 4 sets of arguments. This should make the code a little easier to follow and maintain here.
* | Fix a function formatting warning in rephist.cNick Mathewson2011-01-03
| |
* | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
|\ \ | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * | Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | comment karsten's bug2196 patch a littleNick Mathewson2010-11-29
| | |
* | | Report only the top 10 ports in exit-port stats.Karsten Loesing2010-11-24
| |/ |/|
* | Try harder not to exceed the 50 KB extra-info descriptor limit.Karsten Loesing2010-11-15
| | | | | | | | | | | | Our checks that we don't exceed the 50 KB size limit of extra-info descriptors apparently failed. This patch fixes these checks and reserves another 250 bytes for appending the signature. Fixes bug 2183.
* | Merge commit 'karsten/dirbytes2'Nick Mathewson2010-08-18
|\ \ | | | | | | | | | | | | Conflicts: src/or/rephist.h
| * | Count bytes we spend on answering directory requests.Karsten Loesing2010-08-18
| | |
* | | Give rep_hist_exit_stats_history() a better name.Karsten Loesing2010-08-15
| | |
* | | Fix memory leak spotted by Nick.Karsten Loesing2010-08-15
| | |
* | | Refactor exit port statistics code and add unit tests.Karsten Loesing2010-08-11
|/ /
* | Move exit-stats code to the end of rephist.c.Karsten Loesing2010-08-05
| |
* | Allow enabling or disabling *Statistics while Tor is running.Karsten Loesing2010-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we stop scheduling when we should write statistics using a single timestamp in run_scheduled_events(). Instead, we remember when a statistics interval starts separately for each statistic type in geoip.c and rephist.c. Every time run_scheduled_events() tries to write stats to disk, it learns when it should schedule the next such attempt. This patch also enables all statistics to be stopped and restarted at a later time. This patch comes with a few refactorings, some of which were not easily doable without the patch.
* | Create rephist.hSebastian Hahn2010-07-27
| |
* | Create config.hSebastian Hahn2010-07-27
| |
* | Create circuituse.hSebastian Hahn2010-07-27
| |
* | Create circuitlist.hSebastian Hahn2010-07-27
| |
* | Create routerlist.hSebastian Hahn2010-07-27
| |
* | Create router.hSebastian Hahn2010-07-27
| |
* | Merge branch 'asprintf'Nick Mathewson2010-04-02
|\ \
| * | Tweak users of snprintf to use asprintf where appropriateNick Mathewson2010-02-28
| | |