歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> linux下查看各種硬件信息

linux下查看各種硬件信息

日期:2017/3/3 11:34:46   编辑:Linux技術

監測硬件有沒有被正確識別以及監控

首先是CPU型號線程數和主頻

可以直接查看cpuinfo文件

cat /proc/cpuinfo
由於比較多所以過濾處理一下
cat /proc/cpuinfo|grep name|awk -F ':' '{print$2}'|uniq -c
      2  Intel(R) Atom(TM) CPU D425   @ 1.80GHz
可以看到主頻 型號和線程數

內存

同理可產看meminfo文件 只看總量和可用的話只需要取前兩行

cat /proc/meminfo |head -2
MemTotal:        1912344 kB
MemFree:         1804808 kB
或者直接 free -m
free -m
             total       used       free     shared    buffers     cached
Mem:          1867        102       1765          0          6         28
-/+ buffers/cache:         67       1800
Swap:         1999          0       1999
這裡也可以看到交換的使用情況

物理硬盤

可以使用 fdisk -l

fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbf4fbf4f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26         281     2048000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             281        9730    75896832   83  Linux
可以看到硬盤和分區信息顯卡

顯卡的話其實不重要了不過可以用lspci看到

lspci | grep "VGA"
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller
同理這個命令可以看到主板設備和pci pcie設備 包括網卡聲卡儲存控制器等等
lspci 
00:00.0 Host bridge: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 02)

最後溫度的話可以使用lm_sensors查看

首先安裝

yum install lm_sensors -y
然後第一次運行要先檢測主板的傳感器
sensors-detect
一路yes就行了 檢測完之後會自動配置

之後執行sensors命令就能查看溫度電壓以及風扇轉速信息了

sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +51.0°C  (crit = +100.0°C)                  

it8712-isa-0a10
Adapter: ISA adapter
in0:         +1.02 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in1:         +1.63 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in2:         +3.34 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in3:         +2.90 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in4:         +3.01 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in5:         +1.49 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in6:         +1.04 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in7:         +2.91 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
Vbat:        +3.17 V
fan1:          0 RPM  (min =    0 RPM)
fan2:          0 RPM  (min =    0 RPM)
fan3:          0 RPM  (min =    0 RPM)
temp1:       +26.0°C  (low  =  -1.0°C, high = +127.0°C)  ALARM  sensor = thermal diode
temp2:      -128.0°C  (low  =  -1.0°C, high = +127.0°C)  sensor = disabled
temp3:      +116.0°C  (low  =  -1.0°C, high = +127.0°C)  ALARM  sensor = thermal diode
cpu0_vid:   +2.050 V
本文出自 “迷妄少年と小世界” 博客,請務必保留此出處http://hoshizora.blog.51cto.com/11765507/1811683

Copyright © Linux教程網 All Rights Reserved