Query node status
Guus Sliepen
guus at tinc-vpn.org
Tue Dec 4 09:17:40 CET 2012
On Tue, Dec 04, 2012 at 09:53:47AM +1100, Andrew Cowie wrote:
> > To filter you should
> > check the fifth bit of the status field.
>
> Is there any reason this can't be made human readable? I mean, printing
> out the bitfield is fine for debugging if you're someone who knows the
> code, but for people just trying to use the software,
>
> ... options c status 0018 ...
>
> has never really been that helpful. Always wondered what it meant. It
> would be terrific to know whether it meant nodes were reachable?
> Bi-directional connection? Actually handling traffic right now?
In tinc 1.1, if you want human readable information you can use the "tincctl
info" command. The result is something like this:
[root at foo]~>tincctl info bar
Node: bar
Address: 192.0.43.10 port 655
Online since: 2012-12-03 09:03:36
Status: validkey visited reachable udp_confirmed
Options: pmtu_discovery clamp_mss
Protocol: 17.0
Reachability: directly with UDP
PMTU: 1459
Edges: baz foo quux
Subnets: 10.0.0.42/32 fec0:0:0:0:0:0:0:42/128
And to see real-time traffic statistics, use "tincctl top":
[root at foo]~>tincctl top
Tinc Nodes: 4 Sort: name Current
Node IN pkts IN bytes OUT pkts OUT bytes
bar 15 998 48 63216
baz 0 0 0 0
foo 48 63216 15 998
quux 0 0 0 0
> > I'll try to improve the tincctl command to make it easier to get a list of only
> > online nodes. That is the most frequent use case in my experience,
With the latest version of the 1.1 branch from git, you can now do:
tincctl dump reachable nodes
> right after "am I connected to the mesh yet?"
That is not a well-defined question. Better questions are: "is node X
reachable" or "are there more than N nodes reachable". But now you can get the
answer with the command mentioned above and grep or wc.
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20121204/71eff3be/attachment.pgp>
More information about the tinc
mailing list