Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

# The list of IP addresses is given as a space separated list


Code Block
languagebash
titleonos-instances
$ export ONOS_INSTANCES="10.192.19.111 10.192.19.112 10.192.19.113"

The tool also accesses the ONOS REST API to collect logs and for this it requires the REST API username and password credentials. These credentials can be provided either via ONOS_WEB_USER and ONOS_WEB_PASSWD environment variables or via command options (see usage below)

...

Once enabled, the onos-diagnostics tool can be run as follows:

Code Block
languagebash
titleonos-diagnostics
$ onos-diagnostics

There is an option that allows for naming the resulting archive file for differentiation between different cluster instances, e.g.

# This will produce archive file /tmp/delta-pod-diags.tar.gz

$ onos-diagnostics -n delta-pod

Code Block
languagebash
titleonos-diagnostics
$ onos-diagnostics -n delta-pod

The resuling resulting /tmp/*-diags.tar.gz file gz file will contain all relevant information about the ONOS cluster.

The following is the usage help for the onos-diagnostics tool:

Code Block
languagebash
titleonos-diagnostics
usage: onos-diagnostics [-x] [-n name] [-u user] [-p password] [ip1 ip2...]

usage: onos-diagnostics [-x] [-n name] [-u user] [-p password] [ip1 ip2...]

Environment Variables:

   ONOS_INSTANCES    IPs or hostnames of ONOS cluster machines

...

   ONOS_WEB_PASS     password for REST API

Example Usages:

   # Collect compressed diagnostics for the cluster.

...

   # The cluster node IPs will be drawn from ONOS_INSTANCES variable.   >

Code Block
languagebash
titleonos-diagnostics
$ onos-diagnostics

   # Collect diagnostics for the cluster and leave them extracted.

...

   # The cluster node IPs will be drawn from ONOS_INSTANCES variable.   >

Code Block
languagebash
titleonos-diagnostics
onos-diagnostics -x -n prague -u onos -p rules

   # Collect compressed diagnostics for a cluster.

...

   # The cluster node IPs are listed explicitly.   >

Code Block
languagebash
titleonos-diagnostics
onos-diagnostics -u onos -p rules 172.17.0.11 172.17.0.12 172.17.0.13