Skip to content

Instantly share code, notes, and snippets.

@devops-school
Created November 23, 2020 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devops-school/ae9e862bb54139b913c7526ee44e3bef to your computer and use it in GitHub Desktop.
Save devops-school/ae9e862bb54139b913c7526ee44e3bef to your computer and use it in GitHub Desktop.
Newrelic Infrastructure: Start, stop, and restart the infrastructure agent

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

$ 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

Command prompt (cmd.exe)

$ 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"

PowerShell

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

# Restart the Windows agent:
$ Restart-Service newrelic-infra

# Check status of Windows agent:
$ (Get-Service newrelic-infra).Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment