Using agent commands

The same scripts that you use to install monitoring agents are also used to check the status of an installed agent, stop or start it, or uninstall the agent.

About this task

The agent name and agent codes are provided for your reference.
Use the agent name in the following commands:
  • Linux or UNIX
    name-agent.sh
  • Windows
    name-agent.bat
where name is the name of the agent that is specified in Table 1.
Table 1. Agent names and agent codes
Monitoring agent name Two letter agent code
Amazon EC2 agent amazon_ec2 b5
Amazon ELB agent amazon_elb al
Azure Compute agent azure_compute ak
Cisco UCS agent ciscoucs v6
DataPower® agent datapower bn
Db2® agent db2 ud


DataStage® agent

datastage td


Hadoop agent

hadoop h8
Microsoft Hyper-V Server agent hyper-v hv
IBM® Integration Bus agent iib qi
JBoss agent jboss je
Linux OS agent os lz
Linux KVM agent linux_kvm v1


MariaDB agent


mariadb


mj

Microsoft .NET agent dotnet qe
Microsoft Cluster Server agent mscs q5


Microsoft Exchange Server agent


msexch


ex


Microsoft IIS agent

msiis q7


Microsoft Office 365 agent


microsoft_office365


mo


Microsoft SQL Server agent


mssql


oq

MongoDB agent mongodb ki
MySQL agent mysql se


NetApp Storage agent


netapp


nu

Oracle Database agent oracle_database rz
PostgreSQL agent postgresql pn


SAP agent

sap sa


SAP HANA Database agent

sap_hana s7


SAP NetWeaver Java™ Stack agent

sap_netweaver_java_stack sv


Skype for Business Server agent

skype for business server ql


Tomcat agent

tomcat ot
UNIX OS agent os ux
VMware VI agent vmware_vi vm
WebSphere® Applications agent was yn
WebSphere Infrastructure Manager agent wim d0
IBM MQ(formerly WebSphere MQ) agent mq mq
Windows OS agent os nt

Procedure

  • Linux or UNIX On the system where you want to send a command to the monitoring agent, change to the install_dir/bin directory, for example, /opt/ibm/apm/agent/bin. Enter any of the commands in Table 2, where name is the agent name that is specified in Table 1.
    Table 2. Commands for AIX® and Linux systems
    Command Description
    ./name-agent.sh status

    Checks the agent status. Status can be either running or not running. When the agent is running, the connection status between the agent and the Cloud App Management server is also checked. Possible negative connection statuses are: Connection failed, Error detected, and Disconnected-error. The positive status is Connected, this is the expected status. The transitional status is Connecting. A status of Unknown means that the agent status cannot be recognized, which is possibly due to errors in the file system or in the agent log file.

    ./name-agent.sh start Starts the monitoring agent. If the agent has instances, enter an instance name after the command.
    ./name-agent.sh stop Stops the agent. If the agent has instances, enter an instance name after the command.
    ./name-agent.sh prereqcheck Runs a prerequisite scan. This command option is available for most agents.
    ./name-agent.sh install Installs the monitoring agent.
    ./name-agent.sh config instance_name path_to_silent_config_file Configures the monitoring agent. Run the command from the install_dir/bin directory and add the response file path if required.

    If the agent has instances, enter an instance name. For more information about which agents are multiple instance agents, see the Table 1.

    The silent_config_file is optional. If you do not specify a file for silent configuration, you can configure the monitoring agent interactively by following the prompts.

    ./name-agent.sh uninstall Uninstalls the monitoring agent. For more information, see Uninstalling your agents.
    ./smai-agent.sh uninstall_all Uninstalls all the monitoring agents on the managed system.
    ./name-agent.sh remove instance_name Removes an instance of a multiple instance agent.
    ./name-agent.sh View a description of the functions that are available with the script.
  • Windows On the system or VM where you want to send a command to the monitoring agent, change to the install_dir\BIN directory at the command prompt, for example, C:\IBM\APM\BIN. Enter any of the commands in Table 3, where name is the agent name that is specified in Table 1.
    Table 3. Commands for Windows systems
    Command Description
    name-agent.bat status

    Checks the agent status.

    Checks the connection status between the agent and the Cloud App Management server. Possible negative connection statuses are: Connection failed, Error detected, and Disconnected-error. The positive status is Connected, this is the expected status. The transitional status is Connecting. A status of Unknown means that the agent status cannot be recognized, which is possibly due to errors in the file system or in the agent log file.

    name-agent.bat start Starts the monitoring agent. If the agent has instances, enter an instance name after the command.
    name-agent.bat stop Stops the agent. If the agent has instances, enter an instance name after the command.
    name-agent.bat prereqcheck Runs a prerequisite scan. This command option is available for most agents.
    name-agent.bat install Installs the monitoring agent.
    name-agent.bat config instance_name path_to_silent_config_file Configures the monitoring agent. Run the command from install_dir\BIN directory and add the response file path if required.

    If the agent has instances, enter an instance name. For more information about which agents are multiple instance agents, see the Table 1.

    The silent_config_file is optional. If you do not specify a file for silent configuration, you can configure the monitoring agent interactively by following the prompts.

    name-agent.bat uninstall Uninstalls the monitoring agent. For more information, see Uninstalling your agents.
    smai-agent.bat uninstall_all Uninstalls all monitoring agents on the managed system.
    name-agent.bat remove instance_name Removes an instance of a multiple instance agent.
    name-agent.bat View a description of the functions that are available with the script.

Agent version command

  • To see the version of an agent in your environment, run the following commands:
    • Linux or UNIX
      install_dir/bin/cinfo 
    • Windows
      install_dir\InstallITM\kincinfo