IBM Tivoli Monitoring, Version 6.3

itmcmd execute

Description

Use the itmcmd execute command to run a user script or command when its execution requires the same environment settings as for a particular IBM® Tivoli® product. The itmcmd execute command does this by building the necessary environment settings for the intended script or command and then combining them into a temporary shell script before running it.

The process is similar to how the itmcmd agent command processes an agent startup, but unlike itmcmd agent, the itmcmd execute command does not spawn a subshell to run the script before deleting the script. Instead, itmcmd execute "sources" the temporary shell script in $install_dir/config/pc.sh so that the environment settings become available to the current shell, from which the user command is then also run as the last instruction.

You must run itmcmd execute on the platform architecture for which the agent is installed. To use this command, make sure that you are in the correct directory:
cd $install_dir/bin
where $install_dir is the location where you installed your IBM Tivoli software.

CLI syntax

itmcmd execute
                   [-h $install_dir]
                   [-k]
                   pc [command]

where:
-h
(Optional) Identifies the installation directory if it is not the one in which the script is located.

Also use this option to take action on a $install_dir other than the $install_dir in the current system.

-k
(Optional) Specifies that the temporary script created to run the user command is not to be deleted on completion. The name of the created script is displayed when the command is run.
pc [command]
Identifies the component (by product code) for which to run the command. The command argument is optional and specifies the fully qualified path to the script for which you want to build environment settings. To set the agent environment settings for the current console ksh shell, do not use the command argument.

CLI example

This example runs a script on the Tivoli Enterprise Portal Server to merge agent help into the Tivoli Enterprise Portal base help system.

   itmcmd execute cq helpmerg.sh  

Return values

An exit status of 0 indicates that the command executed successfully. An exit status greater than 0 indicates that there was a failure in the process.

Related commands

Return to Table 1.



Feedback