• Log inStart now

Start, stop, and restart the infrastructure agent

The infrastructure agent starts automatically after you run the installation script. However, there are situations where you may need to manually restart the agent (for example, after changing your agent configuration).

Want to try out our infrastructure agent? Create a New Relic account for free! No credit card required.

Linux: Start, stop, restart, or check agent status

For Linux, ensure you use the correct command for your init system. Select start, stop, restart, or status as appropriate:

  • SystemD (Amazon Linux 2, SLES 12, CentOS 7 or higher, Debian 8 or higher, RHEL 7 or higher, Ubuntu 15.04 or higher):

    sudo systemctl <start|stop|restart|status> newrelic-infra
  • System V (Debian 7, SLES 11.4, RHEL 5):

    sudo /etc/init.d/newrelic-infra <start|stop|restart|status>
  • Upstart (Amazon Linux, RHEL 6, Ubuntu 14.04 or lower):

    sudo initctl <start|stop|restart|status> newrelic-infra

Windows: Start, stop, restart, or check agent status


To start, stop, or restart the agent, you must run cmd.exe or PowerShell as Administrator.

For Windows Server, you can use the Windows command prompt or PowerShell.

Command prompt (cmd.exe)

  • Start or stop the Windows agent:

    net <start|stop> newrelic-infra
  • Restart the Windows agent:

    net stop newrelic-infra ; net start newrelic-infra
  • Check the status of the Windows agent:

    sc query "newrelic-infra" | find "STATE"


  • Start or stop the Windows agent:

    Stop-Service -Name "newrelic-infra"
    Start-Service -Name "newrelic-infra"

    You can also use net start|stop newrelic-infra

  • Restart the Windows agent:

    Restart-Service newrelic-infra
  • Check status of Windows agent:

    (Get-Service newrelic-infra).Status

macOS: Start, stop, restart, or check agent status

  • Stop or start the agent:

    brew services stop newrelic-infra-agent
    brew services start newrelic-infra-agent
  • Restart the agent:

    brew services restart newrelic-infra-agent
  • Check status of the agent:

    brew services list

Customize agent logs

The infrastructure agent logs to a default location which depends on your platform. You can customize this location with the log_file setting. You can also generate verbose logs for troubleshooting.

Determine your init system

For Windows Server, the commands in this document use the Windows command prompt.

For Linux, the infrastructure agent selects an init system appropriate for your distribution:



System V


Amazon Linux

Amazon Linux 2

CentOS 7

CentOS 8

Debian 7 ("Wheezy")

Debian 8 ("Jessie")

Debian 9 ("Stretch")





Ubuntu, 14.04 or lower

Ubuntu, 16.04 or higher



Configuration management tools

To manage the infrastructure agent with your config management tool, see:

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.