码迷,mamicode.com
首页 > 系统相关 > 详细

shell脚本(输出每个内存条的信息)

时间:2016-01-30 03:01:48      阅读:353      评论:0      收藏:0      [点我收藏+]

标签:shell   脚本   内存条   

cat file.txt

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 1

        Locator: DIMM_A1 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: DD8D8261

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 1

        Locator: DIMM_A2 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: E0871151

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 1

        Locator: DIMM_A3 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: E0871155

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 1

        Locator: DIMM_A4 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: E08711A7

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: No Module Installed

        Form Factor: DIMM

        Set: 2

        Locator: DIMM_A5 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 2

        Locator: DIMM_A6 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 2

        Locator: DIMM_A7 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 2

        Locator: DIMM_A8 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 3

        Locator: DIMM_A9 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 3

        Locator: DIMM_A10

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 3

        Locator: DIMM_A11

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 3

        Locator: DIMM_A12

        Bank Locator: Not Specified

        Type: DDR3

        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: 8192 MB

        Form Factor: DIMM

        Set: 4

        Locator: DIMM_B1 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: DC805FF5

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 4

        Locator: DIMM_B2 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: DD8D8256

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 4

        Locator: DIMM_B3 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: E0871153

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: 8192 MB

        Form Factor: DIMM

        Set: 4

        Locator: DIMM_B4 

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous Registered (Buffered)

        Speed: 1333 MHz

        Manufacturer: 002C04B3002C

        Serial Number: E0870CEB

        Asset Tag: 08113311

        Part Number: 36KSF1G72PZ-1G4D1 

--

Memory Device

        Array Handle: 0x1000

        Error Information Handle: Not Provided

        Total Width: 72 bits

        Data Width: 64 bits

        Size: No Module Installed

        Form Factor: DIMM

        Set: 5

        Locator: DIMM_B5 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 5

        Locator: DIMM_B6 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 5

        Locator: DIMM_B7 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 5

        Locator: DIMM_B8 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 6

        Locator: DIMM_B9 

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 6

        Locator: DIMM_B10

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 6

        Locator: DIMM_B11

        Bank Locator: Not Specified

        Type: DDR3

        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

        Form Factor: DIMM

        Set: 6

        Locator: DIMM_B12

        Bank Locator: Not Specified

        Type: DDR3

        Type Detail: Synchronous

        Speed: Unknown

        Manufacturer:             

        Serial Number:         

        Asset Tag:         

        Part Number:  


[root@abc ~]# cat file.txt | awk ‘BEGIN{RS="--\n";FS="\n"}{print $6,$9,$15}‘ | grep -v ‘No‘ | awk ‘OFS="---" {print $2" "$3,$5,$8}‘


8192 MB---DIMM_A1---DD8D8261

8192 MB---DIMM_A2---E0871151

8192 MB---DIMM_A3---E0871155

8192 MB---DIMM_A4---E08711A7

8192 MB---DIMM_B1---DC805FF5

8192 MB---DIMM_B2---DD8D8256

8192 MB---DIMM_B3---E0871153

8192 MB---DIMM_B4---E0870CEB


shell脚本(输出每个内存条的信息)

标签:shell   脚本   内存条   

原文地址:http://11072323.blog.51cto.com/11062323/1739995

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!