1. 程式人生 > >linux /proc/cpuinfo檔案分析

linux /proc/cpuinfo檔案分析

  在Linux系統中,提供了proc檔案系統顯示系統的軟硬體資訊。如果想了解系統中CPU的提供商和相關配置資訊,則可以通過/proc/cpuinfo檔案得到。本文章針對該檔案進行簡單的總結。

  基於不同指令集(ISA)的CPU產生的/proc/cpuinfo檔案不一樣,基於X86指令集CPU的/proc/cpuinfo檔案包含如下內容:

processor  : 0
vendor_id  :GenuineIntel
cpu family  :6
model    :26
model name :Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
stepping    :5
cpu MHz    :1600.000
cache size  : 8192 KB
physical id  :0
siblings    :8
core id     : 0
cpu cores   :4
apicid         :0
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 acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm
bogomips   :4522.12
clflush size  :64
cache_alignment  : 64
address sizes    : 40 bits physical, 48 bits virtual
power management :

以上輸出項的含義如下:

processor :系統中邏輯處理核的編號。對於單核處理器,則課認為是其CPU編號,對於多核處理器則可以是物理核、或者使用超執行緒技術虛擬的邏輯核
vendor_id :CPU製造商     
cpu family :CPU產品系列代號
model   :CPU屬於其系列中的哪一代的代號
model name:CPU屬於的名字及其編號、標稱主頻
stepping   :CPU屬於製作更新版本
cpu MHz   :CPU的實際使用主頻
cache size   :CPU二級快取大小
physical id   :單個CPU的標號
siblings       :單個CPU邏輯物理核數
core id        :當前物理核在其所處CPU中的編號,這個編號不一定連續
cpu cores    :該邏輯核所處CPU的物理核數
apicid          :用來區分不同邏輯核的編號,系統中每個邏輯核的此編號必然不同,此編號不一定連續
fpu             :是否具有浮點運算單元(Floating Point Unit)
fpu_exception  :是否支援浮點計算異常
cpuid level   :執行cpuid指令前,eax暫存器中的值,根據不同的值

cpuid指令會返回不同的內容
wp             :表明當前CPU是否在核心態支援對使用者空間的防寫(Write Protection)
flags          :當前CPU支援的功能
bogomips   :在系統核心啟動時粗略測算的CPU速度(Million Instructions Per Second)
clflush size  :每次重新整理快取的大小單位
cache_alignment :快取地址對齊單位
address sizes     :可訪問地址空間位數
power management :對能源管理的支援,有以下幾個可選支援功能:

  ts:  temperature sensor

  fid:   frequency id control

  vid:  voltage id control

  ttp:  thermal trip

  tm:

  stc:

  100mhzsteps:

  hwpstate:

CPU資訊中flags各項含義:

fpu: Onboard (x87) Floating Point Unit
vme: Virtual Mode Extension
de: Debugging Extensions
pse: Page Size Extensions
tsc: Time Stamp Counter: support for RDTSC and WRTSC instructions
msr: Model-Specific Registers
pae: Physical Address Extensions: ability to access 64GB of memory; only 4GB can be accessed at a time though
mce: Machine Check Architecture
cx8: CMPXCHG8 instruction
apic: Onboard Advanced Programmable Interrupt Controller
sep: Sysenter/Sysexit Instructions; SYSENTER is used for jumps to kernel memory during system calls, and SYSEXIT is used for jumps: back to the user code
mtrr: Memory Type Range Registers
pge: Page Global Enable
mca: Machine Check Architecture
cmov: CMOV instruction
pat: Page Attribute Table
pse36: 36-bit Page Size Extensions: allows to map 4 MB pages into the first 64GB RAM, used with PSE.
pn: Processor Serial-Number; only available on Pentium 3
clflush: CLFLUSH instruction
dtes: Debug Trace Store
acpi: ACPI via MSR
mmx: MultiMedia Extension
fxsr: FXSAVE and FXSTOR instructions
sse: Streaming SIMD Extensions. Single instruction multiple data. Lets you do a bunch of the same operation on different pieces of input: in a single clock tick.
sse2: Streaming SIMD Extensions-2. More of the same.
selfsnoop: CPU self snoop
acc: Automatic Clock Control
IA64: IA-64 processor Itanium.
ht: HyperThreading. Introduces an imaginary second processor that doesn’t do much but lets you run threads in the same process a  bit quicker.
nx: No Execute bit. Prevents arbitrary code running via buffer overflows.
pni: Prescott New Instructions aka. SSE3
vmx: Intel Vanderpool hardware virtualization technology
svm: AMD “Pacifica” hardware virtualization technology
lm: “Long Mode,” which means the chip supports the AMD64 instruction set
tm: “Thermal Monitor” Thermal throttling with IDLE instructions. Usually hardware controlled in response to CPU temperature.
tm2: “Thermal Monitor 2″ Decrease speed by reducing multipler and vcore.
est: “Enhanced SpeedStep”

