[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC] Is this process running on which machine?



Hi,

I remake my scripts.
I found dmidecode sometimes don't work on HVM domain
and it is not installed on default system of some distribution.
So I use /proc/acpi/dsdt.
Please comments.

===================================================================
#!/bin/bash

IS_X86HVM="$(strings /proc/acpi/dsdt | grep int-xen)"
if [ x"${IS_X86HVM}" != x ]; then
        echo "this is x86 hvm machine"
elif [ -f /proc/xen/capabilities ] ; then
        if $(grep -q control_d /proc/xen/capabilities); then
                echo "this is dom0."
        else
                echo "this is domU."
        fi
else
                echo "this is native machine"
fi
===================================================================

Best Regards,

Akio Takebe

>Hi, Andrew
>
>Thank you for you comment.
>
>>You can use dmidecode on HVM domU's running Linux.  This reads the
>>SMBIOS tables.  The system information type (type 1) will tell you that
>>it's an HVM domU.
>Yes, dmidecode is a good way.
>The following way is also another good way.
>lspci | grep "5853:0001" 
>
>I'll remake the scripts.
>I'd like to make a command like "uname".
>
>Best Regars,
>
>Akio Takebe
>
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.