## 8.3.1  Checking the Status with landscapeHostConfiguration.py
Check the status of the primary system using landscapeHostConfiguration.py .
Check the overall status of the primary system using as &lt;sid&gt;adm user the landscapeHostConfiguration.py script located in $DIR\_INSTANCE/../exe/python\_support .
```
<sid>adm># python $DIR_INSTANCE/exe/python_support/landscapeHostConfiguration.py | Host | Host | Host | ... | NameServer | NameServer | ... | | Active | Status | | Config Role| Actual Role | | ----- | ------ | ------ | --------- | ---------- | ----------- | ------| host1 | yes | ok | ... | master 1 | master | ... | host2 | yes | ok | ... | master 2 | slave | ... overall host status: ok
```
Use the --sapcontrol=1 parameter, if you require a reliable and parsable output.
```
<sid>adm># python $DIR_INSTANCE/exe/python_support/landscapeHostConfiguration.py --sapcontrol=1 SAPCONTROL-OK: <begin> host/ld2131/hostActualRoles=worker host/ld2131/removeStatus= host/ld2131/nameServerConfigRole=master 1 host/ld2131/failoverStatus= host/ld2131/hostConfigRoles=worker host/ld2131/failoverActualGroup=default host/ld2131/storageConfigPartition=1 host/ld2131/host=ld2131 host/ld2131/indexServerConfigRole=worker host/ld2131/failoverConfigGroup=default host/ld2131/storageActualPartition=1 host/ld2131/indexServerActualRole=master host/ld2131/nameServerActualRole=master host/ld2131/hostActive=yes host/ld2131/hostStatus=ok host/ld2131/storagePartition=0 host/ld2132/hostActualRoles=worker host/ld2132/removeStatus= host/ld2132/nameServerConfigRole=master 3
```
```
host/ld2132/failoverStatus= host/ld2132/hostConfigRoles=worker host/ld2132/failoverActualGroup=default host/ld2132/storageConfigPartition=2 host/ld2132/host=ld2132 host/ld2132/indexServerConfigRole=worker host/ld2132/failoverConfigGroup=default host/ld2132/storageActualPartition=2 host/ld2132/indexServerActualRole=slave host/ld2132/nameServerActualRole=slave host/ld2132/hostActive=yes host/ld2132/hostStatus=ok host/ld2133/hostActualRoles=standby host/ld2133/removeStatus= host/ld2133/nameServerConfigRole=master 2 host/ld2133/failoverStatus= host/ld2133/hostConfigRoles=standby host/ld2133/failoverActualGroup=default host/ld2133/storageConfigPartition=0 host/ld2133/host=ld2133 host/ld2133/indexServerConfigRole=standby host/ld2133/failoverConfigGroup=default host/ld2133/storageActualPartition=0 host/ld2133/indexServerActualRole=standby host/ld2133/nameServerActualRole=slave host/ld2133/hostActive=yes host/ld2133/hostStatus=ignore overall_status=ok SAPCONTROL-OK: <end>
```
##  Note
This script provides information about the state of one SAP HANA database only. A takeover is only recommended when the return code from the script is 1 (error).
The return codes of the script are:
|   Return code | Description                                                    |
|---------------|----------------------------------------------------------------|
|             0 | Fatal Internal script error, the state could not be determined |
|             1 | Error                                                          |
|             2 | Warning                                                        |
|             3 | Info                                                           |
|             4 | OK                                                             |
```
Status Error and Return Code=1: dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> python landscapeHostConfiguration.py | Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups |
```
```
| ------ | ------ | ------ | -------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------- | ------- | ------- | ------- | | ld2131 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | | ld2132 | no | error | | | 2 | 2 | default | default | master 2 | slave | worker | slave | worker | worker | default | default | | ld2133 | no | ignore | | | 0 | 0 | default | default | master 3 | slave | standby | standby | standby | standby | default | - | overall host status: error Return Code dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> echo $? 1
```
```
Status Warning and Return Code=2 dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> python landscapeHostConfiguration.py | Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups | | ------ | ------ | ------- | -------------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------- | ------- | ------- | ------- | | ld2131 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | | ld2132 | no | warning | waiting 30 sec | | 2 | 2 | default | default | master 2 | slave | worker | slave | worker | worker | default | default | | ld2133 | yes | ignore | | | 0 | 0 | default | default | master 3 | slave | standby | standby | standby | standby | default | - | overall host status: warning Return Code dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> echo $? 2
```
```
Status Info and Return Code=3: dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> python landscapeHostConfiguration.py | Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups | | ------ | ------ | ------ | -------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------- | ------- | ------- | ------- | | ld2131 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | | ld2132 | yes | info | | | 2 | 0 | default | default | master 2 | slave | worker | standby | worker | standby | default | - | | ld2133 | yes | info | | | 0 | 2 | default | default | master 3 | slave | standby | slave | standby | worker | default | default | overall host status: info Return Code dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> echo $? 3 Status OK and Return Code=4 dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> python landscapeHostConfiguration.py
```
```
| Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups | | ------ | ------ | ------ | -------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------- | ------- | ------- | ------- | | ld2131 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | | ld2132 | yes | ok | | | 2 | 2 | default | default | master 2 | slave | worker | slave | worker | worker | default | default | | ld2133 | yes | ignore | | | 0 | 0 | default | default | master 3 | slave | standby | standby | standby | standby | default | - | overall host status: ok Return Code dx7adm@ld2131:/usr/sap/DX7/HDB07/exe/python_support> echo $? 4
```
In the event of a network split, a so called split brain scenario, the script cannot tell if the instance in the other half of the network is fully functional. Therefore, a takeover decision should not be based on this script alone.
## Related Information
Example: Checking the Status on the Primary and Secondary Systems [page 166]