根據以上內容,我們則可以很方便的知道當前系統關於CPU、CPU的核數、CPU是否啟用超執行緒等資訊。

查詢系統具有多少個邏輯核:cat /proc/cpuinfo | grep "processor" | wc -l

查詢系統CPU的物理核數:cat /proc/cpuinfo | grep "cpu cores" | uniq

查詢系統CPU是否啟用超執行緒:cat /proc/cpuinfo | grep -e "cpu cores"  -e "siblings" | sort | uniq

  輸出舉例:

    cpu cores    : 6
    siblings     : 6

  如果cpu cores數量和siblings數量一致,則沒有啟用超執行緒,否則超執行緒被啟用。

查詢系統CPU的個數:cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

查詢系統CPU是否支援某項功能,則根以上類似,輸出結果進行sort, uniq和grep就可以得到結果。

【/proc/cpuinfo內容舉例】

1,Intel(R) Xeon(R) X5355

processor  : 0
vendor_id  : GenuineIntel
cpu famil  : 6
model     : 15
model name  : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping   : 7
cpu MHz   : 2666.766
cache size : 4096 KB
physical id : 0
siblings   : 4
core id    : 0
cpu cores  : 4
fpu      : yes
fpu_exception  : yes
cpuid level   : 10
wp      : yes
flags    : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5338.26
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 1
siblings    : 4
core id        : 0
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.75
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 0
siblings    : 4
core id        : 2
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.67
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 1
siblings    : 4
core id        : 2
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.68
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 4
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 0
siblings    : 4
core id        : 1
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.67
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 5
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 1
siblings    : 4
core id        : 1
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.68
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 6
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 0
siblings    : 4
core id        : 3
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.69
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 7
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHz
stepping    : 7
cpu MHz        : 2666.766
cache size    : 4096 KB
physical id    : 1
siblings    : 4
core id        : 3
cpu cores    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm
bogomips    : 5333.68
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

2, Intel(R) Core(TM) i7 930 @ 2.80GHz

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 4
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 5
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 6
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping	: 5
cpu MHz		: 2807.024
cache size	: 8192 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida
bogomips	: 5614.04
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

相關推薦

linux /proc/cpuinfo檔案分析

  在Linux系統中,提供了proc檔案系統顯示系統的軟硬體資訊。如果想了解系統中CPU的提供商和相關配置資訊,則可以通過/proc/cpuinfo檔案得到。本文章針對該檔案進行簡單的總結。   基於不同指令集(ISA)的CPU產生的/proc/cpuinfo檔案不一樣,基於X86指令集CPU的/proc

Linux作業系統中通過/proc/cpuinfo檔案查詢CPU詳細資訊

在前面的文章中介紹過,Linux系統的/proc目錄主要是包含系統程序和硬體資訊的動態檔案(例如:記憶體、CPU、網路配置等動態資訊),其中/proc/cpuinfo就是載入記錄了當前伺服器的CPU資訊。 在Linux作業系統中,通過cat /proc/cpuinfo可以檢視到——比如:幾個物理CP

linux /proc/cpuinfo 文件描寫敘述

kernel prevent ott media mov stream _id fun ews processor :系統中邏輯處理核的編號。對於單核處理器。則課覺得是其CPU編號,對於多核處理器則能夠是物理核、或者使用超線程技術虛擬的邏輯核 vend

linux /proc/stat 檔案說明

/proc/stat 檔案內容 # cat /proc/stat cpu 1411 1322 3070 1193539 2790 0 268 0 0 0 cpu0 472 658 787 297933 695 0 19 0 0 0 cpu1 314 1

Linux | proc虛擬檔案系統

在安裝新硬體到 Linux 系統之前,你會想要知道當前系統的資源配置狀況。 Linux 將這類資訊全集中在 /proc 檔案系統下。/proc 目錄下的檔案都是 Linux 核心虛擬出來的,當你讀取它們是,核心會實時提供檔案內容。藉由/proc,我們可得知

linux /proc/devices檔案與/dev目錄區別(轉)

關於標題內容的幾點解釋: 1、proc目錄是一個虛擬檔案系統,可以為linux使用者空間和核心空間提供互動 它只存在於記憶體中,而不佔實際的flash或硬碟空間 2、/proc/devices/裡的裝置是載入驅動程式時生成的 3、/dev/下的裝置是通過建立裝置節點生成的,使用者通過此裝置

