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 | |
| For older On-Premise Poller versions, use: sudo nohup ./StartServer.sh >> logs/shell_script.log 2>&1 & For On-Premise Poller version 6.7.9 and later (installed as a service), use: sudo systemctl start site24x7-onpremise-poller |
Stop | For older On-Premise Poller versions, use:
sudo sh StopServer.sh For On-Premise Poller version 6.7.9 and later (installed as a service), use: sudo systemctl stop site24x7-onpremise-poller |
Restart | sudo systemctl restart site24x7-onpremise-poller |
Status | sudo systemctl status site24x7-onpremise-poller |
| sudo systemctl enable site24x7-onpremise-poller |
| 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.
Stop the On-Premise Poller using the command given in the above table.
Then, execute the following
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
Start the On-Premise Poller using the command given in the above table.
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
Then, Stop the On-Premise Poller using the command given in the above table.
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
- init.d (SysVinit) is deprecated in most modern Linux distributions.
- systemd is now the standard init system across major Linux distributions.
- systemd offers improved process management, logging, and dependency handling.
- 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.
- For legacy systems without systemd support, you can still start the poller manually. Check out what needs to be done for systems without systemd.