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