Linux核心原始碼情景分析-特殊檔案系統/proc

    由於proc檔案系統並不物理地存在於任何裝置上,它的安裝過程是特殊的。對proc檔案系統不能直接通過mount()來安裝,而要先由系統核心在核心初始化時自動地通過一個函式kern_mount()安裝一次,然後再由處理系統初始化的程序通過mount()安裝,實際上是"重

Linux下/proc目錄下檔案分析

轉載地址:http://blog.csdn.net/zdwzzu2006/article/details/7747977 1. /proc目錄 Linux 核心提供了一種通過 /proc 檔案系統,在執行時訪問核心內部資料結構、改變核心設定的機制。proc檔案系統是一個偽檔案系統,它只存在記憶體當中,

linux /proc下的statm、maps、memmap 內存信息文件分析

分配 偏移量 文件路徑 heap atm 代碼段 share 地址 mem ls /proc 能看到一些數字命名的文件夾,這些數字就是對於進程的pid [root@localhost proc]# cat /proc/1/statm487 185 133 31 0 67

Linux下查看CPU信息[/proc/cpuinfo]

超線程 inf ica cor 這也 目錄 負載 2個 內核 最近在研究linux系統負載的時候,接觸到一些關於CPU信息查看的知識,和大家分享一下。通過對/proc/cpuinfo文件中的參數的分析,也學到了不少東西。 在linux操作系統中,CPU的信息在啟動的過程中被

Linux逆向---ELF格式分析檔案頭和程式頭

在Linux下,可以利用vim編輯器來對編譯生成後的可執行程式進行編輯,比如說把75jne指令改成74je指令,這樣可以在不重新編譯的情況下去修改程式的控制流,這樣玩感覺還是很有意思的,不過也僅限於此,所以我借了一本書想要學學逆向。。結果發現這本書真的難啃。。如果只是讀它的內容的話很快就讀過

linux core dump 檔案 gdb分析【轉】

core dump又叫核心轉儲, 當程式執行過程中發生異常, 程式異常退出時, 由作業系統把程式當前的記憶體狀況儲存在一個core檔案中, 叫core dump. (linux中如果記憶體越界會收到SIGSEGV訊號,然後就會core dump) 在程式執行的過程中,有

Linux /proc/net/ 下檔案用途

系統版本cat /proc/version Linux version 2.6.27.19-5-pae ([email protected]) (gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Li

linux Proc檔案系統介紹及運用總結

引言 先說一個剛剛發現的問題: 前兩天開啟測試機發現速度非常慢,top一看,發現java佔用CPU 99% 檢視對應pid,發現這個是新的話單採集程式gather: #ps -ef | grep java Root 5762 1 99 14:41 pts/0 00:0

宋牧春: Linux裝置樹檔案結構與解析深度分析(1)

本文轉載自微信公眾號linuxer 作者簡介 宋牧春,linux核心愛好者,喜歡閱讀各種開原始碼(uboot、linux、ucos、rt-thread等),對於優秀的程式碼框架及其痴迷。現就職於一家手機研發公司,任職Android BSP開發工程師。 正文開始 1. Device Tree簡介 裝置樹就是描

linux proc檔案介紹

先說一個剛剛發現的問題:前兩天開啟測試機發現速度非常慢,top一看,發現java佔用CPU 99%檢視對應pid,發現這個是新的話單採集程式gather:#ps -ef | grep javaRoot 5762 1 99 14:41 pts/0 00:00:01 java -

linux /proc檔案系統解析

sys  該目錄在 1.3.57 的核心裡開始出現, 包含一些對應於核心變數的檔案和子目錄. 你能讀這些變數, 有的也能通過proc修改, 或用系統呼叫 sysctl(2) 修改. 目前該目錄下有如下三個子目錄: kernel;, ;net;, ;vm 每個各自包括一些檔案和子目錄. kernel  該目

Linux下檢視CPU資訊[/proc/cpuinfo]

最近在研究linux系統負載的時候,接觸到一些關於CPU資訊檢視的知識,和大家分享一下。通過對/proc/cpuinfo檔案中的引數的分析,也學到了不少東西。 在linux作業系統中,CPU的資訊在啟動的過程中被裝載到虛擬目錄/proc下的cpuinfo檔案中,我們可以通過

宋牧春: Linux裝置樹檔案結構與解析深度分析(2)

作者簡介 宋牧春,linux核心愛好者,喜歡閱讀各種開原始碼(uboot、linux、ucos、rt-thread等),對於優秀的程式碼框架及其痴迷。現就職於一家手機研發公司,任職Android BSP開發工程師。 正文開始 前情提要: 6. platform_device和device_node

Linux proc/%d/stat檔案詳解

Linux stat檔案。也終於弄明白了這一堆堆砌的數字的意思。   [[email protected] ~]# cat /proc/6873/stat   6873 (a.out) R 6723 6873 6723 34819 6873 8388608