Retrieving STHYI data
![]()
Store Hypervisor Information (STHYI) includes information about the IBM Z® hardware, LPAR and, if applicable, the hypervisor host system on which your Linux® instance runs.
- The CPU count, by type (CP or IFL)
- Limitations for shared CPUs
- CEC and LPAR identifiers
| Method | Linux in LPAR mode | Linux as a z/VM or KVM guest |
|---|---|---|
| STHYI instruction with the GCC inline assembly For an example, see arch/s390/kernel/sthyi.c in the Linux source tree. |
No | Yes |
qclibSee the readme file of the qclib package for details. |
Yes | Yes |
| s390_sthyi() system call See the man page for details. |
Yes | No |
The return data for both the STHYI instruction and the s390_sthyi() system call matches the
content of the STHYI response buffer as described in z/VM: CP Programming
Services, SC24-6272. The qclib library provides an API
for querying the information. See the readme file of the qclib package about
obtaining the API description.
For more information about STHYI on a KVM guest, see KVM Virtual Server Management, SC34-2752.
You can find the qclib package and more information about
qclib at github.com/ibm-s390-linux/qclib.