Skip to content

Usage

Yanic provides several commands:

  • import
  • query
  • serve

Import

RRD-File

Warning, just tested with olddata.rrd from Freifunk Bremen generated by detailed-rrds branch of ffmap-backend

1
2
3
4
5
6
7
8
9
Usage:
  yanic import <file.rrd> [flags]

Examples:
  yanic import --config /etc/yanic.toml olddata.rrd

Flags:
  -c, --config string   Path to configuration file (default "config.toml")
  -h, --help            help for import

Firstseen

To import firstseen values there is a little script in contrib:

/opt/go/src/github.com/FreifunkBremen/yanic/contrib/yanic-import-timestamp -n path/to/nodes_old.json -s state.json /var/lib/yanic/state.json

On a productive system @ once:

systemctl stop yanic; cp /var/lib/yanic/state.json /var/lib/yanic/state.bak; /opt/go/src/github.com/FreifunkBremen/yanic/contrib/yanic-import-timestamp -n path/to/nodes_old.json -s /var/lib/yanic/state.json; systemctl start yanic;

Serve

runs yanic in collector-modus to genereate files (e.g. for meshviewer) and save values in databases

from shell

1
2
3
4
5
6
7
8
9
Usage:
  yanic serve [flags]

Examples:
  yanic serve --config /etc/yanic.toml

Flags:
  -c, --config string   Path to configuration file (default "config.toml")
  -h, --help            help for serve

or run as daemon

Query

Send a single request and show response like gluon-neighbour-info on gluon.

e.g. to check the right interface

1
2
3
4
5
6
7
8
9
Usage:
  yanic query <interface> <destination> [flags]

Examples:
  yanic query wlan0 "fe80::eade:27ff:dead:beef"

Flags:
  -h, --help       help for query
      --wait int   Seconds to wait for a response (default 1)