成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

如何Linux下得到CPU、內存及PCI信息

運維 系統運維
如何Linux下得到CPU、內存及PCI信息。

很多時候我們需要得到linux下面的硬件信息,
那么如何得到呢?
其實linux給出了多種途徑
我們看一下每一個命令,以便得到最詳細的信息
/*
二,硬件的查看
  1,lspci
  2,dmidecode
  3,dmesg
*/
1,查看pci的相關信息
先解釋一下概念:
什么是PCI
Peripheral Component Interconnect,外圍設備互聯,
它是計算機上面應用的設備總線(總線,就是bus,是傳輸數據信號的通道)
lspci
這個命令默認是已經安裝的,
如找不到此命令,可以安裝pciutils這個包
命令舉例:
lspci 
00:00.0 Host bridge: Intel Corporation 5000X Chipset Memory Controller Hub (rev 12)
00:02.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 2 (rev 12)
00:03.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 3 (rev 12)
00:04.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x8 Port 4-5 (rev 12)
00:05.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 5 (rev 12) 
00:06.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x8 Port 6-7 (rev 12)
00:07.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 7 (rev 12) 
00:10.0 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)        
00:10.1 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)        
00:10.2 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)        
00:11.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)   
00:13.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)   
00:15.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)        
00:16.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)        
00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)
00:1d.0 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)
00:1d.1 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)
00:1d.2 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)
00:1d.3 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)
00:1d.7 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09) 
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)                                      
00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09) 
00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)                     
01:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 08)
02:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)                                 
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)      
04:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)              
04:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)            
05:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)         
05:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)         
06:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)                                 
07:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)      
0e:0d.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)

從中看到的信息:Ethernet controller:這個是網卡
VGA compatible controller:這個是顯卡
USB Controller: USB控制器
SCSI storage controller: SCSI的存儲控制器    
說明:如果你感覺這份信息還不夠詳細,
那么可以在后面添加參數,有3個參數可以使用:
lspci -v   verbose 詳細
lspci -vv     very verbose  很詳細
lspci -vvv    even more verbose 更詳細
以樹結構來顯示pci總線:
lspci -tv
   
簡單顯示:
lspci -n
00:00.0 0600: 8086:25c0 (rev 12)
00:02.0 0604: 8086:25e2 (rev 12)
00:03.0 0604: 8086:25e3 (rev 12)
00:04.0 0604: 8086:25f8 (rev 12)
00:05.0 0604: 8086:25e5 (rev 12)
00:06.0 0604: 8086:25f9 (rev 12)
00:07.0 0604: 8086:25e7 (rev 12)
00:10.0 0600: 8086:25f0 (rev 12)
00:10.1 0600: 8086:25f0 (rev 12)
00:10.2 0600: 8086:25f0 (rev 12)
00:11.0 0600: 8086:25f1 (rev 12)
00:13.0 0600: 8086:25f3 (rev 12)
00:15.0 0600: 8086:25f5 (rev 12)
00:16.0 0600: 8086:25f6 (rev 12)
00:1c.0 0604: 8086:2690 (rev 09)
00:1d.0 0c03: 8086:2688 (rev 09)
00:1d.1 0c03: 8086:2689 (rev 09)
00:1d.2 0c03: 8086:268a (rev 09)
00:1d.3 0c03: 8086:268b (rev 09)
00:1d.7 0c03: 8086:268c (rev 09)
00:1e.0 0604: 8086:244e (rev d9)
00:1f.0 0601: 8086:2670 (rev 09)
00:1f.1 0101: 8086:269e (rev 09)
01:00.0 0100: 1000:0058 (rev 08)
02:00.0 0604: 1166:0103 (rev c3)
03:00.0 0200: 14e4:164c (rev 12)
04:00.0 0604: 8086:3500 (rev 01)
04:00.3 0604: 8086:350c (rev 01)
05:00.0 0604: 8086:3510 (rev 01)
05:01.0 0604: 8086:3514 (rev 01)
06:00.0 0604: 1166:0103 (rev c3)
07:00.0 0200: 14e4:164c (rev 12)
0e:0d.0 0300: 1002:515e (rev 02)
顯示其中的某一項:
lspci -d 14e4:164c -vvv
2,查看cpu的信息
cat /proc/cpuinfo
  
有幾顆CPU? cat /proc/cpuinfo | grep physical id
  
[root@dev ~]# cat /proc/cpuinfo | grep 'physical id'
physical id     : 0
physical id     : 0
physical id     : 0
physical id     : 0
如果physical id相同,表示這是一顆4核心的CPU
    
