Admin Tool

Overview

The AdminTool is a lightweight tool that provides the ability for invoking commands on a running XVM or Application. It is intended primarily for use by developers; dedicated administrative tools are recommended for production use cases. The AdminTool discovers running XVMs and connects to them over TCP via their advertised XVM acceptor.

Running The Admin Tool

The AdminTool can be found in the nvx-talon or nvx-core-all jar. And can be invoked as follows:

java -Dnv.discovery.descriptor=<xvm-discovery-descriptor> -cp "libs\*" com.neeve.tools.AdminTool

__   __      _____  _            _______ ______ ____  _____  __  __
\ \ / /     |  __ \| |        /\|__   __|  ____/ __ \|  __ \|  \/  |
 \ V /      | |__) | |       /  \  | |  | |__ | |  | | |__) | \  / |
  > <       |  ___/| |      / /\ \ | |  |  __|| |  | |  _  /| |\/| |
 / . \      | |    | |____ / ____ \| |  | |   | |__| | | \ \| |  | |
/_/ \_\     |_|    |______/_/    \_\_|  |_|    \____/|_|  \_\_|  |_|
XVM Admin Tool                             nvx-talon v3.12 (build 7)
                               Copyright(c) 2019 Neeve Research, LLC
                                                 All Rights Reserved
Type 'help' for the list of commands
admin>

... where the libs folder contains the talon jar and its dependencies. The same discovery descriptor used by the XVM must be specified when launching the tool as the AdminTool discovers running XVMs and connects to them via the acceptor that each XVM has broadcast.

Listing Running XVMs

The 'xvms' command can be used to see which XVMs have been discovered:

List Apps in an XVM

The list of apps loaded in an XVM can be determined by using the 'admin' which invokes a command on the XVM that returns the list of loaded apps.

List App Commands

The list of apps loaded in an XVM can be determined using the listAppCommand command as follows. The following shows an example of listing the commands for the perfdriver app shown to be running in the perfdriver-1 XVM in the example above.

Invoking an App Command

A command on an application can be invoked using the invoke command. The following shows an example of invoking the getAuthorizationRequestCount listed in the section above.

Command Reference

Tool Properties

The following properties can be set using set <Property Name> <Property Value>:

Property Name
Default Value
Description

commandTimeout

30.0s

Sets the timeout to wait for a command response. If no unit suffix is specified the value is interpreted as SECONDS

connectHandshakeTimeout

1.5s

The connect timeout. If no unit suffix is specified the value is interpreted as SECONDS

longCommandDisplayThreshold

5.0s

Commands that take longer than the given time will result in the tool outputting their execution time. If no unit suffix is specified the value is interpreted as SECONDS

stacktraces

false

Whether or not command exception stacktraces should be dumped

Commands

listXvms | xvms

Shows available XVMs

disconnect

Closes currently open admin connections

connect

Connects to an XVM

listAppCommands

List commands for an XVM or an app hosted by a XVM

invoke

Sends a command to a XVM or an app hosted by a XVM

admin

Sends a command to a XVM or an app hosted by a XVM

General Commands

get

Gets a configuration or environment property

reset

Reset a configuration or environment property to its default value

set

Sets a configuration or environment property

stacktraces

Sets whether or not command exception stacktraces should be shown

history

Displays command history

help

Displays help message

ansi

Enables or disables ansi output

echo

Displays a message or turns echo on or off

script

Runs a command script

bye | exit | quit

Exit the tool.

Next Steps

  1. Configure discovery to match your XVM deployment

  2. Launch Admin Tool and discover running XVMs

  3. Connect to target XVM

  4. List applications and their available commands

  5. Invoke commands interactively or via scripts

Last updated