0

I am running saphostctrl -function ListInstances on my inventory and registering the value.

Getting the stdout_lines as:

[hostabcd] => {
2023-07-17T18:46:09.9211983Z     "sap_service.stdout_lines": [
2023-07-17T18:46:09.9213533Z         " Inst Info : ABC - 00 - hostabcd - 753, patch 1000, changelist 2119750",
2023-07-17T18:46:09.9214534Z         " Inst Info : DEF - 01 - hostabcd - 753, patch 1000, changelist 2119750",
2023-07-17T18:46:09.9215483Z         " Inst Info : SMD - 97 - hostabcd - 753, patch 1000, changelist 2119750"
2023-07-17T18:46:09.9215972Z     ]

[hostdefg] => {
2023-07-17T18:46:09.9211983Z     "sap_service.stdout_lines": [
2023-07-17T18:46:09.9213533Z         " Inst Info : ABC - 00 - hostdefg - 753, patch 1000, changelist 2119750",
2023-07-17T18:46:09.9214534Z         " Inst Info : DEF - 01 - hostdefg - 753, patch 1000, changelist 2119750",
2023-07-17T18:46:09.9215483Z         " Inst Info : SMD - 97 - hostdefg - 753, patch 1000, changelist 2119750"
2023-07-17T18:46:09.9215972Z     

Based on this output,

  1. I need to stop sapcentral service, which is numbered as 00 against the mentioned host with the user, ABCadm
  2. Need to stop sapapplication service, which is numbered as 01 against the mentioned host with the user, DEFadm.
  3. Have to ignore SMD for all the hosts.
  4. central service which is 00, will always be in same host , while the application service, numbered as 01, can be in same host and in multiple hosts.

I understand, it's quite complex, for me to explain.

I tried getting the output in list and I am getting the same.

I am actually not sure, how to solve this condition. So reaching out for help here.

Thank you.

U880D
  • 8,601
  • 6
  • 24
  • 40
Dscorpian
  • 21
  • 4

0 Answers0