|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [RFC] Is this process running on which machine?
 
Hi, all
I'd like to know "Is this process running on which machine?"
For example, a native machien, or dom0, or domU, or HVM..
So I research codes of xen,
then I make the following shell.
(I haven't confirmed HVM yet because I don't use VTx machine.)
What do you think about it?
=========================================================================
#!/bin/bash
if [ -d /sys/hypervisor ] ; then
        UUID=$(cat /sys/hypervisor/uuid)
        if [ x"$UUID" == x"00000000-0000-0000-0000-000000000000" ]; then
                echo "this is dom0."
        else
                echo "this is domU."
        fi
else
        IS_HVM=$(strings /proc/acpi/dsdt | grep -i xen)
        if [ x"IS_HVM" != x ]; then
                echo "this is hvm machine"
        else
                echo "this is native machine"
        fi
fi
=========================================================================
Best Regards,
Akio Takebe
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
- [Xen-devel] [RFC] Is this process running on which machine?,
Akio Takebe <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |