Linux 查看CPU,內存,硬盤 !轉

Linux 查看CPU,內存,硬盤

   本文轉自: http://hi.baidu.com/mumachuntian/item/a401368dbe8a66cab07154e8

1 查看CPUweb


1.1 查看CPU個數
# cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
2
**uniq命令:刪除重複行;wc –l命令:統計行數**服務器


1.2 查看CPU核數
# cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores       : 4ide


1.3 查看CPU型號
# cat /proc/cpuinfo | grep 'model name' |uniq
model name      : Intel(R) Xeon(R) CPU           E5630  @ 2.53GHzui


總結:該服務器有2個4核CPU,型號Intel(R) Xeon(R) CPU E5630 @ 2.53GHzspa


2 查看內存code


2.1 查看內存總數
#cat /proc/meminfo | grep MemTotal
MemTotal:     32941268 kB  //內存32Gorm


2.2 查看內存條數內存


本節內容引自新浪博文《Linux查看內存條數》
查看原文:ci


# dmidecode |grep -A16 "Memory Device$"
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 2048 MB                 //1條2G內存
        Form Factor: DIMM
        Set: 1
        Locator: DIMM1
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: 667 MHz
        Manufacturer: 7F7F7F7F7F510000
        Serial Number: 0403E324
        Asset Tag: 450721
        Part Number: 72T256220HR3SA   
--
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 2048 MB                    //1條2G內存
        Form Factor: DIMM
        Set: 1
        Locator: DIMM2
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: 667 MHz
        Manufacturer: 7F7F7F7F7F510000
        Serial Number: 0403E324
        Asset Tag: 450721
        Part Number: 72T256220HR3SA   
--
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed           //1個內存空槽
        Form Factor: DIMM
        Set: 2
        Locator: DIMM3
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:                
        Serial Number:        
        Asset Tag:      
        Part Number:                  
--
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed               //1個內存空槽
        Form Factor: DIMM
        Set: 2
        Locator: DIMM4
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:                
        Serial Number:        
        Asset Tag:      
        Part Number:                  
--
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed            //1個內存空槽
        Form Factor: DIMM
        Set: 3
        Locator: DIMM5
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:                
        Serial Number:        
        Asset Tag:      
        Part Number:                  
--
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed        //1個內存空槽
        Form Factor: DIMM
        Set: 3
        Locator: DIMM6
        Bank Locator: Not Specified
        Type: DDR2
        Type Detail: Synchronous
        Speed: Unknown
        Manufacturer:                
        Serial Number:        
        Asset Tag:      
        Part Number:   get

 

總結:該服務器有兩條2G內存 ,空餘4個插槽


3 查看硬盤


3.1 查看硬盤大小
# fdisk -l | grep Disk
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
總結:硬盤大小146.7G,即廠商標稱的160G


4 結語


若是您在閱讀過程當中有任何疑問,發現任何紕漏,哪怕一個標點符號,您均可以經過email to : yuyi20060503@163.com來提出您寶貴的問題和意見。做者將會在下一個修訂版中將您錄入修訂名單,感謝您誠摯的閱讀。

 

Enoch

Software Testing Engeneer

相關文章
相關標籤/搜索