Linux CPU Info: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[Linux#Getting_Runtime_Information]]
* [[Linux#Getting_Runtime_Information|Linux Runtime Information]]
* https://home.feodorov.com:9443/wiki/Wiki.jsp?page=LinuxProcessInformation
* https://home.feodorov.com:9443/wiki/Wiki.jsp?page=LinuxProcessInformation
* https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Cpuinfo
* https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Cpuinfo


=64 bit or 32 bit?=
=System-Wide CPU Runtime Statistics=
 
<span id="CPU_Runtime_Statistics"></span>CPU runtime statistics are computed based on [[/proc/stat]] values.
 
User time: [[Vmstat#us|vmstat us]]
 
Kernel time: [[Vmstat#sy|vmstat sy]]
 
Idle time: [[Vmstat#id|vmstat id]]
 
Time waiting for IO: [[Vmstat#wa|vmstat wa]]


<pre>
Steal time: [[Vmstat#st|vmstat st]]. The definition of "steal time":
uname -a
</pre>


<pre>
{{Internal|Linux Virtualization Concepts#Steal_Time|Steal Time}}
grep flags /proc/cpuinfo
</pre>


==lm==
=Per-Process CPU Runtime Statistics=


long mode - 64 bits
{{Internal|Linux Per-Process CPU Runtime Statistics|Per-Process CPU Runtime Statistics}}


==protected mode==
=Other Utilities=


32 bits
[[top]]
[[vmstat]]
lscpu


=vmstat=
=proc cpuinfo=


<pre>
<pre>
vmstat 1
cat /proc/cpuinfo
</pre>
</pre>


=top=
For more details see https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Cpuinfo.
 
=Virtualization Extensions=


Run "top" in batch mode, just one iteration:
To verify that a processor has its virtualization extensions enabled, run:


<pre>
<pre>
top -b -n 1
grep -E "vmx|svm" /proc/cpuinfo
</pre>
</pre>


=proc cpuinfo=
If the command generates output, it means the virtualization extensions are enabled.
 
More details {{External|[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Troubleshooting-Enabling_Intel_VT_x_and_AMD_V_virtualization_hardware_extensions_in_BIOS.html RHEL 7 Virtualization Administration Guide - Enabling Intel VT-x and AMD-V Virtualization Extensions in BIOS]}}
 
=64 bit or 32 bit?=
 
<pre>
uname -a
</pre>


<pre>
<pre>
cat /proc/cpuinfo  
grep flags /proc/cpuinfo
</pre>
</pre>


For more details see [[Linux cpuinfo]].
==lm==
 
long mode - 64 bits
 
==protected mode==
 
32 bits

Latest revision as of 22:35, 1 March 2018

Internal

System-Wide CPU Runtime Statistics

CPU runtime statistics are computed based on /proc/stat values.

User time: vmstat us

Kernel time: vmstat sy

Idle time: vmstat id

Time waiting for IO: vmstat wa

Steal time: vmstat st. The definition of "steal time":

Steal Time

Per-Process CPU Runtime Statistics

Per-Process CPU Runtime Statistics

Other Utilities

top
vmstat
lscpu

proc cpuinfo

cat /proc/cpuinfo 

For more details see https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Cpuinfo.

Virtualization Extensions

To verify that a processor has its virtualization extensions enabled, run:

grep -E "vmx|svm" /proc/cpuinfo

If the command generates output, it means the virtualization extensions are enabled.

More details

RHEL 7 Virtualization Administration Guide - Enabling Intel VT-x and AMD-V Virtualization Extensions in BIOS

64 bit or 32 bit?

uname -a
grep flags /proc/cpuinfo

lm

long mode - 64 bits

protected mode

32 bits