Tivoli Monitoring, Version 6.2

itmcmd agent

Description

Use the itmcmd agent command to start and stop a monitoring agent. You can start or stop one agent, all agents, or multiple agents. You can also start the portal server and portal desktop client using this command.

You must run the itmcmd agent command on the architecture for which the agent is installed.

To start or stop agents for distributed database agent, see itmcmd dbagent. However, the itmcmd agent command can start and stop agents for distributed databases, it just cannot select monitors for individual database servers or activate debugging options.

Note:
The monitoring agent can run using a non-root user ID on UNIX® and Linux® systems. This can be done by running the itmcmd agent start command while logged in as a non-root user. If the agent is running using a non-root user ID, and then the itmcmd agent start is run using the root user ID, then the monitoring agent subsequently runs as the root user. To confirm the user ID that the monitoring agent is using, run the following command:
itm_install/bin/cinfo -r

If the agent is using root, and that is not the desired user ID, then use the following steps to restart the agent:

  1. Log in as root.
  2. Run the itmcmd agent stop command.
  3. Log in (or 'su') to the user ID that you want the agent to run as.
  4. Run the itmcmd agent start command.

If the agent was running as root because of a system reboot, then edit the startup file using the following steps so that the appropriate user ID is used the next time the system is rebooted:

  1. Look at install_dir/registry/AutoStart, and get NUM.
  2. Edit the autostart for your operating system:

    The location of the startup file is platform dependent as follows:

    • AIX®: /etc/rc.itmNUM
    • HP-UX: /sbin/init.d/ITMAgentsNUM
    • Linux: /etc/init.d/ITMAgentsNUM
    • Solaris: /etc/init.d/ITMAgentsNUM
  3. Add entries for your operating system using the following command:
    /usr/bin/su - instancename 
    -c "install_dir/bin/itmcmd agent 
    -h install_dir 
    -o instancename 
    start product_code"
    Where:
    instancename
    Name of the instance
    install_dir
    Name of the directory
    product_code
    2-character product code for the agent, for example, agent code for the monitoring agent

    Examples:

    • For AIX, add entries with the following format:
      su - USER -c " /opt/IBM/ITM/bin/itmcmd agent 
      -o INSTANCE start agent_code"
      Where:
      USER
      Name of the user
      INSTANCE
      Name of the instance
    • For Linux, HP_UX, and Solaris, add entries with the following format:
      /bin/su - USER -c " /opt/IBM/ITM/bin/itmcmd agent 
      -o INSTANCE start agent_code >/dev/null 2>&1"
      Where:
      USER
      Name of the user
      INSTANCE
      Name of the instance
  4. Repeat Steps 1 through 3 for all occurrences of stop.
  5. Save the file.

CLI syntax

itmcmd agent {start|stop} {pc ...|all}
              [-f]
              [-l]
              [-h install_dir ]
              [-o instance ]
              [-p option ]
              [-c]
              [-s]

where:

start|stop {pc ...|all}
Indicates to start or stop the monitoring agent. You can start or stop one or more agents by using the product codes (for example, specifying lz um starts the Linux monitoring agent and the Universal Agent). To start or stop all agents on the computer, use the all option.

See cinfo to identify the product code for an agent or component.

-f
Starts or stops an agent without user confirmation.
Note:
When stopping an agent, this option must be entered before the stop option or you will receive an error. For example:
itmcmd agent -p INST1 -f stop um
-l
Deletes the log file associated with the monitoring agent that is being stopped. By default, the log file is saved when the monitoring agent is stopped.
-h install_dir
(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 an IBM Tivoli Monitoring installation directory other than the one in the current system.

-o instance
Identifies a database instance to start or stop. You must use this option if you are starting or stopping a DB2® agent.
-p option
Identifies a Universal Agent instance to start or stop. Use this option when you are starting or stopping a non-default instance of the Universal Agent.
-c
(Optional) Indicates that the configuration file used on agent startup should not be updated or regenerated. By default, this file is updated each time the agent is started.
-s
(optional) Used to specify safe mode operation.

Safe mode invokes the JRE with the -nojit option (no just-in-time compiler). If you encounter a Java™ failure error, try running the command as before, but also specifying the -s option.

CLI example

The following example starts the Universal Agent:

   itmcmd agent start um

The following example stops a non-default instance (inst1) of the Universal Agent:

   itmcmd agent -p INST1 stop um

The following example starts the portal server:

   itmcmd agent start cq

Return values

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

Note:
The log file for the agent session is always saved, regardless of whether the agent was stopped using the itmcmd agent command or any other means, unless you use the -l parameter when you run the itmcmd agent command. Additionally, when the agent is stopped using the itmcmd agent command, the log file for that session ends with the following message:
   "** Process terminated by user **"

Related commands

itmcmd server

cinfo (to determine the product codes for agents and components)




Feedback

[ Top of Page | Previous Page | Next Page | Contents | Index ]