Starting the On-Premise Poller as a service in Linux

Starting the On-Premise Poller as a service in Linux

On Linux systems, it is recommended to run the On-Premise Poller as a systemd service. This allows the On-Premise Poller to start automatically during system boot and enables easier management using standard Linux service commands.

Installing the On-Premise Poller as a service

Navigate to the On-Premise Poller installation directory and run the installation script as given below:

cd /opt/Site24x7OnPremisePoller
sudo sh InstallService.sh

Managing the service

Use the following commands to manage the On-Premise Poller service:
Action
Command
Start
sudo systemctl start site24x7-onpremise-poller
Stop
sudo systemctl stop site24x7-onpremise-poller
Restart
sudo systemctl restart site24x7-onpremise-poller
Status
sudo systemctl status site24x7-onpremise-poller
Enable auto-start
sudo systemctl enable site24x7-onpremise-poller
Disable auto-start
sudo systemctl disable site24x7-onpremise-poller

Checking the status of the service

To verify the On-Premise Poller is running correctly, please use the following command:

sudo systemctl status site24x7-onpremise-poller

Uninstalling the service

Execute the following commands to uninstall the On-Premise Poller service.

sudo systemctl stop site24x7-onpremise-poller
sudo systemctl disable site24x7-onpremise-poller
sudo rm /etc/systemd/system/site24x7-onpremise-poller.service
sudo systemctl daemon-reload

Reinstalling the Service

If you need to reinstall or update the service, simply run the installation script again. It will automatically clean up any existing installation and install a fresh service:

cd /opt/Site24x7OnPremisePoller
sudo sh InstallService.sh

For systems without systemd

For legacy Linux systems without systemd, you need to start the On-Premise Poller manually:

cd /opt/Site24x7OnPremisePoller
nohup ./StartServer.sh >> logs/shell_script.log 2>&1 &

Notes
If you start the On-Premise Poller using this command, it will not start automatically after a system restart. You will need to run the command again to start the On-Premise Poller.
To stop the On-Premise Poller service:

cd /opt/Site24x7OnPremisePoller
./StopServer.sh

Notes
The command cd /opt/Site24x7OnPremisePoller assumes that /opt is the installation directory for the On-Premise Poller. If the On-Premise Poller is installed in a different location, update the command with the appropriate installation path.

Why should you run the On-Premise Poller as a systemd service?

The previous method of installing the On-Premise Poller as a service using init.d scripts (SysVinit) is now deprecated. 
Reason for the deprecation
  1. init.d (SysVinit) is deprecated in most modern Linux distributions.
  2. systemd is now the standard init system across major Linux distributions.
  3. systemd offers improved process management, logging, and dependency handling.
  4. If you have an existing init.d installation, the new InstallService.sh script will automatically remove the old init.d entries and install the systemd service.
  5. For legacy systems without systemd support, you can still start the poller manually. Check out what needs to be done for systems without systemd. 
    • Related Articles

    • Silent installation of Linux On-Premise Poller

      You can perform a silent installation of an On-Premise Poller on a Linux server. Additionally, proxy configuration can also be set during this process. Execute the following commands in your terminal 64 bit OS: sudo wget ...
    • How to fix the "JRE libraries are missing or not compatible" error

      The Site24x7 On-Premise Poller installation may fail due to insufficient permissions on the default "tmp" directory. If you face the "JRE libraries are missing or not compatible" error in the installation of On-Premise Poller in CentOS, follow the ...
    • Set proxy for Linux On-Premise Poller during installation

      There are 3 ways through which you can configure a proxy in an On-Premise Poller for a Linux server. During installation using the Installation Wizard Using the console During the silent installation of the On-Premise Poller Linux agent 1. During ...
    • Adding On-Premise Poller on a Linux platform

      If your machine has SELinux configured, it needs to be temporarily disabled for the On-Premise Poller installation to be successful. To disable SELinux: Open a Terminal with root privileges and execute this command: setenforce 0 To add an On-Premise ...
    • Installation of Linux On-Premise Poller using the console

      As per our latest announcement, the 32-bit On-Premise Poller is no longer supported from version 6.5 and above. To install the On-Premise Poller in your Linux machine using the console, execute the following commands in your terminal: 64 bit OS: sudo ...