Start, stop, restart, and check Infrastructure agent status

The Infrastructure agent starts automatically after you run the installation script. However, you may need to manually restart the agent (for example, after changing your agent configuration). For Linux systems, the agent selects an init system depending on your operating system version. If you do not see any data from the Infrastructure agent at all, see No data appears.

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

For Linux systems, 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, CentOS 5, RHEL 5):

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

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

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

For Windows Server, use the Windows command prompt:

  • Start or stop the Windows agent:

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

    net stop newrelic-infra ; net start newrelic-infra
    or in PowerShell:
    Restart-Service newrelic-infra
  • Check status of Windows agent in PowerShell:

    (Get-Service newrelic-infra).Status

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:

Distribution SystemD System V Upstart
Amazon Linux check
Amazon Linux 2 check
CentOS 5 check
CentOS 6 check
CentOS 7 check
CentOS 8 check
Debian 7 ("Wheezy") check
Debian 8 ("Jessie") check
RHEL 5 check
RHEL 6 check
RHEL 7 check
RHEL 8 check
Ubuntu, 14.04 or lower check
Ubuntu, 16.04 or higher check

SLES 12 check
SLES 11 check

Configuration management tools

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

For more help

Recommendations for learning more: