列出scsi/sata设备信息,比如硬盘驱动器,光盘驱动器。
[root@baremetal-3-77 ~]# yum install iscsi*
[root@baremetal-3-77 ~]# man lsscsi
-s : 显示容量大小。
-c : 用全称显示默认的信息。
-d : 显示设备主,次设备号。
-g : 显示对应的sg设备名。
-H : 显示主机控制器列表,-Hl,-Hlv。
-l : 显示相关属性,-ll,-lll=-L。
-v : 显示设备属性所在目录。
-x : 以16进制显示lun号。
-p : 输出DIF,DIX 保护类型。
-P : 输出有效的保护模式信息。
-i : 显示udev相关的属性
-w : 显示WWN
[root@baremetal-3-77 ~]# lsscsi
[0:2:0:0] disk DELL PERC H330 Mini 4.25 /dev/sda
-----------------------------------------------------------------------------------------
第一列 : SCSI设备id:host, channel,id,lun。
第二列 : 设备类型。
第3,4、5、6,7列 : 设备厂商,型号,版本信息。
最后一列 : 设备主节点名。
[root@baremetal-3-77 ~]# lsscsi -s
[0:2:0:0] disk DELL PERC H330 Mini 4.25 /dev/sda 1.19TB
[root@baremetal-3-77 ~]# lsscsi -l
[0:2:0:0] disk DELL PERC H330 Mini 4.25 /dev/sda
state=running queue_depth=256scsi_level=6type=0device_blocked=0timeout=90
[root@baremetal-3-77 ~]# lsscsi -d
[0:2:0:0] disk DELL PERC H330 Mini 4.25 /dev/sda [8:0]
[root@baremetal-3-77 ~]# lsscsi -g
[0:2:0:0] disk DELL PERC H330 Mini 4.25 /dev/sda /dev/sg0
[root@baremetal-3-77 ~]# lsscsi -u
lsscsi: invalid option --'u'
Usage: lsscsi [--classic] [--device] [--generic] [--help] [--hosts]
[--kname] [--list] [--lunhex] [--long] [--protection]
[--scsi_id] [--size] [--sysfsroot=PATH] [--transport]
[--verbose] [--version] [--wwn] []
where:
--classic|-c alternate output similar to 'cat /proc/scsi/scsi'
--device|-d show device node's major + minor numbers
--generic|-g show scsi generic device name
--help|-h this usage information
--hosts|-H lists scsi hosts rather than scsi devices
--kname|-k show kernel name instead of device nodename
--list|-L additional information output one
attribute=value per line
--long|-l additional information output
--lunhex|-x show LUN part of tuple as hex number inT10 format;
use twice to getfull 16digit hexadecimal LUN
--protection|-p show target and initiator protection information
--protmode|-P show negotiated protection information mode
--scsi_id|-i show udev derived /dev/disk/by-id/scsi* entry
--size|-s show disk size
--sysfsroot=PATH|-y PATH setsysfs mount point to PATH (def: /sys)
--transport|-t transport information fortarget or, if'--hosts'
given, forinitiator
--verbose|-v output path names where data is found
--version|-V output version string and exit
--wwn|-w output WWN fordisks (from /dev/disk/by-id/wwn*)
filter output list (def: '*:*:*:*'(all))
List SCSI devices or hosts, optionally with additional information
[root@baremetal-3-77 ~]# lsscsi -L -t
[0:0:0:0] disk spi:0 /dev/sda
transport=spi
target_id=0
max_offset=127
max_width=1
min_period=25
offset=0
period=1020
width=0
[2:0:0:0] cd/dvd ata: /dev/sr0
transport=ata
[root@baremetal-3-77 ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
座: 2
NUMA 节点: 2
厂商 ID: GenuineIntel
CPU 系列: 6
型号: 63
型号名称: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz
步进: 2
CPU MHz: 1418.304
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4999.85
虚拟化: VT-x
L1d 缓存: 32K
L1i 缓存: 32K
L2 缓存: 256K
L3 缓存: 30720K
NUMA 节点0 CPU: 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46
NUMA 节点1 CPU: 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47
Flags: 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 smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb invpcid_single ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear spec_ctrl intel_stibp flush_l1d
[root@baremetal-3-77 ~]# lsusb
Bus 001Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001Device 002: ID 8087:800a Intel Corp.
Bus 002Device 002: ID 8087:8002 Intel Corp.
Bus 003Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003Device 002: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 003Device 003: ID 045e:0084 Microsoft Corp. Basic Optical Mouse
Bus 003Device 004: ID 413c:a001 Dell Computer Corp. Hub
[root@baremetal-3-77 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.1T 0disk
├─sda1 8:1 0400M 0part /boot
├─sda2 8:2 0 16G 0part [SWAP]
└─sda3 8:3 0 1.1T 0part /
如果文章有任何错误欢迎不吝赐教,其次大家有任何关于运维的疑难杂问,也欢迎和大家一起交流讨论。关于运维学习、分享、交流,笔者开通了微信公众号【运维猫】,感兴趣的朋友可以关注下,欢迎加入,建立属于我们自己的小圈子,一起学运维知识。群主还经营一家猫小铺饰品店,喜欢的小伙伴欢迎????前来下单。
扫描二维码
获取更多精彩
运维猫公众号
有需要技术交流的小伙伴可以加我微信,期待与大家共同成长,本人微信:
扫描二维码
添加私人微信
运维猫博主
扫码加微信
最近有一些星友咨询我知识星球的事,我也想继续在星球上发布更优质的内容供大家学习和探讨。运维猫公众号平台致力于为大家提供免费的学习资源,知识星球主要致力于即将入坑或者已经入坑的运维行业的小伙伴。
点击阅读原文 查看更多精彩内容!!!