查看CPU的生產商和型號:
查看生產商:
cat /proc/cpuinfo | grep 'vendor_id'
查看型號:
cat /proc/cpuinfo | grep 'model name'
查看頻率:
cat /proc/cpuinfo | grep 'cpu MHz'
查看核心的數量:
cat /proc/cpuinfo | grep 'cpu cores'
 
 
3,查看內存的信息:
[root@dev ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          4048       1708       2339          0        164       1464
-/+ buffers/cache:         80       3967
Swap:         1983          0       1983
說明: -m參數,以M字節(megabytes)為單位查看內存大小,
上面的例子中我們可以看到,內存的總大小是4048M,也就是4G
        
想看到更詳細的內存信息?
dmidecode -t memory
# dmidecode 2.7                 
SMBIOS 2.5 present.             
Handle 0x1000, DMI type 16, 15 bytes.
Physical Memory Array               
        Location: System Board Or Motherboard
        Use: System Memory                  
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 32 GB             
        Error Information Handle: Not Provided
        Number Of Devices: 8                 
Handle 0x1100, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: 1024 MB                        
        Form Factor:            
        Set: 1                               
        Locator: DIMM1                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: 667 MHz (1.5 ns)              
        Manufacturer: 830B8089830B           
        Serial Number: E2940445              
        Asset Tag: 110818                    
        Part Number: NT1GT72U8PB1BN-3C       
Handle 0x1101, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: 1024 MB                        
        Form Factor:            
        Set: 1                               
        Locator: DIMM2                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: 667 MHz (1.5 ns)              
        Manufacturer: 830B8089830B           
        Serial Number: BB9C0441              
        Asset Tag: 110818                    
        Part Number: NT1GT72U8PB1BN-3C       
Handle 0x1102, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: 1024 MB                        
        Form Factor:            
        Set: 2                               
        Locator: DIMM3                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: 667 MHz (1.5 ns)              
        Manufacturer: 830B8089830B           
        Serial Number: 39A10445              
        Asset Tag: 110818                    
        Part Number: NT1GT72U8PB1BN-3C       
Handle 0x1103, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: 1024 MB                        
        Form Factor:            
        Set: 2                               
        Locator: DIMM4                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: 667 MHz (1.5 ns)              
        Manufacturer: 830B8089830B           
        Serial Number: BA9A0442              
        Asset Tag: 110818                    
        Part Number: NT1GT72U8PB1BN-3C       
Handle 0x1104, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: No Module Installed            
        Form Factor:            
        Set: 3                               
        Locator: DIMM5                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: Unknown                       
        Manufacturer:                        
        Serial Number:                       
        Asset Tag:                           
        Part Number:                         
Handle 0x1105, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits                 
        Data Width: 64 bits                  
        Size: No Module Installed            
        Form Factor:            
        Set: 3                               
        Locator: DIMM6                       
        Bank Locator: Not Specified          
        Type:                   
        Type Detail: Synchronous             
        Speed: Unknown                       
        Manufacturer:                        
        Serial Number:                       
        Asset Tag:                           
        Part Number:                         
Handle 0x1106, DMI type 17, 28 bytes.
Memory Device                       
        Array Handle: 0x1000        
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed
        Form Factor:
        Set: 4
        Locator: DIMM7
        Bank Locator: Not Specified
        Type:
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:
        Serial Number:
        Asset Tag:
        Part Number:
Handle 0x1107, DMI type 17, 28 bytes.
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed
        Form Factor:
        Set: 4
        Locator: DIMM8
        Bank Locator: Not Specified
        Type:
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:
        Serial Number:
        Asset Tag:
        Part Number:
從上面我們可以看到有4條1G的內存被安裝在前4條內存插槽上,而locator從DIMM5-DIMM8是空著的
前四條內存的型號為:Part Number: NT1GT72U8PB1BN-3C
生產商的ID是:Manufacturer: 830B8089830B

【編輯推薦】

  1. IBM Linux for Power 安裝工具包服務器整合技術原理及其實現
  2. Linux版Chrome將采用GTK+工具包開發
  3. Linux系統下C程序開發詳解
責任編輯:張燕妮 來源: ChinaUnix博客  
相關推薦

2009-02-16 18:27:09

2020-12-23 10:48:18

LinuxOSCPU

2021-01-18 10:53:48

LinuxOSCPU

2010-05-27 16:41:30

Linux查看版本

2019-07-10 05:08:05

CPU內存分頁管理

2021-05-28 10:10:05

LinuxCPU機器學習

2018-12-06 12:58:50

CPU內存模塊

2010-02-04 09:26:34

Linux vmsta

2024-05-15 09:03:45

2010-05-27 16:03:22

Linux查看cpu

2010-06-13 15:20:20

Linux 查看內存

2016-08-02 15:24:40

PCI總線布局

2022-05-27 11:59:22

Linux內存CPU

2019-03-07 09:25:59

LinuxCPU交換分區

2022-09-09 14:56:18

Linuxcpu

2014-07-28 16:47:41

linux性能

2021-10-15 08:51:09

Linux內存 Kmalloc

2021-02-21 11:48:30

內存磁盤IO

2024-07-31 11:59:23

linux內存磁盤

2016-10-19 13:32:31

JavaMemory
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 亚洲精品永久免费 | 成人在线精品视频 | 久久久一二三区 | 日韩中文字幕在线免费 | 国产成人综合网 | 一级欧美| 日屁网站 | 成人免费观看男女羞羞视频 | 精品一二区 | 黄色网址免费看 | 91xxx在线观看 | 久久国产高清 | 日韩在线视频一区 | 亚洲视频在线观看免费 | 日韩精品 电影一区 亚洲 | 欧美精品一区二区三区在线 | 成年免费大片黄在线观看一级 | 国产精品一区在线观看 | 久久99精品久久久久久噜噜 | 欧美13videosex性极品 | 久久免费视频观看 | 日日躁狠狠躁aaaaxxxx | 青青激情网 | 免费黄色大片 | 亚洲在线高清 | 免费一级毛片 | 1000部精品久久久久久久久 | 久久一 | 亚洲视频免费在线观看 | 国产日韩视频 | 这里只有精品999 | 亚洲一区久久久 | 综合网视频 | 中文天堂在线一区 | 国产男女猛烈无遮掩视频免费网站 | 欧美二区在线 | 久久久久久久综合 | 五月婷婷丁香 | 中文字幕精品一区 | 日韩一区二区三区视频 | 欧美自拍另类 |