On 2020-07-18 22:12, Alan Ackerman wrote: > Yes! I spent a fair amount of time writing EXECs to figure these things out > when I worked for Bank of America. I put the results on a web page that > listed all our VM systems. I’m retired so I don’t need it any more. > > Sent from my iPhone > > On Jul 18, 2020, at 11:59 AM, Mark Post <mp...@suse.com> wrote: > > On 7/17/20 12:18 PM, Marcy Cortes wrote: >> Late to the game, but I would probably make a .service file that did >> something like >> >> ExecStart= echo $(/sbin/vmcp q userid | awk '{print $3}') > /etc/vmsysname >> >> and then anything could look at the file. >> >> An LGR'd guest would be wrong, but I don't think you use that. > > Would people find it helpful if a command is introduced to the > s390-tools package that will return one or more of the following data > points: > 1. z/VM or KVM Guest name > 2. z/VM Host name > 3. KVM Host name > 4. LPAR name > 5. CEC name
qclib, which was linked to earlier in the thread, offers all the info. As the name implies, it is a library, but it comes with a sample program called qc_test that is intended for debugging purposes. I did some work to provide a standalone program based to provide the most commonly used data - at least the one *I* figured might be popular - and which, of course, does not reflect any of the fields requested above LOL It seems like there's a use for most of the data provided by qc_test, everybody seems to find interest in some data. So I'm contemplating externalization of qc_test output in some shape or form - but is that really consumable? However, externalizing it is easier said than done, since some of the fields require a lot of explanation, especially in virtualized environments. So: Would the output below help, or should we rather have a separate tool with a more comprehensible format? Here's some sample output from a Linux guest running under z/VM on top of a z/VM resource pool (qc_layer_name is the attribute that would reflect the values 1-5 above): [raspl@jungle qclib]$ ./qc_test We are running 5 layer(s) ===== Layer 0: CEC ============================================= qc_layer_type [n/a]: CEC qc_layer_category [n/a]: HOST qc_layer_type_num [n/a]: 1 qc_layer_category_num [n/a]: 2 qc_layer_name [F V]: X35 qc_manufacturer [S V]: IBM qc_type [S V]: 2827 qc_type_name [S ]: IBM zEnterprise EC12 qc_type_family [S ]: 0 qc_model_capacity [S ]: 703 qc_model [S ]: H66 qc_sequence_code [S V]: 0000000000089F25 qc_lic_identifier [S ]: <undefined> qc_plant [S V]: 02 qc_num_core_total [S ]: 68 qc_num_core_configured [S ]: 3 qc_num_core_standby [S ]: 0 qc_num_core_reserved [S ]: 65 qc_num_core_dedicated [ hV]: 2 qc_num_core_shared [ hV]: 61 qc_num_cp_total [ HV]: 3 qc_num_cp_dedicated [ hV]: 0 qc_num_cp_shared [ hV]: 3 qc_num_ifl_total [ HV]: 60 qc_num_ifl_dedicated [ hV]: 2 qc_num_ifl_shared [ hV]: 58 qc_num_ziip_total [ HV]: <undefined> qc_num_ziip_dedicated [ hV]: <undefined> qc_num_ziip_shared [ hV]: <undefined> qc_num_cp_threads [S ]: <undefined> qc_num_ifl_threads [S ]: <undefined> qc_num_ziip_threads [S ]: <undefined> qc_capability [S ]: 552.000000 qc_secondary_capability [S ]: 552.000000 qc_capacity_adjustment_indication [S ]: 100 qc_capacity_change_reason [S ]: 0 ===== Layer 1: LPAR ============================================= qc_layer_type [n/a]: LPAR qc_layer_category [n/a]: GUEST qc_layer_type_num [n/a]: 2 qc_layer_category_num [n/a]: 1 qc_layer_name [S V]: MYLPAR2 qc_layer_extended_name [S ]: <undefined> qc_layer_uuid [S ]: <undefined> qc_partition_number [S V]: 47 qc_partition_char [S ]: Shared qc_partition_char_num [S ]: 2 qc_adjustment [S ]: 333 qc_has_secure [F ]: <undefined> qc_secure [F ]: <undefined> qc_num_core_total [S ]: 1 qc_num_core_configured [S ]: 1 qc_num_core_standby [S ]: 0 qc_num_core_reserved [S ]: 0 qc_num_core_dedicated [S ]: 0 qc_num_core_shared [S ]: 1 qc_num_cp_total [ HV]: 1 qc_num_cp_dedicated [ hV]: 0 qc_num_cp_shared [ hV]: 1 qc_num_ifl_total [ HV]: 2 qc_num_ifl_dedicated [ hV]: 0 qc_num_ifl_shared [ hV]: 2 qc_num_ziip_total [ HV]: <undefined> qc_num_ziip_dedicated [ hV]: <undefined> qc_num_ziip_shared [ hV]: <undefined> qc_num_cp_threads [S ]: <undefined> qc_num_ifl_threads [S ]: <undefined> qc_num_ziip_threads [S ]: <undefined> qc_cp_absolute_capping [ hV]: 0 qc_cp_weight_capping [ hV]: 0 qc_ifl_absolute_capping [ hV]: 0 qc_ifl_weight_capping [ hV]: 0 qc_ziip_absolute_capping [ hV]: <undefined> qc_ziip_weight_capping [ hV]: <undefined> ===== Layer 2: z/VM-hypervisor ======================================== qc_layer_type [n/a]: z/VM-hypervisor qc_layer_category [n/a]: HOST qc_layer_type_num [n/a]: 3 qc_layer_category_num [n/a]: 2 qc_layer_name [ V]: MY_ZVM qc_cluster_name [ V]: <undefined> qc_control_program_id [S ]: z/VM 6.3.0 qc_adjustment [S ]: 500 qc_limithard_consumption [ V]: 1 qc_prorated_core_time [ V]: 0 qc_num_core_total [ V]: 3 qc_num_core_dedicated [ V]: 0 qc_num_core_shared [ V]: 3 qc_num_cp_total [ V]: 1 qc_num_cp_dedicated [ V]: 0 qc_num_cp_shared [ V]: 1 qc_num_ifl_total [ V]: 2 qc_num_ifl_dedicated [ V]: 0 qc_num_ifl_shared [ V]: 2 qc_num_ziip_total [ V]: <undefined> qc_num_ziip_dedicated [ V]: <undefined> qc_num_ziip_shared [ V]: <undefined> qc_num_cp_threads [ V]: <undefined> qc_num_ifl_threads [ V]: <undefined> qc_num_ziip_threads [ V]: <undefined> ===== Layer 3: z/VM-resource-pool ====================================== qc_layer_type [n/a]: z/VM-resource-pool qc_layer_category [n/a]: POOL qc_layer_type_num [n/a]: 4 qc_layer_category_num [n/a]: 3 qc_layer_name [ V]: POOLTEST qc_cp_limithard_cap [ V]: 0 qc_cp_capacity_cap [ V]: 0 qc_cp_capped_capacity [ V]: 0 qc_ifl_limithard_cap [ V]: 0 qc_ifl_capacity_cap [ V]: 1 qc_ifl_capped_capacity [ V]: 64467763 qc_ziip_limithard_cap [ V]: <undefined> qc_ziip_capacity_cap [ V]: <undefined> qc_ziip_capped_capacity [ V]: <undefined> ===== Layer 4: z/VM-guest ============================================ qc_layer_type [n/a]: z/VM-guest qc_layer_category [n/a]: GUEST qc_layer_type_num [n/a]: 5 qc_layer_category_num [n/a]: 1 qc_layer_name [S V]: GUEST_43 qc_capping [ H ]: off qc_capping_num [ H ]: 0 qc_mobility_enabled [ V]: 0 qc_has_secure [F ]: <undefined> qc_secure [F ]: <undefined> qc_num_cpu_total [S V]: 1 qc_num_cpu_configured [S ]: 1 qc_num_cpu_standby [S ]: 0 qc_num_cpu_reserved [S ]: 0 qc_num_cpu_dedicated [ HV]: 0 qc_num_cpu_shared [ HV]: 1 qc_num_cp_total [ V]: 0 qc_num_cp_dedicated [ V]: 0 qc_num_cp_shared [ V]: 0 qc_num_ifl_total [ V]: 1 qc_num_ifl_dedicated [ V]: 0 qc_num_ifl_shared [ V]: 1 qc_num_ziip_total [ V]: <undefined> qc_num_ziip_dedicated [ V]: <undefined> qc_num_ziip_shared [ V]: <undefined> qc_cp_dispatch_type [ V]: <undefined> qc_cp_dispatch_limithard [ V]: 0 qc_cp_capped_capacity [ V]: 0 qc_ifl_dispatch_type [ V]: 3 qc_ifl_dispatch_limithard [ V]: 0 qc_ifl_capped_capacity [ V]: 0 qc_ziip_dispatch_type [ V]: <undefined> qc_ziip_dispatch_limithard [ V]: <undefined> qc_ziip_capped_capacity [ V]: <undefined> qc_has_multiple_cpu_types [ V]: 0 -- Mit freundlichen Grüßen / Kind regards Stefan Raspl Linux on Z & Virtualization Development ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Schoenaicher Str. 220 71032 Boeblingen Phone: +49-7031-16-2177 E-Mail: stefan.ra...@de.ibm.com ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Gregor Pillen Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390