Number of physical and virtual processors

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Number of physical and virtual processors
# 1  
Old 11-15-2013
Number of physical and virtual processors

Hi,

i am trying to find out hpw many virtual and physical processors does any linux machine has:
output of /proc/cpuinfo is as below :
Code:
 
[root@VM172016001139 etc]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
stepping        : 4
cpu MHz         : 2933.437
cache size      : 12288 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up nonstop_tsc arat pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm
bogomips        : 5866.87
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: [8]

using this info how can i figure out how many physical or virtual processor does any linux machine has...is der any better way to find out or any small script
# 2  
Old 11-15-2013
Code:
grep processor /proc/cpuinfo

# 3  
Old 11-15-2013
Logical:
Code:
grep '^processor' /proc/cpuinfo

Physical:
Code:
awk '/^physical id/ && s[$NF]++==0' /proc/cpuinfo

Cores:
Code:
awk -F: '/^physical id/ {ph=$NF} /^core id/ && a[ph,$NF]++==0' /proc/cpuinfo

Pipe each to wc -l to get the number!
# 4  
Old 11-15-2013
It is easy to find the number and type of physical processors.

What do you mean by virtual processors? As in virtual machines?
# 5  
Old 11-16-2013
From the earlier posts, I'm assuming by virtual processors OP means processor threads.
# 6  
Old 11-17-2013
Code:
lscpu

# 7  
Old 11-18-2013
Thanks a lot "MadeInGermany"...Could u please send me the output of below script which is used to find the number of physical processor of machine :
Code:
 
awk '/^physical id/ && s[$NF]++==0' /proc/cpuinfo

i only have virtual machines..so i just want to know how the output looks on physical machine

in fact for all the three commands output on physical machine

Last edited by omkar.jadhav; 11-18-2013 at 09:08 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Need help on physical and virtual cpu

HI, I need a command to find, 1) Avaiable Physical CPU 2) Avaiable virtual CPU TIA (1 Reply)
Discussion started by: sumanthupar
1 Replies

2. Solaris

How to count number of physical and virtual processors on Solaris machine.?

hi, I am using command psrinfo -p to check the number of physical processors present on any soalris machine.I want to check the number of virtual processors assigned for particular solaris machine. which command/set of command need to be used which can grep or show the total virtual processors... (8 Replies)
Discussion started by: omkar.jadhav
8 Replies

3. UNIX for Advanced & Expert Users

Server is virtual or physical?

Hi All, How can I know whether the server I am connecting to is a virtual or physical one? The server might be having any Unix OS (Linux/Solaris/HP-UX etc.). Is there any system files / commands which can show these concrete information? Thanks in advance for the replies. sanzee (1 Reply)
Discussion started by: sanzee007
1 Replies

4. AIX

Processsing Units and Virtual Processors.

Hi, on redhat linux 5.5 (IBM PPC) os, whenever I am running the command top, it is showing 8 cpu. Processing Units Property Current Pending Minimum 0.1 Assigned 0.8 Maximum 1 Virtual Processors Property Current Pending Minimum 1 Assigned 4 ... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

5. AIX

Need help understand Virtual Processors

First of all I have performed a Google search and internal search and found several descriptions but nothing I can wrap my head around and feel 100% confident about. I feel really silly for asking this as I manage a P6 570 with 12 lpars but I have difficulity with Virtual Processors. I can... (3 Replies)
Discussion started by: juredd1
3 Replies

6. Solaris

Physical or Virtual

Hi, I am on an Solaris machine "SunOS 5.10 Generic_139556-08 i86pc i386 i86pc"..how do i check if I am on an physical or an virtaul server. Thanks. (6 Replies)
Discussion started by: jjoy
6 Replies

7. UNIX for Dummies Questions & Answers

translating physical/virtual addresses

Hi all, I am new to Linux kernel/user space programming having been an assembly programmer in my previous life. I am now using 2.6.x kernel on an embedded CPU that has a few dedicated hardware blocks (including more CPU running just C-code, i.e., no operating system). There is a single DRAM... (1 Reply)
Discussion started by: agaurav
1 Replies

8. HP-UX

How to find the number of physical processors and architecture in a hp-ux machine

Hi, I have two questions here. I need to find out the number of physical processors the HP-UX operating system is running in. Here i am referring to the physical processors in a system and not the number of cores. I can get the number of cores using the command 'ioscan -fnkC processor'.... (7 Replies)
Discussion started by: shawshank
7 Replies

9. UNIX for Advanced & Expert Users

AIX p5 virtual processors setting

Have a p570 LPAR capped/smt set to 4 physical processors. And currently have virtual processors set to 6 which gives 12 logical processors at AIX. This is for an Oracle9i database server running 4 instances. What should virtual processors be set to? at least initially? And how to determine when... (3 Replies)
Discussion started by: guttew
3 Replies

10. Shell Programming and Scripting

get physical and virtual memory

What command can i use to get the physical and virtual memory of a database? (7 Replies)
Discussion started by: tads98
7 Replies
Login or Register to Ask a Question