The SAP host agent is installed automatically on every system hosting an SAP instance or can be installed manually on any host without an SAP instance. The agent accomplishes several life-cycle management tasks, including operating system monitoring, database monitoring, system instance control and provisioning. Supporting an SAP estate with tens or even hundreds of instances and hosts can be a challenge and often time consuming. Upgrading the host agent on your entire SAP estate is one of those time consuming tasks that can be fully automated with minimum setup effort. This blog describes how this can be achieved in a UNIX environment but can be easily adapted for the Windows platform.
The automatic update of the host agent is best achieved using a shared software repository file system located on a NAS or SAN that can be mounted on all your SAP hosts e.g. using NFS or Windows network drive. The host agent executables will be downloaded into this location as and when a new version is made available on the SAP Support Portal. For the purposes of this blog, let’s assume the shared software location is named /sap/software and the host agent is stored in sub-directory HOSTAGENT.
A number of preparations must be performed once on each host where the automatic update will occur. Firstly, the host agent profile must be adapted on each host with the profile parameters DIR_NEW, which informs the host agent where to find the new updated host agent binaries and hostexec/autoupgrade_delay, which indicates the length of time in minutes between each check for a newer version, as follows:
- DIR_NEW = /usr/sap/hostctrl/new
- hostexec/autoupgrade_delay = 10
Next, the location indicated on the parameter DIR_NEW must be created, i.e. /usr/sap/hostctrl/new. As we will be holding the new updated host agent binaries in /sap/software/HOSTAGENT, the /usr/sap/hostctrl/new location should be created as a link using the following commands:
- ln -s /sap/software/HOSTAGENT /usr/sap/hostctrl/new
Once this command has been issued the contents of the directory /usr/sap/hostctrl should look like this:
lrwxrwxrwx new -> /sap/software/HOSTAGENT
To activate the automatic update procedure the host agent must be restarted. During the restart of the host agent various information messages are written to dev_saphostexec and upgrade.log in the work directory of the host agent.
If you’d like to automate your Host Agent Update but need more help, drop us a line with no obligation mailto:firstname.lastname@example.org