Running CLI commands

You can run CLI commands from any directory. It is simplest to run commands from the directory where the .jar file is stored because you don't have to specify the path to the .jar file. If you do specify the path, it must be enclosed in quotes.

Syntax

java -jar <filename> -ip <LCC-IP> -u <username> -p <password> --<command-name>

where:

  • -jar = the name of the CLI .jar file.
  • -ip <LCC-IP]> = the IP address of the LCC node
  • -u <username> = your username
  • -p <password> = your password (use -ep if your password was encrypted with the encrypt command)
  • --<command-name> = the command name and any associated parameters.

Example commands

The following example shows how to execute a command from the directory where .jar file is stored.

java -jar TS4500CLI.jar -ip 9.22.55.88 -u username -p pwd --viewNodeCards
java -jar DiamondbackCLI.jar -ip 9.22.55.88 -u username -p pwd --viewNodeCards

The following example shows how to execute a command when the .jar file is in a different directory. The quotes are required.

java -jar "C:\Program Files\IBM\TS4500CLI.jar" -ip 9.22.55.88 -u username -p pwd --viewNodeCards
java -jar "C:\Program Files\IBM\DiamondbackCLI.jar" -ip 9.22.55.88 -u username -p pwd --viewNodeCards