net-spider-rpl-cli: CLI executable of NetSpider.RPL.

[ bsd3, database, library, program ] [ Propose Tags ]

CLI executable of NetSpider.RPL. It's also an example of NetSpider.CLI module.

This package is an experimental release. CLI interface and functionality may change drastically in future.

For detail, see

[Skip to Readme]


Automatic Flags

Static link


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,
Change log
Dependencies base (>= && <4.16), fgl (>= && <5.8), greskell (>= && <1.3), monad-logger (>= && <0.4), net-spider (>= && <0.5), net-spider-cli (>= && <0.3), net-spider-rpl (>= && <0.5), net-spider-rpl-cli, optparse-applicative (>= && <0.17), text (>= && <1.3), time (>= && <1.10), transformers (>= && <0.6), unordered-containers (>=0.2.8 && <0.3) [details]
License BSD-3-Clause
Author Toshio Ito <>
Maintainer Toshio Ito <>
Category Database
Home page
Bug tracker
Source repo head: git clone
Uploaded by debugito at 2022-01-02T07:17:16Z
Executables net-spider-rpl-cli
Downloads 2314 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-01-02 [all 1 reports]

Readme for net-spider-rpl-cli-

[back to package description]


An executable of net-spider specialized for analyzing RPL networks.


Here is an example of using the Docker images of this package. You have to install docker and docker-compose first.

  1. Start the graph database backend (i.e. Gremlin Server).

     $ docker-compose up -d
  2. Clear the entire database.

     $ ./ clear
  3. Input logs about RPL networks.

     $ ./ input - < syslog
  4. Get a snapshot graph of the RPL network in GraphML format.

     $ ./ snapshot --time-to '2019-09-20T10:43:08' --starts-from 'fd00::212:eeaa:0077:2f9c' > snapshot.graphml


net-spider-rpl-cli is a tool to analyze evolution of an RPL network. It collects "local findings" about the network topology from RPL nodes, and stores those data into a graph database. Then you can query the database to get a "snapshot graph", a network topology at the specified time.

For general description about net-spider and its terminology, see net-spider README.

For details on command-line options, run the tool with --help option.

Build and install

net-spider-rpl-cli is a regular Haskell package with an executable. You can install it from hackage repository.

Or, you can just use the pre-built Docker image.

Graph database

net-spider-rpl-cli stores time-varying topology of an RPL network into a graph dabase via the Gremlin Server. You have to set up the server, and pass the server's hostname and port to --host and --port options, respectively.


net-spider-rpl-cli has the folowing sub-commands.

clear command

clear command clears the entire database. Use with care.

input command

input command reads log files, extracts information about the RPL network topology with timestamps and stores them into the database.

Currently, the format of the log files must be logs of rpl-lite module of Contiki-NG operating system, prefixed with the standard syslog header. See this test file for an example.

There are two kinds of RPL network topology: the DIO (upward) graph and the DAO (downward) graph. input command extracts and stores both kinds of information.

snapshot command

snapshot command queries the database to make a "snapshot graph", an RPL network topology observed at the specified time. You can specify a time range with --time-from and --time-to options, and then it makes a snapshot graph using only those input information observed during the time range.

To run this command, you have to specify --starts-from option at least one time. This is the IPv6 address of the node from which it searches for a snapshot graph. Usually this should be the address of the DODAG root.

It prints the obtained snapshot graph to STDOUT in GraphML format. The graph includes both DIO and DAO graphs, but you can distinguish them by link_type attribute of edges.

cis command

cis command is a short for "clear + input + snapshot". It clears the database, inputs the specified log files and returns a snapshot graph.

With this command, you don't have to specify --starts-from option (it's ignored.) Instead, all IPv6 addresses observed in the input log files are searched.

Docker image

We provide pre-built Docker images of net-spider-rpl-cli and the graph database.

  • The Docker image of the graph database is specified in docker-compose.yml in this directory.

    • You can start it with docker-compose up command.
    • The "db" directory stores persistent graph data.
  • The Docker image of net-spider-rpl-cli is available at Docker Hub as debugito/net-spider-rpl-cli.

  • To run the net-spider-rpl-cli image with the graph database image, use "" script in this directory.


Toshio Ito