Package with functions related to interaction with SAP Host Agent (Command saphostctrl). Those can be used for collecting data about instances and performing various operations. Keep in mind that command needs to be executed using either root or sidadm.
parse_instance_name($instance_name);
Splits instance name into SID and instance ID. Example: DBH01 -> sid=DBH, id=01
$instance_name: Instance name
saphostctrl_list_instances([as_root=>1, running=>'yes']);
Lists all locally installed instances. Executes command 'saphostctrl -function ListInstances' and returns parsed result in HASHREF.
as_root: Execute command using sudo. Default: false
running: List only running instances. Default: undef