Sudo Versus Non-Sudo Access (on Linux)
You can run the Agent Installer with or without sudo
.
sudo
command to install the
agents for all users in your system.This table describes the differences between sudo
and
non-sudo
:
sudo Installation | Non-sudo Installation | |
---|---|---|
Description | Installs the agents on all supported processes for all users in your system. | Installs the agents for the current user only. |
Automatic Instrumentation Process | By default, integrates with
systemd to ensure the agents
always run. See Customize the Agent Installer to
override this behavior. |
Auto-instruments processes that are started
by the installing user, running under a Linux
shell such as bash . |
Instrument systemd-Managed Processes in a Non-sudo Environment
To enable the instrumentation of a
systemd
-managed application process
in non-sudo
Agent Installer
Platform installations, the profile of the
systemd
service responsible used
to load the application process must define the
LD_PRELOAD
environment variable
using the path to the decorator library.
The actual path varies based on the operating system and
product installation directory. This example shows
an updated Apache Tomcat systemd
service profile on CentOS 7:
$ grep LD_PRELOAD /etc/systemd/system/apache-tomcat-7.service Environment=LD_PRELOAD=/home/centos/appdynamics/zeroagent/lib64/libpreload.so
After the profile has been updated, you must reload the
systemctl
daemon and restart the
application for the changes to take effect:
$ sudo systemctl daemon-reload
$ sudo systemctl restart apache-tomcat-7.service