From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [RFC] Is this process running on which machine? Date: Mon, 27 Nov 2006 13:39:07 +0900 Message-ID: References: <1164078197.24087.56.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: aball@linux.vnet.ibm.com Cc: Akio Takebe , xen-devel@lists.xensource.com, Ewan Mellor List-Id: xen-devel@lists.xenproject.org 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@lists.xensource.com >http://lists.xensource.com/xen-devel