qclib
|
Go to the source code of this file.
Macros | |
#define | QC_VERSION "2.3.1" |
#define | CONFIG_DEBUG_TIMESTAMPS |
Functions | |
void * | qc_open (int *rc) |
void | qc_close (void *hdl) |
int | qc_get_num_layers (void *hdl, int *rc) |
int | qc_get_attribute_string (void *hdl, enum qc_attr_id id, int layer, const char **value) |
int | qc_get_attribute_int (void *hdl, enum qc_attr_id id, int layer, int *value) |
int | qc_get_attribute_float (void *hdl, enum qc_attr_id id, int layer, float *value) |
void | qc_export_json (void *hdl) |
enum qc_attr_id |
Defines the attributes retrievable by the API. Attributes can exist for multiple layers. Also, attributes will only be valid if retrieved as the correct type.
The following tables detail which attributes of what types are available for what layers. The letter encoding in the 'Src'
column describes how the value is gained:
/proc/sysinfo
, which is present in all Linux on z flavors.sysfs
filesystem.debugfs
at /sys/kernel/debug/s390_hypfs
, or s390_hypfs
(typically mounted at /sys/hypervisor/s390
). Proper file access privileges required.debugfs
exclusively.QC_LAYER_TYPE_LPAR_GROUP
).Several letters indicate the order in which the value is attempted to be acquired. If the extraction of the value in a later phase succeeds, it will overwrite the value acquired in an earlier phase. If the extraction of the value in a later phase does not succeed, it will not dismiss the existing value, if a previous phase has set it before.
SMT was introduced starting with z13/LinuxONE.
When SMT is turned off (or not available), the terms core and CPU are synonymous. But when SMT is enabled, CPU refers to a thread running on a core.
As a general rule, CP, IFL and zIIP counts (eg. qc_num_cp_total, qc_num_ifl_total and qc_num_ziip_total respectively)
QC_LAYER_TYPE_LPAR
reports cores (see e.g. qc_num_core_total), hence qc_num_ifl_shared refers to cores, too.QC_LAYER_TYPE_LPAR
.QC_LAYER_TYPE_ZVM_HYPERVISOR
and QC_LAYER_TYPE_KVM_HYPERVISOR
running above one or more layers of type QC_LAYER_TYPE_ZVM_HYPERVISOR
or QC_LAYER_TYPE_KVM_HYPERVISOR
(i.e. within a guest of a hypervisor), will report CPUs all the time, no matter what the attribute names might imply.lscpu -e
' to get a detailed list of the CPU/core topology. Likewise, use 'QUERY PROCESSORS
' on z/VM for similar information. However, beware that if the respective instance is not running immediately on top of a layer of type QC_LAYER_TYPE_LPAR
, results need to be interpreted according to the previous note.QC_LAYER_TYPE_ZVM_GUEST
report any capacity cappings (see attributes qc_cp_capped_capacity, qc_ifl_capped_capacity and qc_ziip_capped_capacity) in units of cores, although CPs, IFLs and zIIPs that they refer to are reported as CPUs.'Comment'
column for layer-specific considerationsAttributes for CECs (layer 0) | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_CEC | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_HOST | |
qc_layer_type | string | Hardcoded to "CEC" | |
qc_layer_category | string | Hardcoded to "HOST" | |
qc_layer_name | string | F V | CPC name of machine. Available in Linux kernel 3.0 or higher. |
qc_manufacturer | string | S V | |
qc_type | string | S V | |
qc_type_name | string | S | |
qc_type_family | int | S | |
qc_model_capacity | string | S | |
qc_model | string | S | |
qc_sequence_code | string | S V | |
qc_lic_identifier | string | S | Note: Requires Linux kernel 4.16 or higher, and IBM z14 or later |
qc_plant | string | S V | |
qc_num_core_total | int | S | Sum of qc_num_core_configured, qc_num_core_reserved and qc_num_core_standby. Note: Sum of qc_num_cp_total and qc_num_ifl_total might be smaller or larger, since some assists and spares are missing, and only the general purpose CPU type is considered |
qc_num_core_configured | int | S | General purpose cores only without IFLs and zIIPs |
qc_num_core_standby | int | S | General purpose cores which are in the (very brief) process of being added to the configuration |
qc_num_core_reserved | int | S | IFLs, zIIPs, spares, excluding IFPs (Internal Firmware Processors) |
qc_num_core_dedicated | int | hV | Sum of qc_num_cp_dedicated and qc_num_ifl_dedicated Note: [4] |
qc_num_core_shared | int | hV | Sum of qc_num_cp_shared and qc_num_ifl_shared Note: [4] |
qc_num_cp_total | int | HV | Equals the sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of cores Note: [4] |
qc_num_cp_dedicated | int | hV | Reported in unit of cores Note: [4] |
qc_num_cp_shared | int | hV | Reported in unit of cores Note: [4] |
qc_num_ifl_total | int | HV | Equals the sum of qc_num_ifl_dedicated and qc_num_ifl_shared Reported in unit of cores Note: [4] |
qc_num_ifl_dedicated | int | hV | Reported in unit of cores Note: [4] |
qc_num_ifl_shared | int | hV | Reported in unit of cores Note: [4] |
qc_num_ziip_total | int | HV | Equals the sum of qc_num_ziip_dedicated and qc_num_ziip_shared Reported in unit of cores Note: [4] |
qc_num_ziip_dedicated | int | hV | Reported in unit of cores Note: [4] |
qc_num_ziip_shared | int | hV | Reported in unit of cores Note: [4] |
qc_num_cp_threads | int | S | Number of threads/CPUs per CP core that the CEC is capable of Note: Requires Linux kernel 4.4 or higher |
qc_num_ifl_threads | int | S | Number of threads/CPUs per IFL core that the CEC is capable of Note: Requires Linux kernel 4.4 or higher |
qc_num_ziip_threads | int | S | Number of threads/CPUs per zIIP core that the CEC is capable of Note: Requires Linux kernel 4.4 or higher |
qc_capability | float | S | |
qc_secondary_capability | float | S | |
qc_capacity_adjustment_indication | int | S | |
qc_capacity_change_reason | int | S |
Attributes for LPAR Groups | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_LPAR_GROUP | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_POOL | |
qc_layer_type | string | Hardcoded to "LPAR-Group" | |
qc_layer_category | string | Hardcoded to "POOL" | |
qc_layer_name | string | hV | Name of LPAR group |
qc_cp_absolute_capping | int | hV | Reported in unit of cores |
qc_ifl_absolute_capping | int | hV | Reported in unit of cores |
qc_ziip_absolute_capping | int | hV | Reported in unit of cores |
Attributes for LPARs | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_LPAR | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_GUEST | |
qc_layer_type | string | Hardcoded to "LPAR" | |
qc_layer_category | string | Hardcoded to "GUEST" | |
qc_layer_name | string | S V | Name of LPAR, limited to 8 characters |
qc_layer_extended_name | string | S | Name of LPAR with up to 256 characters Note: Requires Linux kernel 4.10 or higher |
qc_layer_uuid | string | S | Note: Requires Linux kernel 4.10 or higher |
qc_partition_number | int | S | |
qc_partition_char | string | S | |
qc_partition_char_num | int | S | |
qc_adjustment | int | S | |
qc_has_secure | int | F | |
qc_secure | int | F | |
qc_num_core_total | int | S | Total number of CPs and IFLs configured in the LPARs activation profile |
qc_num_core_configured | int | S | Note: [5] |
qc_num_core_standby | int | S | Operational cores that require add'l configuration within the LPAR image to become usable Note: [5] |
qc_num_core_reserved | int | S | Operational cores that require add'l interaction by the LPAR's administrator to become usable Note: [5] |
qc_num_core_dedicated | int | S | Dedicated operational cores only Note: [5], hence sum of qc_num_cp_dedicated, qc_num_ifl_dedicated and qc_num_ziip_dedicated can be larger |
qc_num_core_shared | int | S | Shared operational cores only Note: [5], hence sum of qc_num_cp_shared, qc_num_ifl_shared and qc_num_ziip_dedicated can be larger |
qc_num_cp_total | int | HV | Sum of qc_num_cp_dedicated and qc_num_cp_shared. Considers configured CPs only. Reported in unit of cores |
qc_num_cp_dedicated | int | hV | Reported in unit of cores |
qc_num_cp_shared | int | hV | Reported in unit of cores |
qc_num_ifl_total | int | HV | Sum of qc_num_ifl_dedicated and qc_num_ifl_shared. Considers configured IFLs only. Reported in unit of cores |
qc_num_ifl_dedicated | int | hV | Reported in unit of cores |
qc_num_ifl_shared | int | hV | Reported in unit of cores |
qc_num_ziip_total | int | HV | Sum of qc_num_ziip_dedicated and qc_num_ziip_shared. Considers configured zIIPs only. Reported in unit of cores |
qc_num_ziip_dedicated | int | hV | Reported in unit of cores |
qc_num_ziip_shared | int | hV | Reported in unit of cores |
qc_num_cp_threads | int | S | Number of threads/CPUs per CP core configured for this LPAR Note: Requires Linux kernel 4.3 or higher |
qc_num_ifl_threads | int | S | Number of threads/CPUs per IFL core configured for this LPAR Note: Requires Linux kernel 4.3 or higher |
qc_num_ziip_threads | int | S | Number of threads/CPUs per zIIP core configured for this LPAR Note: Requires Linux kernel 4.3 or higher |
qc_cp_absolute_capping | int | hV | Reported in unit of cores |
qc_cp_weight_capping | int | hV | Reported in unit of cores Note: [4] |
qc_ifl_absolute_capping | int | hV | Reported in unit of cores |
qc_ifl_weight_capping | int | hV | Reported in unit of cores Note: [4] |
qc_ziip_absolute_capping | int | hV | Reported in unit of cores |
qc_ziip_weight_capping | int | hV | Reported in unit of cores Note: [4] |
Attributes for z/VM hypervisors | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZVM_HYPERVISOR | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_HOST | |
qc_layer_type | string | Hardcoded to "z/VM-hypervisor" | |
qc_layer_category | string | Hardcoded to "HOST" | |
qc_layer_name | string | V | System identifier of the hypervisor |
qc_cluster_name | string | V | |
qc_control_program_id | string | S | ID of CP |
qc_adjustment | int | S | Adjustment factor of z/VM |
qc_limithard_consumption | int | V | |
qc_prorated_core_time | int | V | |
qc_num_core_total | int | V | Sum of qc_num_core_dedicated and qc_num_core_shared |
qc_num_core_dedicated | int | V | Sum of qc_num_cp_dedicated and qc_num_ifl_dedicated |
qc_num_core_shared | int | V | Sum of qc_num_cp_shared and qc_num_ifl_dedicated |
qc_num_cp_total | int | V | Sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_dedicated | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_shared | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_total | int | V | Sum of qc_num_ifl_dedicated and qc_num_ifl_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_dedicated | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_shared | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_total | int | V | Sum of qc_num_ziip_dedicated and qc_num_ziip_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_shared | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_dedicated | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_threads | int | V | Number of threads/CPUs per CP core in use |
qc_num_ifl_threads | int | V | Number of threads/CPUs per IFL core in use |
qc_num_ziip_threads | int | V | Number of threads/CPUs per zIIP core in use |
Attributes for z/VM resource pools | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZVM_RESOURCE_POOL | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_POOL | |
qc_layer_type | string | Hardcoded to "z/VM-resource-pool" , or "z/VM-CPU-pool" if compiled with CONFIG_V1_COMPATIBILITY | |
qc_layer_category | string | Hardcoded to "POOL" | |
qc_layer_name | string | V | Name of resource pool |
qc_cp_limithard_cap | int | V | |
qc_cp_capacity_cap | int | V | |
qc_cp_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ifl_limithard_cap | int | V | |
qc_ifl_capacity_cap | int | V | |
qc_ifl_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ziip_limithard_cap | int | V | |
qc_ziip_capacity_cap | int | V | |
qc_ziip_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
Attributes for z/VM guests | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZVM_GUEST | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_GUEST | |
qc_layer_type | string | Hardcoded to "z/VM-guest" | |
qc_layer_category | string | Hardcoded to "GUEST" | |
qc_layer_name | string | S V | Userid of guest |
qc_capping | string | H | |
qc_capping_num | int | H | |
qc_mobility_enabled | int | V | |
qc_has_secure | int | F | |
qc_secure | int | F | |
qc_num_cpu_total | int | S V | Sum of qc_num_cpu_configured, qc_num_cpu_standby and qc_num_cpu_reserved, or qc_num_cpu_dedicated and qc_num_cpu_shared |
qc_num_cpu_configured | int | S | |
qc_num_cpu_standby | int | S | |
qc_num_cpu_reserved | int | S | |
qc_num_cpu_dedicated | int | HV | Sum of qc_num_cp_dedicated and qc_num_ifl_dedicated |
qc_num_cpu_shared | int | HV | Sum of qc_num_cp_shared and qc_num_ifl_shared |
qc_num_cp_total | int | V | Sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of CPUs |
qc_num_cp_dedicated | int | V | Reported in unit of CPUs |
qc_num_cp_shared | int | V | Reported in unit of CPUs |
qc_num_ifl_total | int | V | Sum of qc_num_ifl_dedicated and qc_num_ifl_shared Reported in unit of CPUs |
qc_num_ifl_dedicated | int | V | Reported in unit of CPUs |
qc_num_ifl_shared | int | V | Reported in unit of CPUs |
qc_num_ziip_total | int | V | Sum of qc_num_ziip_dedicated and qc_num_ziip_shared Reported in unit of CPUs |
qc_num_ziip_dedicated | int | V | Reported in unit of CPUs |
qc_num_ziip_shared | int | V | Reported in unit of CPUs |
qc_has_multiple_cpu_types | int | V | |
qc_cp_dispatch_limithard | int | V | |
qc_cp_dispatch_type | int | V | Only set in presence of CPs |
qc_cp_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ifl_dispatch_limithard | int | V | |
qc_ifl_dispatch_type | int | V | Only set in presence of IFLs |
qc_ifl_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ziip_dispatch_limithard | int | V | |
qc_ziip_dispatch_type | int | V | Only set in presence of zIIPs |
qc_ziip_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
Attributes for z/OS hypervisors | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZOS_HYPERVISOR | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_HOST | |
qc_layer_type | string | Hardcoded to "z/OS-hypervisor" | |
qc_layer_category | string | Hardcoded to "HOST" | |
qc_layer_name | string | V | System identifier of the hypervisor |
qc_cluster_name | string | V | Name of sysplex |
qc_control_program_id | string | S | ID of z/OS |
qc_adjustment | int | S | Adjustment factor of z/OS |
qc_num_core_total | int | V | Sum of qc_num_core_dedicated and qc_num_core_shared |
qc_num_core_dedicated | int | V | Sum of qc_num_cp_dedicated and qc_num_ziip_dedicated |
qc_num_core_shared | int | V | Sum of qc_num_cp_shared and qc_num_ziip_shared |
qc_num_cp_total | int | V | Sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_dedicated | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_shared | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_total | int | V | Sum of qc_num_ziip_dedicated and qc_num_ziip_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_shared | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ziip_dedicated | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_threads | int | V | Number of threads/CPUs per CP core in use |
qc_num_ziip_threads | int | V | Number of threads/CPUs per zIIP core in use |
Attributes for z/OS resource groups | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZOS_TENANT_RESOURCE_GROUP | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_POOL | |
qc_layer_type | string | Hardcoded to "z/OS-tenant-resource-group" | |
qc_layer_category | string | Hardcoded to "POOL" | |
qc_layer_name | string | V | Name of resource group |
qc_cp_limithard_cap | int | V | |
qc_cp_capacity_cap | int | V | |
qc_cp_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ziip_limithard_cap | int | V | |
qc_ziip_capacity_cap | int | V | |
qc_ziip_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
Attributes for z/OS zCX Servers | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_ZOS_ZCX_SERVER | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_GUEST | |
qc_layer_type | string | Hardcoded to "z/OS-guest" | |
qc_layer_category | string | Hardcoded to "GUEST" | |
qc_layer_name | string | S V | Userid of guest |
qc_capping | string | H | |
qc_capping_num | int | H | |
qc_has_secure | int | F | |
qc_secure | int | F | |
qc_num_cpu_total | int | S V | Sum of qc_num_cpu_configured, qc_num_cpu_standby and qc_num_cpu_reserved, or qc_num_cpu_dedicated and qc_num_cpu_shared |
qc_num_cpu_configured | int | S | |
qc_num_cpu_standby | int | S | |
qc_num_cpu_reserved | int | S | |
qc_num_cpu_dedicated | int | HV | Sum of qc_num_cp_dedicated and qc_num_ifl_dedicated |
qc_num_cpu_shared | int | HV | Sum of qc_num_cp_shared and qc_num_ifl_shared |
qc_num_cp_total | int | V | Sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of CPUs |
qc_num_cp_dedicated | int | V | Reported in unit of CPUs |
qc_num_cp_shared | int | V | Reported in unit of CPUs |
qc_num_ziip_total | int | V | Sum of qc_num_ziip_dedicated and qc_num_ziip_shared Reported in unit of CPUs |
qc_num_ziip_dedicated | int | V | Reported in unit of CPUs |
qc_num_ziip_shared | int | V | Reported in unit of CPUs |
qc_has_multiple_cpu_types | int | V | |
qc_cp_dispatch_limithard | int | V | |
qc_cp_dispatch_type | int | V | Only set in presence of CPs |
qc_cp_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_ziip_dispatch_limithard | int | V | |
qc_ziip_dispatch_type | int | V | Only set in presence of zIIPs NOTE: I guess it would be cleaner if we would switch to IFL attributes instead of zIIPs, since that is (to my understanding), what Linux will see - and use THIS attribute to indicate that the IFLs are dispatched to zIIPs...? |
qc_ziip_capped_capacity | int | V | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
Attributes for KVM hypervisors | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_KVM_HYPERVISOR | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_HOST | |
qc_layer_type | string | Hardcoded to "KVM-hypervisor" | |
qc_layer_category | string | Hardcoded to "HOST" | |
qc_control_program_id | string | S | Host ID |
qc_adjustment | int | S | |
qc_num_core_total | int | S | Sum of qc_num_core_dedicated and qc_num_core_shared |
qc_num_core_dedicated | int | SHV | Sum of qc_num_cp_dedicated and qc_num_ifl_dedicated |
qc_num_core_shared | int | SHV | Sum of qc_num_cp_shared and qc_num_ifl_shared |
qc_num_cp_total | int | HV | Sum of qc_num_cp_dedicated and qc_num_cp_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_dedicated | int | hV | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_cp_shared | int | hV | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_total | int | SHV | Sum of qc_num_ifl_dedicated and qc_num_ifl_shared Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_dedicated | int | ShV | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
qc_num_ifl_shared | int | ShV | Reported in unit of cores unless run as a guest of another hypervisor other than LPAR |
Attributes for KVM guests | Type | Src | Comment |
---|---|---|---|
qc_layer_type_num | int | Hardcoded to QC_LAYER_TYPE_KVM_GUEST | |
qc_layer_category_num | int | Hardcoded to QC_LAYER_CAT_GUEST | |
qc_layer_type | string | Hardcoded to "KVM-guest" | |
qc_layer_category | string | Hardcoded to "GUEST" | |
qc_layer_name | string | S | Guest name truncated to 8 characters Note: [1] |
qc_layer_extended_name | string | S | Guest name with up to 256 characters Note: Requires Linux kernel 3.19 or higher, [1] |
qc_layer_uuid | string | S | Note: Requires Linux kernel 3.19 or higher |
qc_has_secure | int | F | |
qc_secure | int | F | |
qc_num_cpu_total | int | S | Sum of qc_num_cpu_configured, qc_num_cpu_standby and qc_num_cpu_reserved, or qc_num_cpu_dedicated and qc_num_cpu_shared |
qc_num_cpu_configured | int | S | |
qc_num_cpu_standby | int | S | |
qc_num_cpu_reserved | int | S | |
qc_num_cpu_dedicated | int | S | |
qc_num_cpu_shared | int | S | |
qc_num_ifl_total | int | S | Sum of qc_num_ifl_dedicated and qc_num_ifl_shared Reported in unit of CPUs |
qc_num_ifl_dedicated | int | S | Reported in unit of CPUs |
qc_num_ifl_shared | int | S | Reported in unit of CPUs |
qc_ifl_dispatch_type | int | SHV |
[1] Available starting with RHEL7.2 and SLES12SP1
[2] z/Architecture Principles of Operation, SA22-7832
[3] z/VM: CP Commands and Utilities Reference, SC24-6175
[4] Requires global performance data (GDP) to be enabled in the LPAR's activation profile
[5] As of this writing, in LPARs with both CPs and IFLs defined in its activation profile, only CPs can become operational. Therefore, IFL counts would not appear in any of qc_num_core_configured, qc_num_core_standby, qc_num_core_reserved, qc_num_core_dedicated or qc_num_core_shared
Enumerator | |
---|---|
qc_adjustment | The adjustment factor indicates the maximum percentage of the machine (in parts of 1000) that could be used by the primary processor type in the worst case by the respective layer, taking cappings and other limiting factors into consideration. |
qc_capability | Capability rating, see |
qc_capacity_adjustment_indication | Capacity adjustment value, see |
qc_capacity_change_reason | Reason for capacity adjustment, see |
qc_capping | Capping type: |
qc_capping_num | Numeric representation of capping type, see enum qc_cappings |
qc_cluster_name | SSI name if part of SSI cluster |
qc_control_program_id | ID of control program |
qc_cp_absolute_capping | CP absolute capping value. Scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_cp_capacity_cap | 1 if pool's CP virtual type has capped capacity |
qc_cp_capped_capacity | Guest current capped capacity for shared virtual CPs – scaled value where 0x10000 equals to one core, or 0 if no capping set. While this field displays the capacity, either qc_cp_capacity_cap or qc_cp_limithard_cap must is set to indicate the kind of limit. |
qc_cp_dispatch_limithard | 1 if guest CP dispatch type has LIMITHARD capping, |
qc_cp_dispatch_type | Dispatch type for guest CPs: |
qc_cp_limithard_cap | 1 if pool's CP virtual type has limithard capping |
qc_cp_weight_capping | CP weight-based capping value – scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_limithard_consumption | 1 if SRM limithard setting is consumption |
qc_has_multiple_cpu_types | 1 if layer has multiple CPU types (e.g. CPs, IFLs, zIIPs), |
qc_ifl_absolute_capping | IFL absolute capping value – scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_ifl_capacity_cap | 1 if pool's IFL virtual type has capped capacity |
qc_ifl_capped_capacity | Guest current capped capacity for shared virtual IFLs – scaled value where 0x10000 equals to one core, or 0 if no capping set. While this field displays the capacity, either qc_ifl_capacity_cap or qc_ifl_limithard_cap must is set to indicate the kind of limit. |
qc_ifl_dispatch_limithard | 1 if guest IFL dispatch type has LIMITHARD capping, |
qc_ifl_dispatch_type | Dispatch type for guest IFLs: |
qc_ifl_limithard_cap | 1 if pool's IFL virtual type has limithard capping |
qc_ifl_weight_capping | IFL weight-based capping value – scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_ziip_absolute_capping | zIIP absolute capping value – scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_ziip_capacity_cap | 1 if pool's zIIP virtual type has capped capacity |
qc_ziip_capped_capacity | Guest current capped capacity for shared virtual zIIPs – scaled value where 0x10000 equals to one core, or 0 if no capping set. While this field displays the capacity, either qc_ziip_capacity_cap or qc_ziip_limithard_cap must is set to indicate the kind of limit. |
qc_ziip_dispatch_limithard | 1 if guest zIIP dispatch type has LIMITHARD capping, |
qc_ziip_dispatch_type | Dispatch type for guest zIIPs: |
qc_ziip_limithard_cap | 1 if pool's zIIP virtual type has limithard capping |
qc_ziip_weight_capping | zIIP weight-based capping value – scaled value where 0x10000 equals to one core, or 0 if no capping set |
qc_layer_category | Layer category, see layer tables above for details |
qc_layer_category_num | Numeric representation of layer category, see enum qc_layer_categories |
qc_layer_extended_name | Guest extended name |
qc_layer_name | Name of container, see layer tables for details |
qc_layer_type | Layer type, see layer tables above for details |
qc_layer_type_num | Numeric representation of layer type, see enum qc_layer_types |
qc_layer_uuid | Universal unique ID |
qc_manufacturer | Company that manufactured box |
qc_mobility_enabled | 1 if guest is enabled for mobility, |
qc_has_secure | Indicates whether secure boot is available to the entity. Requires Linux kernel 5.3 or later. Note: This attribute is only ever available for the topmost layer. |
qc_secure | Indicates whether entity was booted using the secure boot feature Requires Linux kernel 5.3 or later. Note: This attribute is only ever available for the topmost layer. |
qc_model | Model identifier, see |
qc_model_capacity | Model capacity of machine, see |
qc_type_family | Family of the model, enum qc_model_families |
qc_num_cp_dedicated | Sum of dedicated CPs in layer |
qc_num_cp_shared | Sum of shared CPs in layer |
qc_num_cp_total | Sum of all CPs in layer |
qc_num_cpu_configured | Sum of configured CPs and IFLs in layer |
qc_num_cpu_dedicated | Sum of dedicated CPs and IFLs in layer |
qc_num_cpu_reserved | Sum of reserved CPs and IFLs in layer |
qc_num_cpu_shared | Sum of shared CPs and IFLs in layer |
qc_num_cpu_standby | Sum of standby CPs and IFLs in layer |
qc_num_cpu_total | Sum of all CPs and IFLs in layer |
qc_num_ifl_dedicated | Sum of dedicated IFLs in layer |
qc_num_ifl_shared | Sum of shared IFLs in layer |
qc_num_ifl_total | Sum of all IFLs (Integrated Facility for Linux) in layer |
qc_num_ziip_dedicated | Sum of dedicated zIIPs in layer |
qc_num_ziip_shared | Sum of shared zIIPs in layer |
qc_num_ziip_total | Sum of all zIIPs (Integrated Information Processor) in layer |
qc_partition_char | Partition characteristics, any combination of |
qc_partition_char_num | Numeric representation of partition characteristics, see enum qc_part_chars |
qc_partition_number | Partition number, see |
qc_plant | Identifier of the manufacturing plant, see |
qc_secondary_capability | Secondary capability rating, see |
qc_sequence_code | Sequence code of machine, see |
qc_type | 4-digit machine type |
qc_prorated_core_time | 1 if limithard caps uses prorated core time for capping |
qc_num_cp_threads | Threads per CP, values >1 indicate that SMT is enabled |
qc_num_ifl_threads | Threads per IFL, values >1 indicate that SMT is enabled |
qc_num_ziip_threads | Threads per zIIP, values >1 indicate that SMT is enabled |
qc_num_core_total | Sum of all CP and IFL cores in layer |
qc_num_core_configured | Sum of configure CP and IFL cores in layer |
qc_num_core_standby | Sum of standby CP and IFL cores in layer |
qc_num_core_reserved | Sum of reserved CP and IFL cores in layer |
qc_num_core_dedicated | Sum of dedicated CP and IFL cores in layer |
qc_num_core_shared | Sum of shared CP and IFL cores in layer |
qc_type_name | Name of IBM Z model in clear text |
qc_lic_identifier | Licensed Internal Code (LIC) level |
enum qc_cappings |
Numeric representation of the capping type, see qc_capping.
Enumerator | |
---|---|
QC_CAPPING_OFF | Capping turned off |
enum qc_layer_categories |
enum qc_layer_types |
enum qc_model_families |
enum qc_part_chars |
void qc_close | ( | void * | hdl | ) |
Closes the configuration handle and releases all memory allocated when the configuration was opened. The configuration handle is invalid after calling this function, as are any returned pointers of previous capacity function calls.
If logging or autodumping was enabled on qc_open(), environment variables QC_DEBUG
and QC_AUTODUMP
need to be set to integers <=0 on the final call to qc_close() (or whenever neither functionality is not required anymore) to correctly free up all resources.
hdl | Handle of the configuration to close. |
void qc_export_json | ( | void * | hdl | ) |
Prints the internal data in JSON format to stdout.
hdl | Handle of the configuration to use. |
int qc_get_attribute_float | ( | void * | hdl, |
enum qc_attr_id | id, | ||
int | layer, | ||
float * | value | ||
) |
Returns the attribute of type float designated by id
. If the attribute is not available at the specified layer, the attribute is not of type float, or another error occurred, return parameter valid
will be set accordingly.
hdl | Handle of the configuration to use. |
id | Attribute to retrieve. |
layer | Specifies the layer, e.g.
|
value | Return parameter returning the float attribute's value or undefined in case of an error.indicating validity as follows: |
int qc_get_attribute_int | ( | void * | hdl, |
enum qc_attr_id | id, | ||
int | layer, | ||
int * | value | ||
) |
Returns the attribute of type integer designated by id
. If the attribute is not available at the specified layer, the attribute is not of type integer, or another error occurred, return parameter valid
will be set accordingly.
hdl | Handle of the configuration to use. |
id | Attribute to retrieve. |
layer | Specifies the layer, e.g.
|
value | Return parameter returning the string attribute's value or undefined in case of an error. |
int qc_get_attribute_string | ( | void * | hdl, |
enum qc_attr_id | id, | ||
int | layer, | ||
const char ** | value | ||
) |
Returns the attribute of type string designated by id
. If the attribute is not available at the specified layer, the attribute is not of type string, or another error occurred, return parameter valid
will be set accordingly.
hdl | Handle of the configuration to use. |
id | Attribute to retrieve. |
layer | Specifies the layer, e.g.
|
value | Return parameter returning the string attribute's value or NULL in case of an error. |
int qc_get_num_layers | ( | void * | hdl, |
int * | rc | ||
) |
Get the number of layers.
hdl | Handle of the configuration to use. |
rc | Return parameter indicating the return code. Set to
|
void* qc_open | ( | int * | rc | ) |
Attaches to system information sources and prepares the extraction of system information. Some information may be gathered at this time already: under LPAR, /proc/sysinfo
is read and interpreted; under z/VM, *VMINFO data is read using the STHYI
instruction (requires z/VM 6.3 with APAR
VM65419
, or higher). Capacity queries then take place based on this information which could be considered cached.
Memory will be allocated in this function, which has to be released by closing the configuration again. While a configuration is open, SSI migration in z/VM is not blocked and can occur. In case a migration occurs after a configuration has been opened, closing the configuration and re-opening it ensures capacity information is used from the migrated-to system.
Use the following environment variables to operate built-in service facilities:
QC_DEBUG:
Set to an integer value/tmp/qclib-XXXXXX
or as specified by QC_DEBUG_FILE
if set.<STEM>
.dump-XXX on every qc_open() call (where STEM is /tmp/qclib-XXXXXX
or as specified by QC_DEBUG_FILE
if set.QC_DEBUG
to a value <=0 on the next qc_open() call.QC_DEBUG_FILE:
Stem to use for log files and dump directories (see QC_DEBUG
). Defaults to /tmp/qclib-XXXXXX
.QC_AUTODUMP:
Set to a value >0 to trigger a dump to a directory named /tmp/qclib-XXXXXX
.dump-XXX if an error is encountered within qc_open().QC_DEBUG
was set to a value >0QC_USE_DUMP:
To run with a previously generated dump instead of live data, point this environment variable to a directory containing the dump data. Requires compilation with CONFIG_DUMP_READING
set.QC_CHECK_CONSISTENCY:
Check data for consistency. Recommended for debugging scenarios only.rc | Return parameter indicating the return code. Set to
|