f423da31d2
(#76 )
1.7 KiB
1.7 KiB
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
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
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
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)