SAP HOSTAGENT

What is SAP Hostagent ?
 


Host agents perform several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning.

  • Installed automatically during the installation of new SAP system instances with SAP kernel 7.20 or higher.
  • SAP Host Agent is upgraded automatically as part of the SAP system instance, when you patch or upgrade the SAP kernel.
  • You can also install and upgrade SAP Host Agent independently from an SAP system instance.
  • Host agent is started automatically while we restart by sapinst in unix and in windows it is done by window service SAPHostcontrol and SAPHostexec.

Feature Provided by SAP Hostagent: 

By using sap hostagent various external entity such as LAMA , SOLMAN , SAP MC interact with the system using webservice runtime.



  • SAP instance discovery and inventory

  • SAP instance control

  • Database monitoring and management

  • System or instance provisioning:

    • Hosting the infrastructure of SAP Landscape Virtualization Management (LVM), formerly known as SAP NetWeaver Adaptive Computing Controller (ACC)

    • Hosting software lifecycle (SL) tools interfaces

  • Operating system monitoring:

    • Using saposcol

    • Using Common Information Model (CIM) based infrastructures

  • IBM i-specific features:

    • Dynamically adopted authorization for SAP kernel 7.20 and higher

    • SAP ILE daemon (SAPILED)

    • SAP Database Performance Collector for IBM i

Executables that perform SAP hostagent task :-


User used

Function

Usage

SAPHostControl

sapadm


saphostcontrol -nr <instance> -function ListDatabases

SAPhostexec

root

saphostexec is a service or daemon

hosts are monitored using this service.

hostagent administration (i.e. installation and upgrade of hostagent)


Check Hostagent version

./saphostexec -version


Check Hostagent Status

./saphostexec -status


Restart Hostagent

./saphostexec -restart


Stop Hostagent

./saphostexec -stop


Start Sap hostagent by using host profile

/usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile


SAPOSCOL

NA(standalone command that run in OS background)

It runs independent of instances and we have exactly one agent for each host. The data collected by Saposcol is placed in a shared memory which makes the information available to all instances in a host and to various applications

Usage of virtual and physical memory

CPU utilization

Utilization of physical disks and file systems

Resource usage of running processes

Points to keep a note of :-

  • SAPHostControl should not be confused with sapstartsrv which runs under the <sid>adm user in the SAP system instance with the instance profile.
  • SAPHostControl contains the functionality of the previous CCMS agent SAPCCMSR, that is, the agent that monitors hosts. 
  • Is SAP Hostagent mandatory , short answer No! , but it is highly recommended by SAP and is installed automatically at multiple instances for example when diagnostic agent is installed or simply when kernel is installed.

SAP hostagent files :-

Work Dir : In unix and IBM , /usr/sap/hostctrl/work

In windows, %ProgramFiles%\SAP\hostctrl\work

these directory  also contains few configuration files CSMCONF : Start file of the hostagent that contains connection data for central monitoring system and SAPCCMS.INI : that contains extent to which plug-ins, log files, and SAPOSCOL information should be considered; this file is read when the agent is started

To display all files in working directory of SAP HOSTAGENT is RZ 21 , Display Technical Topology > Work directory of the agent

Log Dir : Created During runtime 

sapstartsrv_ccms.log : Log files for central system monitoring , subdirectory sapccmsr of the working directory 
sapstartsrv.log : Contains developer trace of sapstartsrv
dev_saphostexec : developer trace of saphostexec
dev_sapdbctrl : developer trace of sapdbctrl 

How to download latest SAP Hostagent?

Download the latest version SAPHOSTAGENT from service marketplace.

https://launchpad.support.sap.com/#/softwarecenter

INSTALLATIONS & UPGRADES  -> A-Z Index -> H

SAP HOST AGENT -> <SELECT PLATFORM>  -> SAPHOSTAGENT_*.SAR

How to install SAP Hostagent independently ?

<download path > : where new sap host agent is kept the SAR file

logon as root user 

1. uncar that file 
move to  the executable file location of hostctrl /usr/sap/hostctrl/exe/

In windows , sapcar.exe -xvf \SAPHOSTAGENT<SPversion>.SAR 
Similarly in linux sapcar -xvf \SAPHOSTAGENT<SPversion>.SAR

2. perform install

saphostexec -install

3. Check status of sap hostagent

sahostexec -status

How to upgrade SAP Hostagent independently ?

<download path > : where new sap host agent is kept the SAR file

1. uncar that file 
move to  the executable file location of hostctrl /usr/sap/hostctrl/exe/

In windows , sapcar.exe -xvf \SAPHOSTAGENT.SAR -manifest SIGNATURE.SMF
Similarly in linux instead of sapcar.exe directly sapcar

2. perform upgrade 

saphostexec -upgrade

How to uninstall SAP Hostagent ?

Login as root user , /usr/sap/hostctrl/exe/saphostexec -uninstall



For more read :- SAP NOTE: 2219592 [You should continuously upgrade SAP Hostagent ]

Github link for RHEL SAP Hostagent [RHEL HOSTAGENT]

SAP Blog : BLOG TO READ MORE

SAP Article : BLOG TO READ MORE










Comments