Re: How to determine Linux real CPUs vs hyperthreaded (ht) virtual CPUs?
From: Orak Listalavostok (oraklistal_at_yahoo.com)
Date: 05/31/04
- Next message: Rich Piotrowski: "Re: Goodbye Redhat?"
- Previous message: at: "Re: Goodbye Redhat?"
- Maybe in reply to: Orak Listalavostok: "How to determine Linux real CPUs vs hyperthreaded (ht) virtual CPUs?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 May 2004 21:09:46 -0700
> From: hzmonte (hzmonte@hotmail.com)
> Subject: how do I know hyperthreading is enabled
> Newsgroups: comp.os.linux.misc
> Date: 2004-03-15 04:56:54 PST
>
> how do I know hyperthreading is enabled on any arbitrary Linux PC?
a) This should report the total number of physical CPUs:
grep -i "physical id" /proc/cpuinfo | sort -u | wc -l
b) This should report the total number of logical CPUs:
grep -i "processor" /proc/cpuinfo | sort -u | wc -l
c) The difference, is hyperthreaded.
Here is an annotated report from an IBM X335:
egrep -i "processor|physical id" /proc/cpuinfo
grep -E "processor|physical id" /proc/cpuinfo
which outputs (for example):
processor : 0 (CPU 0 is the first logical)
physical id : 0 (CPU 0 is the first physical)
processor : 1 (CPU 1 is the second logical)
physical id : 3 (CPU 3 is the second physical)
processor : 2 (CPU 2 is the third logical)
physical id : 0 (CPU 0 is the first physical)
processor : 3 (CPU 3 is the fourth logical)
physical id : 3 (CPU 3 is the second physical)
Orak
- Next message: Rich Piotrowski: "Re: Goodbye Redhat?"
- Previous message: at: "Re: Goodbye Redhat?"
- Maybe in reply to: Orak Listalavostok: "How to determine Linux real CPUs vs hyperthreaded (ht) virtual CPUs?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|