cancel
Showing results for 
Search instead for 
Did you mean: 

SapHostControl - ExecuteOperation method

Former Member
0 Kudos

Hello, friends.

I need a help with SapHostControl. I saw help for saphostctrl.exe and function executeoperation, but no any examples of supported commands was not found. I searched in internet and this sap note was found ( https://service.sap.com/sap/support/notes/1369712 )

But in this note just 3 or 4 variants of using this command. Can anybody help with other examples?

Accepted Solutions (0)

Answers (2)

Answers (2)

Chris_
Explorer

Hello

the commands that can be executed are the ones SAPHostControl can find in /usr/sap/hostctrl/exe/operations.d ( linux example )

every command, that can be passed trough the parameters, has his own .conf file.

for example if you create a test.conf in directory /usr/sap/hostctrl/exe/operations.d

with content

Command:/test/alert.sh

Description: TEST

ResultConverter: flat

Platform: Unix

Workdir: /test/

and you send an soap call with content

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:SAPHostControl">

<soapenv:Header/>

<soapenv:Body>

<urn:ExecuteOperation>

<!--Optional:-->

<aOperation>test</aOperation>

</urn:ExecuteOperation>

</soapenv:Body>

</soapenv:Envelope>

to http://host:1128/SAPHostControl.cgi

it will execute the program.

premsukh_bishnoi
Contributor
0 Kudos

Hi

Please see below example:

To check the status please run the command:

  vml2320:/usr/sap/hostctrl/exe # /usr/sap/hostctrl/exe/saphostexec -status

saphostexec running (pid = 4729)

  sapstartsrv running (pid = 4732)

  saposcol running (pid = 0)

  

Since pid=0-> saposcol was not started correctly by the
hostctrl framework.

     You should restart the saphostexec:

  vml2320:/usr/sap/hostctrl/exe # /usr/sap/hostctrl/exe/saphostexec -stop

  saphostexec is already running (pid=4729).
Stopping...Stopped

vml2320:/usr/sap/hostctrl/exe # /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile

  start hostcontrol using profile
/usr/sap/hostctrl/exe/host_profile

vml2320:/usr/sap/hostctrl/exe # /usr/sap/hostctrl/exe/saphostexec -status

saphostexec running (pid = 20150)

sapstartsrv running (pid = 20153)

  saposcol running (pid = 20197)

Also  you can review  SAP Note No. 1439391.

Regards, Premsukh

Former Member

And what? I need only to know how to use this method - ExecuteOperation