In This Section

Overview

To assist in diagnosing issues with discovery, the platform bundles a command line tool for working with discovery.

 

 

 

Running The DiscoveryTool

The tool can be launched directly from an nvx-core-all jar or nvx-talon-all jar, so long as you also include the jars / classes containing required by the provider (such as message bus classes and the platform's default third party dependencies)

 

cd <path-to-logs-directory>
java -cp <your-app-classpath> com.neeve.tools.DiscoveryTool[-h] [initial-discovery-cache-descriptor]

DiscoveryTool
  An interactive tool that enables a user to interactively work with discovery
  caches

Usage:
  DiscoveryTool [-h] [<initialCacheDescriptor>] 
       [<-h|--help> Displays this help message (default='false')]
       [initialCacheDescriptor: The initial discovery cache to open]

 

Properties

The following properties can be set in the tool to change its functionality. 

Property NameDefault ValueDescription
longCommandDisplayThreshold5Commands that take longer than the given time in seconds will result in the tool outputting their execution time.
stacktracesfalseWhether or not command exception stacktraces should be dumped

Commands

The commands that can be used in the tool are listed below. 

 

get

Looks up an entity in the discovery cache
Usage:
  get [-h] <type> <name> 

       [<-h|--help> Displays this help message (default='false')]
       type: The type of entity to add
       name: The name of the entity to add

            

reset

Reset a configuration or environment property to its default value
Usage:
  reset [-h] <propName> 

       [<-h|--help> Displays this help message (default='false')]
       propName: The name of property to reset. '*' resets all properties
           to their default value.

            

set

Sets a configuration or environment property
Usage:
  set [-h] [<propName>] [<propValue>] 

       [<-h|--help> Displays this help message (default='false')]
       [propName: The name of property to set, if no name is set config
           properties are listed]
       [propValue: The value of the property to set. If omitted clears the
           property]

            

stacktraces

Sets whether or not command exception stacktraces should be shown
Usage:
  stacktraces [-h] <enabled> 

       [<-h|--help> Displays this help message (default='false')]
       enabled: <off|on|false|true> Indicates whether or not command
           exceptions should be displayed

            

history

Displays command history
Usage:
  history [-h] [-c] [<n>] 

       [<-h|--help> Displays this help message (default='false')]
       [<-c|--clear> Clears command history]
       [n: lists only the last 'n' lines default='1000']

            

help

Displays help message
Usage:
  help [-h] [<command>] 

       [<-h|--help> Displays this help message (default='false')]
       [command: When specifies displays help for that command only]

            

ansi

Enables or disables ansi output
Usage:
  ansi [-h] [<value>] 

       [<-h|--help> Displays this help message (default='false')]
       [value: <off|on> Turns ansi on or off. With no argument display the
           current ansi setting]

            

echo

Displays a message or turns echo on or off
Usage:
  echo [-h] [<value>] 

       [<-h|--help> Displays this help message (default='false')]
       [value: Displays a message or turns echo on or off. With no argument
           list the current echo setting]
       [message: A message to display default='']

            

script

Runs a command script
Usage:
  script [-h] [<script>] 

       [<-h|--help> Displays this help message (default='false')]
       [script: The script file to execute]

            

bye | exit | quit

Exit the tool.
Usage:
  bye [-h] 

       [<-h|--help> Displays this help message (default='false')]

            

add

Adds an entity to the discovery cache
Usage:
  add [-h] <type> <name> 

       [<-h|--help> Displays this help message (default='false')]
       type: The type of entity to add
       name: The name of the entity to add
       descriptor: The connection descriptors to broadcast for the entity

            

close

Closes the currently open discovery cache
Usage:
  close [-h] [<cacheDescriptor>] 

       [<-h|--help> Displays this help message (default='false')]
       [cacheDescriptor: The discovery cache descriptor to open.]

            

open

Opens a discovery cache
Usage:
  open [-h] [<cacheDescriptor>] 

       [<-h|--help> Displays this help message (default='false')]
       [cacheDescriptor: The discovery cache descriptor to open. If not
           specified the default cache descriptor will be used.]