This topic contains a summary of the start and stop commands for the 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 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 Machine Agent and run the non-JRE agent instead. For more information, see Install Using the Non-JRE Zip File.


Start the 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.

Stop the Machine Agent

Non-JRE Bundled Zip Archive

If the 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
CODE

 systemd: Use the systemd unit file as follows:

% systemctl stop appdynamics-machine-agent
CODE

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.

  1. Identify the agent process: ps -ef | grep machineagent.
    The output provides the process ID (PID) of the Machine Agent process.

  2. Stop the agent process: kill <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
CODE

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
CODE