dbginfo: Collect CPI data of the KVM guests

Collect Control-Program Identification (CPI) data of the KVM
guests. The CPI data contains system name, system type,
system level and sysplex name of the guests. It also provides
the timestamp in which these data were colleceted from the
guests.

Note:
CPI information for SEL guests require explicit enablement.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Suggested-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Jörn Siglen <siglen@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Shalini Chellathurai Saroja
2025-08-14 09:55:11 +02:00
committed by Jan Höppner
parent 5a78c7f45d
commit 783ae9735e
+17
View File
@@ -1302,11 +1302,28 @@ collect_kvm() {
# domain/guest specific commands
domain_list=$(virsh list --all --name)
path="/machine/sclp/s390-sclp-event-facility/sclpcpi"
props="timestamp\
system_name\
system_type\
system_level\
sysplex_name"
if test -n "${domain_list}"; then
for domain in ${domain_list}; do
call_run_command "virsh dominfo ${domain}" "${OUTPUT_FILE_KVM}"
call_run_command "virsh domblklist ${domain}" "${OUTPUT_FILE_KVM}"
call_run_command "virsh domstats ${domain}" "${OUTPUT_FILE_KVM}"
for prop in ${props}; do
qm=$(printf '{
"execute": "qom-get",
"arguments": {
"path": "%s",
"property": "%s"
}
}' "${path}" "${prop}")
call_run_command "virsh qemu-monitor-command ${domain} \
--pretty '${qm}'" "${OUTPUT_FILE_KVM}"
done
done
else
echo "no KVM domains found" | tee -a ${OUTPUT_FILE_KVM}