[virt-tools-list] [virt-what PATCH] Determine architecture via 'uname -m'
Richard W.M. Jones
rjones at redhat.com
Sat Jan 27 12:19:39 UTC 2018
On Sat, Jan 27, 2018 at 01:11:36PM +0100, Guido Günther wrote:
> 'uname -p' only gives unknown on x86_64, i386, arm6l (rpi) and aarch64
> It doesn't matter that much these days since cpuid is used most of the
> time but it's better to have this fixed (or remove the whole uname based
> virt-what.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> diff --git a/virt-what.in b/virt-what.in
> index 29b7b0d..2011ff4 100644
> --- a/virt-what.in
> +++ b/virt-what.in
> @@ -102,9 +102,9 @@ cpuid=$(virt-what-cpuid-helper)
> dmi=$(LANG=C dmidecode 2>&1)
> # Architecture.
> -# Note for the purpose of testing, we only call uname with -p option.
> +# Note for the purpose of testing, we only call uname with -m option.
> -arch=$(uname -p | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
> +arch=$(uname -m | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
> # Check for VMware.
> # cpuid check added by Chetan Loke.
Thanks - pushed.
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
More information about the virt-tools-list