Ubuntu下查看CPU、内存和硬盘详细信息的几个命令(分色排版)

前端之家收集整理的这篇文章主要介绍了Ubuntu下查看CPU、内存和硬盘详细信息的几个命令(分色排版)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

http://blog.csdn.net/suchto/article/details/46330235/

http://www.sijitao.net/1749.html

Ubuntu下查看cpu、内存和硬盘详细信息的几个命令

发表时间:2014-09-24 14:43 | 分类:Linux | 浏览:3,336 次

大文实验室/大文哥

壹捌陆捌零陆捌捌陆捌贰

21504965 AT qq.com

完成时间:2017/12/11 10:33

版本:V1.0

cpu

型号:grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'

rootroot@cm-System-Product-Name:~$

cpu为6核心12线程的Intel(R) Core(TM) i7-4930K cpu @ 3.40GHz,在淘宝的时价大概为1000¥!)

rootroot@cm-System-Product-Name:~$ grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'

Intel(R) Core(TM) i7-4930K cpu @ 3.40GHz

Intel(R) Core(TM) i7-4930K cpu @ 3.40GHz

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ cat /proc/cpuinfo

processor: 0

vendor_id: GenuineIntel

cpu family: 6

model: 62

model name: Intel(R) Core(TM) i7-4930K cpu @ 3.40GHz

stepping: 4

microcode: 0x416

cpu MHz: 1200.000

cache size: 12288 KB

physical idsiblings: 12

core idcpu coresapicidinitial apicidfpu: yes

fpu_exceptioncpuid level: 13

wpflags: 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 pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms

bogomips: 6803.50

clflush size: 64

cache_alignmentaddress sizes: 46 bits physical,48 bits virtual

power management:

processor: 1

vendor_id: GenuineIntel

cpu family: 6

model: 62

model name: Intel(R) Core(TM) i7-4930K cpu @ 3.40GHz

stepping: 4

microcode: 0x416

cpu MHz: 1200.000

cache size: 12288 KB

physical id: 0

siblings: 12

core idcpu coresapicid: 2

initial apicidfpu: yes

fpu_exceptioncpuid level: 13

wpflags: 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 pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms

bogomips: 6803.50

clflush size: 64

cache_alignmentaddress sizes: 46 bits physical,48 bits virtual

power management:

: 3

: 8

: 5

: 10

: 7

: 9

: 11

rootroot@cm-System-Product-Name:~$

数量lscpu |grep "cpu socket" |awk '{print $NF}' 或 lscpu |grep "Socket" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "cpu socket" |awk '{print $NF}' ?ò lscpu |grep "Socket" |awk '{print $NF}'

awk: 致命错误: 无法以读模式打开文件“?ò”(没有那个文件或目录)

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "cpu socket" |awk '{print $NF}' 或 lscpu |grep "Socket" |awk '{print $NF}'

awk: 致命错误: 无法以读模式打开文件“或”(没有那个文件或目录)

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "cpu socket" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "Socket" |awk '{print $NF}'

1

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu

Architecture: x86_64

cpu 运行模式: 32-bit,64-bit

Byte Order: Little Endian

cpu(s): 12

On-line cpu(s) list: 0-11

每个核的线程数:2

每个座的核数: 6

Socket(s): 1

NUMA 节点: 1

厂商 ID: GenuineIntel

cpu 系列: 6

型号: 62

步进: 4

cpu MHz: 1200.000

BogoMIPS: 6803.50

虚拟化: VT-x

L1d 缓存: 32K

L1i 缓存: 32K

L2 缓存: 256K

L3 缓存: 12288K

NUMA node0 cpu(s): 0-11

rootroot@cm-System-Product-Name:~$

每个cpu的核数:lscpu |grep "Core(s) per socket" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "Core(s) per socket" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ lscpu |grep "Core(s) per socket"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ cat /proc/cpuinfo| grep "cpu cores"| uniq

cpu cores : 6

rootroot@cm-System-Product-Name:~$

内存:

卡槽数量sudo dmidecode -t memory |grep "Number Of Devices" |awk '{print $NF}'或sudo dmidecode -t memory |grep "Associated Memory Slots" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep "Number Of Devices" |awk '{print $NF}'

[sudo] password for rootroot:

8

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep "Associated Memory Slots" |awk '{print $NF}'

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory

[sudo] password for rootroot:

# dmidecode 2.12

SMBIOS 2.7 present.

Handle 0x0031,DMI type 16,23 bytes

Physical Memory Array

Location: System Board Or Motherboard

Use: System Memory

Error Correction Type: Multi-bit ECC

Maximum Capacity: 96 GB

Error Information Handle: Not Provided

Number Of Devices: 8

Handle 0x0033,DMI type 17,34 bytes

Memory Device

Array Handle: 0x0031

Total Width: 72 bits

Data Width: 64 bits

Size: No Module Installed

Form Factor: DIMM

Set: None

Locator: ChannelA_Dimm1

Bank Locator: ChannelA

Type: Unknown

Type Detail: Synchronous

Speed: Unknown

Manufacturer: ChannelA_Dimm1_Manufacturer

Serial Number: ChannelA_Dimm1_SerNum

Asset Tag: ChannelA_Dimm1_AssetTag

Part Number: ChannelA_Dimm1_PartNum

Rank: Unknown

Configured Clock Speed: Unknown

