On this page:
Related pages:
This topic contains a summary of the start and stop commands for the Standalone Machine Agent (Machine Agent). For information about required permissions, see Permissions Required to Run the Machine Agent.
Running the Standalone Machine Agent with a Non-Bundled JRE
If you want to run the Standalone Machine Agent with the default JRE on the machine (rather than the JRE bundled with the agent), the recommended workflow is to install a non-JRE version of the Standalone Machine Agent and run the non-JRE agent instead. For more information, see Install Using the Non-JRE Zip File.
Start the Standalone Machine Agent
RPM-based Linux Systems
If you installed using the Linux RPM, start the Machine Agent as follows:
- SysV systems:
service appdynamics-machine-agent start
- systemd systems: Use the Machine Agent service launcher as follows:
systemctl start appdynamics-machine-agent
Linux and Solaris Systems
If you installed using the JRE bundled zip archive for Linux and Solaris, run the launcher as follows:
- Linux:
<machine_agent_home>/bin/machine-agent -d -p <machine_agent_home>/pidfile
- Solaris:
<machine_agent_home>/bin/machine-agent -d -p <machine_agent_home>/pidfile
Windows Systems
See Windows Install Using ZIP with Bundled JRE.
Mac OS X
There are two ways to start the Machine Agent on OS X:
- Run
<machine_agent_home>/bin/machine-agent
(just like the instructions for Linux). - Start the Machine Agent as a service:
- The command:
<machine_agent_home>/osx-install.sh
creates<machine_agent_home>/com.appdynamics.machineagent.plist
and starts the Machine Agent service.
To modify the configuration, see Mac OS X Install Using the ZIP with Bundled JRE. Theosx-install.sh
script uses<machine_agent_home>/com.appdynamics.machineagent.plist.template
to generate<machine_agent_home>/com.appdynamics.machineagent.plist.
- If the service is not running, but has been installed earlier, then restart it using the command:
launchctl load -w <machine_agent_home>/com.appdynamics.machineagent.plist
.
To change the configuration modify<machine_agent_home>/com.appdynamics.machineagent.plist
before running the launchctl command.
Note that runningosx-install.sh
at this point overwrites the<machine_agent_home>/com.appdynamics.machineagent.plist
, which is probably not desired.
- The command:
launchctl Command and plist Files
The Mac OS X manual pages include information about the launchctl
command and plist
files. This information is only relevant if you are running the Machine Agent as a service on OS X.
To view this information:
- launchctl: on the command line enter:
man launchctl
- plist files: on the command line enter:
man launchd.plist
Stop the Standalone Machine Agent
Non-JRE Bundled Zip Archive
If the Standalone Machine Agent process is running in the background, you can stop it by simply entering the kill command with the process ID as the argument. If it is running in the foreground in a console, you can press Ctrl+C to shut down the agent.
RPM-based Linux Systems
SysV: Use the service launcher as follows:
% service /etc/init.d/appdynamics-machine-agent stop
systemd: Use the systemd unit file as follows:
% systemctl stop appdynamics-machine-agent
Linux and Solaris systems
Running in the Foreground: Press Ctrl-c to stop the agent process.
Running in the Background: identify the process id and use the kill command.
Identify the agent process:
ps -ef | grep machineagent.
The output provides the process ID (PID) of the Machine Agent process.Stop the agent process: k
ill <machine_agent_PID>
.
Windows
In the foreground in a console window: Use Ctrl+C to shut down the agent.
As a Windows Service: Stop the service using either of the following methods:
- In the Windows Services application, select AppDynamics Machine Agent and click Stop.
- Use the MachineAgentService command as follows:
C:\> <machine_agent_home>\bin\MachineAgentService.exe /stop
Mac OS X
As a background process: enter the kill command with the process ID as the argument.
As a service: From the bash command line:
> sudo launchctl unload -w <machine_agent_home>/com.appdynamics.machineagent.plist