自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

如何在Linux下得到硬盤及usb信息

運維 系統(tǒng)運維
如何得到硬盤的信息?用fdisk -l 可以得到系統(tǒng)中已安裝的硬盤列表及分區(qū)情況
如何得到硬盤的信息?
1,用fdisk -l 可以得到系統(tǒng)中已安裝的硬盤列表及分區(qū)情況
[root@localhost lhd]# fdisk -l
Disk /dev/sda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1275    10241406    c  W95 FAT32 (LBA)
/dev/sda2            1276        4870    28876837+   f  W95 Ext'd (LBA)
/dev/sda5            1276        2550    10241406    b  W95 FAT32
/dev/sda6            2551        2575      200781   83  Linux
/dev/sda7            2576        4870    18434556   8e  Linux LVM
2,如何得到硬盤的品牌及相關信息
1,smartctl -i /dev/sda
說明: smartctl是用來控制和監(jiān)視 smart disk的程序
 -i 參數(shù)用來顯示設備的相關信息
              
例:
[root@localhost lhd]# smartctl -i /dev/sda
smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MP0402H
Serial Number:    S03WJ10YC01628
Firmware Version: UC100-11
User Capacity:    40,060,403,712 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 0
Local Time is:    Wed Jan 28 23:21:47 2009 CST
==> WARNING: May need -F samsung or -F samsung2 enabled; see manual for details.
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
2,有時使用smartctl不能得到我們預期的信息,例如:
[root@dev ~]# smartctl -i /dev/sda
smartctl version 5.36 [i686-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Device: Dell     VIRTUAL DISK     Version: 1028
Device type: disk
Local Time is: Wed Jan 28 23:09:50 2009 CST
Device does not support SMART
這種情況如何處理:
    
[root@dev ~]# cat /proc/scsi/scsi                  
Attached devices:                                  
Host: scsi0 Channel: 00 Id: 00 Lun: 00              
Vendor: SEAGATE  Model: ST3146855SS      Rev: S527
Type:   Direct-Access                    ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: SEAGATE  Model: ST3146855SS      Rev: S527
Type:   Direct-Access                    ANSI SCSI revision: 05
Host: scsi0 Channel: 01 Id: 00 Lun: 00
Vendor: Dell     Model: VIRTUAL DISK     Rev: 1028
Type:   Direct-Access                    ANSI SCSI revision: 05
   
   
   
   
3,如何得到usb設備的信息
lsusb
例如:
[root@localhost lhd]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c00f Logitech, Inc. MouseMan Traveler/Mobile
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
查看詳細信息,可以加 -v
lsusb -v
查看某一個設備:
[root@localhost lhd]# lsusb -s 003:002 -v                           
Bus 003 Device 002: ID 046d:c00f Logitech, Inc. MouseMan Traveler/Mobile
Device Descriptor:                                                      
bLength                18                                             
bDescriptorType         1                                             
bcdUSB               2.00                                             
bDeviceClass            0 (Defined at Interface level)                
bDeviceSubClass         0                                             
bDeviceProtocol         0                                             
bMaxPacketSize0         8                                             
idVendor           0x046d Logitech, Inc.                              
idProduct          0xc00f MouseMan Traveler/Mobile                    
bcdDevice           11.10                                             
iManufacturer           1 Logitech                                    
iProduct                2 USB-PS/2 Optical Mouse                      
iSerial                 0                                             
bNumConfigurations      1                                             
Configuration Descriptor:                                             
bLength                 9                                           
bDescriptorType         2                                           
wTotalLength           34                                           
bNumInterfaces          1                                           
bConfigurationValue     1                                           
iConfiguration          0                                           
bmAttributes         0xa0                                           
(Bus Powered)                                                     
Remote Wakeup
MaxPower               98mA
Interface Descriptor:
bLength                 9
bDescriptorType         4
bInterfaceNumber        0
bAlternateSetting       0
bNumEndpoints           1
bInterfaceClass         3 Human Interface Device
bInterfaceSubClass      1 Boot Interface Subclass
bInterfaceProtocol      2 Mouse
iInterface              0
HID Device Descriptor:
bLength                 9
bDescriptorType        33
bcdHID               1.10
bCountryCode            0 Not supported
bNumDescriptors         1
bDescriptorType        34 Report
wDescriptorLength      52
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength                 7
bDescriptorType         5
bEndpointAddress     0x81  EP 1 IN
bmAttributes            3
Transfer Type            Interrupt
Synch Type               None
Usage Type               Data
wMaxPacketSize     0x0004  1x 4 bytes
bInterval              10
Device Status:     0x0000
(Bus Powered)

【編輯推薦】

  1. 實驗——LINUX常用網絡測試命令
  2. 嵌入式設備上的Linux系統(tǒng)開發(fā)
  3. Linux 操作指導專題(華為內部)
責任編輯:張燕妮 來源: ChinaUnix博客  
相關推薦

2009-02-16 18:08:01

linux硬件信息cpu

2020-05-15 07:00:00

Linux硬盤信息

2023-02-14 07:41:07

Linux 系統(tǒng)USB 驅動器

2015-10-22 13:07:29

USB設備權限Linux

2020-01-10 16:45:05

LinuxWindows 10USB

2020-06-08 17:00:52

LinuxUSBexFAT

2020-04-30 13:50:11

Linux網卡信息

2018-08-13 09:57:15

LinuxFio硬盤性能

2017-03-09 19:32:22

LinuxWindowsUSB

2020-11-22 07:20:15

LinuxEtcherUSB

2017-02-08 21:20:24

LinuxUbuntu加密硬盤

2009-02-16 20:16:52

Linux網卡硬件查看

2016-11-17 12:24:09

Linux壞道

2022-11-07 15:29:06

UbuntuLinuxCPU

2021-02-22 18:30:37

LinuxUSB啟動盤Windows

2011-04-06 10:53:36

MySQL

2009-02-19 09:53:19

Ubuntu系統(tǒng)監(jiān)視

2021-05-28 10:10:05

LinuxCPU機器學習

2009-05-26 12:20:34

Linux系統(tǒng)硬盤優(yōu)化

2020-12-23 10:48:18

LinuxOSCPU
點贊
收藏

51CTO技術棧公眾號