Handle 0x0035,255);">Locator: ChannelA_Dimm2

Manufacturer: ChannelA_Dimm2_Manufacturer

Serial Number: ChannelA_Dimm2_SerNum

Asset Tag: ChannelA_Dimm2_AssetTag

Part Number: ChannelA_Dimm2_PartNum

Handle 0x0037,255);">Locator: ChannelB_Dimm1

Bank Locator: ChannelB

Manufacturer: ChannelB_Dimm1_Manufacturer

Serial Number: ChannelB_Dimm1_SerNum

Asset Tag: ChannelB_Dimm1_AssetTag

Part Number: ChannelB_Dimm1_PartNum

Handle 0x0039,255);">Locator: ChannelB_Dimm2

Manufacturer: ChannelB_Dimm2_Manufacturer

Serial Number: ChannelB_Dimm2_SerNum

Asset Tag: ChannelB_Dimm2_AssetTag

Part Number: ChannelB_Dimm2_PartNum

Handle 0x003B,34 bytes

Memory Device

Array Handle: 0x0031

Error Information Handle: Not Provided

Total Width: 72 bits

Data Width: 64 bits

Size: 8192 MB

Form Factor: DIMM

Set: None

Locator: ChannelC_Dimm1

Bank Locator: ChannelC

Type: DDR3

Type Detail: Synchronous

Speed: 1866 MHz

Manufacturer: Samsung

Serial Number: 133D751E

Asset Tag: ChannelC_Dimm1_AssetTag

Part Number: M391B1G73QH0-CMA

Rank: 2

Configured Clock Speed: 1866 MHz

Handle 0x003D,255);">Locator: ChannelC_Dimm2

Bank Locator: ChannelC

Manufacturer: ChannelC_Dimm2_Manufacturer

Serial Number: ChannelC_Dimm2_SerNum

Asset Tag: ChannelC_Dimm2_AssetTag

Part Number: ChannelC_Dimm2_PartNum

Handle 0x003F,0);">Locator: ChannelD_Dimm1

Bank Locator: ChannelD

Serial Number: 133D75BB

Asset Tag: ChannelD_Dimm1_AssetTag

Handle 0x0041,255);">Locator: ChannelD_Dimm2

Bank Locator: ChannelD

Manufacturer: ChannelD_Dimm2_Manufacturer

Serial Number: ChannelD_Dimm2_SerNum

Asset Tag: ChannelD_Dimm2_AssetTag

Part Number: ChannelD_Dimm2_PartNum

Configured Clock Speed: Unknown

rootroot@cm-System-Product-Name:~$

内存数量sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep 'Size:.*MB' |wc -l

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep 'Size:.*MB' |wc -l

2

rootroot@cm-System-Product-Name:~$

内存型号:

内存支持类型:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Type:"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Type:"

Type: Unknown

Type: DDR3

Type: Unknown

rootroot@cm-System-Product-Name:~$

每个内存频率:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"

Speed: Unknown

Speed: 1866 MHz

Speed: Unknown

rootroot@cm-System-Product-Name:~$

每个内存大小:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"

Size: No Module Installed

Size: 8192 MB

Size: No Module Installed

rootroot@cm-System-Product-Name:~$

硬盘:

硬盘数量、大小:sudo fdisk -l |grep "Disk /dev/sd"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo fdisk -l |grep "Disk /dev/sd"

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sda: 2000.4 GB,2000398934016 bytes

Disk /dev/sdb: 2000.4 GB,255);">Disk /dev/sdc: 3000.6 GB,3000592982016 bytes

Disk /dev/sdd: 240.1 GB,240057409536 bytes

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo fdisk -l

255 heads,63 sectors/track,243201 cylinders,total 3907029168 sectors

Units = 扇区 of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00027761

设备 启动 起点 终点 块数 Id 系统

/dev/sda1 2046 3907028991 1953513473 5 扩展

/dev/sda5 2048 3907028991 1953513472 83 Linux

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk identifier: 0x00000000

Disk identifier: 0x00058aad

/dev/sdd1 * 2046 423940095 211969025 5 扩展

/dev/sdd2 423940096 468860927 22460416 83 Linux

/dev/sdd5 2048 501759 249856 83 Linux

/dev/sdd6 503808 9879551 4687872 82 Linux 交换 / Solaris

/dev/sdd7 9881600 423940095 207029248 83 Linux

rootroot@cm-System-Product-Name:~$

硬盘型号:sudo hdparm -i /dev/sda |grep "Model"

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo hdparm -i /dev/sda |grep "Model"

Model=ST2000NM0033-9ZM175,FwRev=SN04,SerialNo=S1X096FL

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo hdparm -i /dev/sdb |grep "Model"

Model=ST2000DM001-1ER164,FwRev=CC26,SerialNo=W4Z431LJ

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo hdparm -i /dev/sdc |grep "Model"

Model=ST3000VX000-1ES166,FwRev=CV27,SerialNo=Z5046VYH

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$

rootroot@cm-System-Product-Name:~$ sudo hdparm -i /dev/sdd |grep "Model"

Model=INTEL SSDSC2BW240A4,FwRev=DC32,SerialNo=PHDA4403005H2403GN

rootroot@cm-System-Product-Name:~$

原文链接:https://www.f2er.com/ubuntu/350332.html

猜你在找的Ubuntu相关文章