Skip to main content
Skip table of contents

Using Systemd to manage the PowerConnect for SAP HANA DB Agent

The PowerConnect for SAP HANA DB agent can be managed by Systemd.

  • Get the SAPSYSTEMNAME and SAP_RETRIEVAL_PATH environment variables from the HANA DB OS user (we need these because systemd does not get these for us)

env | grep SAP

image-20240620-235528.png
  • Create the powerconnect systemd service file:

sudo vi /etc/systemd/system/powerconnect.service

  • Populate the contents as follows replacing the SAPSYSTEMNAME and SAP_RETRIEVAL_PATH with the values you collected above and the User and Group with the HANA DB os user and group:

CODE
[Unit]
Description=PowerConnect for SAP HANA DB agent
[Service]
Environment=SAPSYSTEMNAME=<insert SAPSYSTEM NAME here>
Environment=SAP_RETRIEVAL_PATH=<insert SAP_RETRIEVAL_PATH here> 
SuccessExitStatus=143
User=<insert hana db os user here>
Group=<insert hana db os user group here>
Type=forking
Restart=on-failure
RestartSec=30
ExecStart=/bin/bash /opt/powerconnect/bin/powerconnect.sh start
ExecStop=/bin/bash /opt/powerconnect/bin/powerconnect.sh stop
[Install]
WantedBy=multi-user.target
  • Reload the Systemd service:

sudo systemctl daemon-reload

  • Start the PowerConnect for SAP HANA DB agent using Systemd:

sudo systemctl start powerconnect.service

  • Check the status:

systemctl status powerconnect

  • To have Systemd start the PowerConnect for SAP HANA DB agent when the host starts up:

sudo systemctl enable powerconnect

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.