IBM Support

How to uninstall APM DB2® Agent that was installed and configured as a non-root instance user

Question & Answer


Question

The following document has the information how to install agents as a non-root user.
Installing agents as a non-root user
https://www.ibm.com/support/knowledgecenter/SSHLNR_8.1.4/com.ibm.pm.doc/install/uninstall_agents.html
However, the following document does not mention anything about non-root user and there is no documents how to uninstall agents that were installed and configured as a non-root user.
Uninstalling your agents
https://www.ibm.com/support/knowledgecenter/SSHLNR_8.1.4/com.ibm.pm.doc/install/uninstall_agents.html
Is there a specific way to uninstall APM DB2® Agent that was installed and configured as a non-root instance user?

Answer

Use the steps in (a) or (b).
(a) If you want to uninstall APM DB2® Agent that was installed and configured as a non-root instance user, do the following steps.
1. Remove instance as the non-root instance user
<install_dir>/bin/db2-agent.sh remove <instance_name>
2. Uninstall APM DB2® Agent as the non-root instance user
<install_dir>/bin/db2-agent.sh uninstall
3. Update auto restart script as root user
<install_dir>/bin/UpdateAutoRun.sh
The sample is following:
# su - db2inst1
Last login: Fri May 22 13:30:21 JST 2020 on pts/5
$
$ /home/db2inst1/apm/agent/bin/db2-agent.sh remove db2inst1
Removing instance db2inst1 of Monitoring Agent for DB2...
Do you want to continue [1 - yes, 2 - no, "1" is default]?
Sourcing db2profile for user db2inst1
Processing. Please wait...
Stopping Monitoring Agent for DB2 ...
Monitoring Agent for DB2 was stopped gracefully.
Instance db2inst1 removed.
$
$ /home/db2inst1/apm/agent/bin/db2-agent.sh uninstall
 
*********** Fri May 22 13:42:11 JST 2020 ******************
User      : db2inst1     Group: db2iadm1
Host name : linux02     Installer Lvl:08.14.00.01
Home  : /home/db2inst1/apm/agent
***********************************************************
Monitoring Agent for DB2 for platform Linux x86_64 R2.6, R3.0 (64 bit) removed from /home/db2inst1/apm/agent
uninstall.sh warning: You have to be a root user to update auto restart script. Execute /home/db2inst1/apm/agent/bin/UpdateAutoRun.sh as root.
All agents are uninstalled. In order to uninstall any remaining monitoring components execute: /home/db2inst1/apm/agent/bin/smai-agent.sh uninstall_all
$
$ exit
logout
# /home/db2inst1/apm/agent/bin/UpdateAutoRun.sh
Automatic start at system initialization has been configured.
Automatic stop at system shutdown has been configured.
#
(b) If you want to uninstall all the components as well as APM DB2® Agent, do the following steps.
1. Remove instance as the non-root instance user
<install_dir>/bin/db2-agent.sh remove <instance_name>
2. Uninstall all the components as the non-root instance user
<install_dir>/bin/smai-agent.sh uninstall_all
The sample is following:
# su - db2inst1
Last login: Fri May 22 13:30:21 JST 2020 on pts/5
$
$ /home/db2inst1/apm/agent/bin/db2-agent.sh remove db2inst1
Removing instance db2inst1 of Monitoring Agent for DB2...
Do you want to continue [1 - yes, 2 - no, "1" is default]?
Sourcing db2profile for user db2inst1
Processing. Please wait...
Stopping Monitoring Agent for DB2 ...
Monitoring Agent for DB2 was stopped gracefully.
Instance db2inst1 removed.
$
$ /home/db2inst1/apm/agent/bin/smai-agent.sh uninstall_all
Uninstalling all components...
The following components will be uninstalled:
    IBM Monitoring Shared Libraries
    IBM GSKit Security Interface
    Monitoring Agent for DB2
Installation directory /home/db2inst1/apm/agent will be removed.
Do you want to continue [1 - yes, 2 - no, "1" is default]?
 
*********** Fri May 22 13:55:21 JST 2020 ******************
User      : db2inst1     Group: db2iadm1
Host name : linux02     Installer Lvl:08.14.00.01
Home  : /home/db2inst1/apm/agent
***********************************************************
Removing: /home/db2inst1/apm/agent
uninstall.sh warning: Purging /home/db2inst1/apm/agent
root user access is required to remove automatic restart files
Password:
Uninstallation completed successfully
$

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJUL","label":"IBM Application Performance Management"},"ARM Category":[{"code":"a8m500000008axBAAQ","label":"APM Agents"}],"ARM Case Number":"TS003731124","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"8.1.4","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
30 May 2020

UID

ibm16218224