IBM Performance Management

Uninstalling your agents

Uninstall a single agent or all the agents from a managed system.

Before you begin

For the following agents, an agent-specific task must be completed before you complete the uninstallation procedure:
  • For the Monitoring Agent for HTTP Server, you must delete the Include statement in the http.conf file, for example, "Include "/opt/ibm/apm/agent/tmp/khu/kvm65s2_8044.conf", before restarting the IBM® HTTP server.
  • For the Monitoring Agent for Python, run install_dir/lx8266/pg/bin/uninstall.sh to remove injection codes before you uninstall the agent.
  • For the Monitoring Agent for PHP, run install_dir/bin/lx8266/pj/lib/uninstall.instance_name.sh to move injection codes before you uninstall the agent.
  • For the Monitoring Agent for WebSphere® Applications, you must unconfigure the data collector for all monitored server instances before you uninstall the agent. Follow the instructions in WebSphere Applications agent: Unconfiguring the data collector.
  • For the Node.js agent, you must remove the monitoring plug-in from your Node.js application before you uninstall the agent. Follow the instructions in Node.js agent: Removing the monitoring plug-in.
  • For the Microsoft .NET agent, you must remove the data collector from your .NET applications before you uninstall the agent. Follow the instructions in Microsoft .NET agent: Removing the .NET data collector.
  • For the IBM Integration Bus agent, if you configured transaction tracking for brokers with the agent provided user exit, you must remove the user exit before you uninstall the agent. Follow the instructions in Removing the KQIUserExit user exit.

About this task

The Oracle agent on Windows systems can be uninstalled only by using the command prompt.

Procedure

  1. On the VM or system where the monitoring agent (or agents) is installed, start a command line and change to the binary directory:
    • Linux or AIXinstall_dir/bin
    • Windowsinstall_dir\BIN
    where install_dir the installation directory of the monitoring agent or agents.
  2. To uninstall a specific monitoring agent, enter the agent script name and the uninstall option where name is the agent script name:
    • Linux or AIX./name-agent.sh uninstall
    • Windowsname-agent.bat uninstall
    For a list of the agent script names, see Using agent commands.
    Remember: For the Monitoring Agent for Microsoft .NET, you must run the command with Administrator privileges.

    The monitoring agent is uninstalled from the managed system.

    If you have uninstalled all of your monitoring agents individually, complete the next step to remove the framework files.

  3. To uninstall all the monitoring agents from the managed system with a confirmation prompt, enter the script name and uninstall all option:
    • Linux or AIX./smai-agent.sh uninstall_all
    • Windowssmai-agent.bat uninstall_all
    A confirmation prompt is displayed, type 1 to continue, or type 2 to cancel. All monitoring agents are uninstalled from the system or VM.
  4. Linux or AIXOn Linux, and AIX®, to force the uninstall of all the monitoring agents without a prompt for confirmation, enter the script name and the force uninstall all option: ./smai-agent.sh uninstall_all force

What to do next

For the Monitoring Agent for HTTP Server, after you uninstall the agent, you must remove the following files manually:
  • /tmp/khu_cps.properties
  • /tmp/httpserver-disc.error
For the Monitoring Agent for Python:
  1. Delete the Django pyc configuration file to ensure the restored Django pyc file generates its binary.
  2. Restart the Apache server to remove the loaded middleware in the Apache processes.
For the Monitoring Agent for Ruby, to uninstall the diagnostics data collector:
  1. Navigate to the home directory of your application, open its Gemfile, and remove the following line from the file: gem 'stacktracer'
  2. Restart your Ruby on Rails application.
  3. Uninstall the diagnostics data collector. Enter: gem uninstall Gemfile
  4. Remove the runtime directory of the data collector. The default location of this directory is install_dir/install-images/kkm/dchome
For the Monitoring Agent for Microsoft .NET, complete these steps:
  1. Remove the data collector dll files using one of the following options:
    • Reboot your operating system.
    • Try to delete the file install_dir\qe\bin64\CorProfLog.dll.

      A File in Use dialog is displayed. It identifies the .NET processes that are currently running.

    • Restart each of the .NET processes.
  2. Restart your .NET applications.