linux怎么查看硬盘型号等信息

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux怎么查看硬盘型号等信息相关的知识,希望对你有一定的参考价值。

df-TH硬盘信息free内存信息cat/proc/cpu****后面的用tab补齐我记得是cpuinfo但不确定cat/proc/meminfo也可以查看内存 参考技术A 1,查看CPU信息:cat /proc/cpuinfo
2,查看板卡信息:cat /proc/pci
3,查看USB设备:cat /proc/bus/usb/devices
4,查看PCI信息:lspci (相比cat /proc/pci更直观)
5,查看内存信息:cat /proc/meminfo
6,查看键盘和鼠标:cat /proc/bus/input/devices
7,查看系统硬盘信息和使用情况:fdisk & disk – l & df
8,用硬件检测程序kuduz探测新硬件:service kudzu start ( or restart)
9,查看各设备的中断请求(IRQ):cat /proc/interrupts
10,查看启动硬件检测信息日志:dmesg more /var/log/dmesguname -auptime
几种查看Linux版本信息的方法:
1: uname -a
2: cat /proc/version
3: cat /etc/issue
4: lsb_release -a
5:cat /etc/redhat-release
6:rpm -q redhat-release
详解 lsb_release -a
登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:代码如下:
[hacder@NBCTC-14-15 ~]$ lsb_release -a
LSB Version: :core-3:1-amd64:core-3:1-ia32:core-3:1-noarch:graphics-3:1-amd64:graphics-3:1-ia32:graphics-3:1-noarch
Distributor ID: CentOS
Description: CentOS release 5:3 (Final)
Release: 5:3
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。本回答被提问者采纳
参考技术B hdparm -i /dev/hda

显示硬盘的相关设置
[root@cnscn ~]# hdparm /dev/sda
/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19929[柱面数]/255[磁头数]/63[扇区数], sectors = 320173056[总扇区数], start = 0[起始扇区数]

.显示硬盘的柱面、磁头、扇区数
[root@cnscn ~]# hdparm -g /dev/sda
/dev/sda:
geometry = 19929[柱面数]/255[磁头数]/63[扇区数], sectors = 320173056[总扇区数], start = 0[起始扇区数]

.评估硬盘的读取效率
[root@cnscn ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 166 MB in 3.03 seconds = 54.85 MB/sec
[root@cnscn ~]# hdparm -t /dev/sda
/dev/sda: www.2cto.com
Timing buffered disk reads: 160 MB in 3.01 seconds = 53.11 MB/sec
[root@cnscn ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 166 MB in 3.00 seconds = 55.31 MB/sec

.评估硬盘快取的读取效率
[root@cnscn ~]# hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 3784 MB in 2.00 seconds = 1894.60 MB/sec
[root@cnscn ~]# hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 3816 MB in 2.00 seconds = 1909.06 MB/sec
[root@cnscn ~]# hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 3728 MB in 2.00 seconds = 1866.29 MB/sec

.检测IDE硬盘的电源管理模式
[root@cnscn ~]# hdparm -C /dev/sda
/dev/sda:
drive state is: standby [省电模式]
.显示IDE硬盘的内定硬件规格
[root@cnscn ~]# hdparm -i /dev/sda

.直接检测硬盘的硬件规格
[root@cnscn ~]# hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: Maxtor 6B160M0
Serial Number: B404PTJH
Firmware Revision: BANC1BM0
Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
– www.2cto.com

CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 320173056
device size with M = 1024*1024: 156334 MBytes
device size with M = 1000*1000: 163928 MBytes (163 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32

Standby timer values: spec’d by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: unknown setting (0×0000)
Recommended acoustic management value: 192, current value: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* NOP cmd
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache

* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
* Automatic Acoustic Management feature set
SET MAX security extension www.2cto.com
Advanced Power Management feature set
* DOWNLOAD MICROCODE cmd
* General Purpose Logging feature set
* SMART self-test
* SMART error logging

Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
Checksum: correct

.检测并设置IDE硬盘的32位I/O模式
检测
[root@cnscn ~]# hdparm -c /dev/sda
/dev/sda:
IO_support = 0 (default 16-bit) [默认16位I/O]
设置
[root@cnscn ~]# hdparm -c 1 /dev/sda

.检测并设置IDE硬盘的DMA模式
[root@cnscn ~]# hdparm -d /dev/sda
/dev/sda:
… www.2cto.com
[root@cnscn ~]# hdparm -d 1 /dev/sda

.检测读取文件时,预先存入快取的扇区数
[root@cnscn ~]# hdparm -a /dev/sda
/dev/sda:
readahead = 256 (on)

.查询并设置硬盘多重扇区存取的扇区数,以增进硬盘的存取效率
[root@cnscn ~]# hdparm -m /dev/sda
[root@cnscn ~]# hdparm -m 参数值为整数值如8 /dev/sda
.将内顾虑缓冲的数据写入硬盘,并清除缓冲区的数据

linux下怎样查看硬盘型号和硬盘序列号的相关推荐

1,查看CPU信息:cat /proc/cpuinfo 2,查看板卡信息:cat /proc/pci 3,查看USB设备:cat /proc/bus/usb/devices 4,查看PCI信息:lspci (相比cat /proc/pci更直观) 5,查看内存信息:cat /proc/meminfo 参考技术A sudo hdparm -i /dev/sda 参考技术B smartctl -a /dev/sdx

以上是关于linux怎么查看硬盘型号等信息的主要内容,如果未能解决你的问题,请参考以下文章

linux 下查看硬件信息(mac,IP地址,硬盘型号,序列号等)

怎样查看电脑硬盘序号

如何查看Linux cpu/内存/硬盘/IO等数据?

如何查看MAC下硬盘编号??

如何查看硬盘缓存

linux下如何查看硬盘插在主板那个SATA接口上