]> Cypherpunks.ru repositories - govpn.git/blob - doc/stats.texi
[DOC] Add various concept indexes
[govpn.git] / doc / stats.texi
1 @node Stats
2 @cindex Stats
3 @cindex Statistics
4 @subsection Statistics
5
6 Both client and server has ability to show statistics about known
7 connected peers. You retrieve them by downloading JSON from built-in
8 background HTTP-server. You can enable it by specifying
9 @code{-stats host:port} argument.
10
11 Actually it is not full-fledged HTTP-server: it just accepts connection,
12 reads from it (does not parse anything) and writes dummy headers with
13 JSON document.
14
15 @verbatim
16 % govpn-server [...] -stats "[::1]:5678"
17 % curl http://localhost:5678/ | jq .
18 [
19   {
20     "HeartbeatSent": 1,
21     "HeartbeatRecv": 2,
22     "FramesDup": 0,
23     "FramesUnauth": 0,
24     "Addr": {
25       "Zone": "igb1",
26       "Port": 12989,
27       "IP": "fe80::221:ccff:feb9:ba7f"
28     },
29     "Id": "stargrave",
30     "LastPing": "2015-04-30T22:05:49.426616166+03:00",
31     "LastSent": "2015-04-30T22:05:49.426704138+03:00",
32     "BytesIn": 1392774,
33     "BytesOut": 17228877,
34     "FramesIn": 12412,
35     "FramesOut": 16588
36   }
37 ]
38 @end verbatim