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:

  • (Microsooft Windows) The log is stored in the user preferences folder. For example, on Windows XP this is in C:\Documents and Settings\<user_name>\Application Data\BladeLogic\blcli.log.
  • (UNIX) The log is stored in <home_directory>/.bladelogic/blcli.log.

You control this log file through the blcli-log.cf file in the same location. For example, through this configuration file you can set logging to debug level, as demonstrated in the following video:

  https://youtu.be/vZSK3xRukgI

Was this page helpful? Yes No Submitting... Thank you

Comments