On Tuesday, 06/22/2010 at 07:25 EDT, Michael 
MacIsaac/Poughkeepsie/i...@ibmus wrote:

> # cat foo 
> #!/bin/bash
> machType=`grep "Type:" /proc/sysinfo | awk '{print $2}'` 
> model=`grep "Model:" /proc/sysinfo | awk '{print $3}'` 
> vm01=`grep "VM01 Name:" /proc/sysinfo | awk '{print $3}'` 
> vm00=`grep "VM00 Name:" /proc/sysinfo | awk '{print $3}'` 
> LPAR=`grep "LPAR Name:" /proc/sysinfo | awk '{print $3}'` 
> echo "This CEC is a machine type $machType model $model" 
> echo "The LPAR is $LPAR" 
> if [ ${#vm00} != 0 ]; then 
>   echo "The user ID of the Linux is $vm01" 
> fi 
> if [ ${#vm01} != 0 ]; then 
>   echo "This is a third level Linux" 
>   echo "The user ID of the parent z/VM is $vm01" 
> fi 

But what was acknowledged in this thread was that while you can construct 
the "unique instance id" (location) of the virtual machine's execution 
context using the above technique, you cannot use it to determine the 
system id of the underlying VM system(s).

Whether you can use the former in place of the latter depends entirely 
upon what you are trying to accomplish and what naming conventions you 
have established.

Alan Altmark
z/VM Development
IBM Endicott

Reply via email to