From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: aball@linux.vnet.ibm.com
Cc: Akio Takebe <takebe_akio@jp.fujitsu.com>,
xen-devel@lists.xensource.com, Ewan Mellor <ewan@xensource.com>
Subject: Re: [RFC] Is this process running on which machine?
Date: Mon, 27 Nov 2006 13:39:07 +0900 [thread overview]
Message-ID: <F2C711DDF97053takebe_akio@jp.fujitsu.com> (raw)
In-Reply-To: <D6C70D4A604369takebe_akio@jp.fujitsu.com>
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
next prev parent reply other threads:[~2006-11-27 4:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-18 9:10 [RFC] Is this process running on which machine? Akio Takebe
2006-11-18 13:53 ` Ewan Mellor
2006-11-20 1:57 ` Akio Takebe
2006-11-20 3:37 ` Akio Takebe
2006-11-21 3:03 ` Andrew D. Ball
2006-11-21 8:52 ` Akio Takebe
2006-11-27 4:39 ` Akio Takebe [this message]
2006-11-28 4:00 ` Akio Takebe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F2C711DDF97053takebe_akio@jp.fujitsu.com \
--to=takebe_akio@jp.fujitsu.com \
--cc=aball@linux.vnet.ibm.com \
--cc=ewan@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.