Tor
0.4.7.0-alpha-dev
|
Collect status information and log heartbeat messages. More...
#include "core/or/or.h"
#include "core/or/circuituse.h"
#include "app/config/config.h"
#include "feature/dirclient/dirclient.h"
#include "core/or/status.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
#include "feature/relay/router.h"
#include "feature/relay/routermode.h"
#include "core/or/circuitlist.h"
#include "core/mainloop/mainloop.h"
#include "feature/stats/rephist.h"
#include "feature/hibernate/hibernate.h"
#include "app/config/statefile.h"
#include "feature/hs/hs_stats.h"
#include "feature/hs/hs_service.h"
#include "core/or/dos.h"
#include "feature/stats/geoip_stats.h"
#include "app/config/or_state_st.h"
#include "feature/nodelist/routerinfo_st.h"
#include "lib/tls/tortls.h"
Go to the source code of this file.
Macros | |
#define | STATUS_PRIVATE |
#define | FULLNESS_PCT_THRESHOLD 80 |
#define | TLS_OVERHEAD_THRESHOLD 15 |
Functions | |
static void | log_accounting (const time_t now, const or_options_t *options) |
STATIC int | count_circuits (void) |
STATIC char * | secs_to_uptime (long secs) |
STATIC char * | bytes_to_usage (uint64_t bytes) |
static void | log_onion_service_stats (void) |
void | note_connection (bool inbound, int family) |
int | log_heartbeat (time_t now) |
Collect status information and log heartbeat messages.
This module is responsible for implementing the heartbeat log messages, which periodically inform users and operators about basic facts to do with their Tor instance. The log_heartbeat() function, invoked from main.c, is the principle entry point. It collects data from elsewhere in Tor, and logs it in a human-readable format.
Definition in file status.c.
STATIC char* bytes_to_usage | ( | uint64_t | bytes | ) |
Take bytes and returns a newly allocated human-readable usage string.
Definition at line 79 of file status.c.
Referenced by log_heartbeat().
STATIC int count_circuits | ( | void | ) |
Return the total number of circuits.
Definition at line 44 of file status.c.
Referenced by log_heartbeat().
int log_heartbeat | ( | time_t | now | ) |
|
static |
void note_connection | ( | bool | inbound, |
int | family | ||
) |
STATIC char* secs_to_uptime | ( | long | secs | ) |
Take seconds secs and return a newly allocated human-readable uptime string.
Definition at line 52 of file status.c.
Referenced by log_heartbeat().