BLCLI command results


The execution of a CLI command can either succeed or fail.

Success

When you successfully execute a CLI command, the CLI prints the result to standard output. The result is printed without any trailing line breaks, unless the result itself contains line breaks. For scripting, it can be useful to copy the result from standard output and put it in an environment variable for later use. In this way, you can incorporate CLI commands into shell scripts for programmatic interaction with BMC BladeLogic.

A successful CLI command exits with an exit code of 0.

Failure

When a CLI command fails, the CLI prints an error message to standard error output. A failed CLI command exits with an exit code of 1.

Log file

The BLCLI prints its log file to the following locations:

  • (Windows) The log is stored in the user preferences folder. For example, on Windows, the location is %APPDATA%\BladeLogic\blcli.log
  • (UNIX) The log is stored in <home_directory>/.bladelogic/blcli.log.

To view the log path, you can run the following command:

blcli_execute BLCLIConfig logFilePath

You configure the log file by updating the blcli-log.cf file that is available at the same location. For example, you can set logging to debug level as demonstrated in the following video:

icon-play2x.png https://youtu.be/vZSK3xRukgI

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*