使用MegaCli监控Linux硬盘
1.首先查看机器是否使用的是MegaRAID卡
dmesg | grep RAID
[ 6.932741] scsi host0: Avago SAS based MegaRAID driver
2.添加 megaraid 源:
修改 /etc/apt/sources.list 在末尾添加
deb http://hwraid.le-vert.net/ubuntu precise main
然后执行:
apt-get update
apt-get install megacli megactl megaraid-status
如果执行提示 GPG 错误,需要执行如下命令添加证书:
wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
然后再次执行:
apt-get install megacli megactl megaraid-status
3.使用megacli命令进行一些简单的查询
<i>显示所有RAID级别、设置及逻辑盘信息
sudo megacli -LDInfo -Lall -aALL
输出
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 1.090 TB
Sector Size : 512
Is VD emulated : No
Mirror Data : 1.090 TB
State : Optimal
Strip Size : 64 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No Exit Code: 0x00
<ii>显示所有的物理信息
sudo megacli -PDList -aAll
过滤输出
sudo megacli -PDList -aAll | grep "Firmware state\|Slot Number\|Error"
参考输出
Enclosure Device ID: 32
Slot Number: 11
Enclosure position: 1
Device Id: 11
WWN: 50000397eb88257a
Sequence Number: 2
Media Error Count: 0
Other Error Count: 4
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA Raw Size: 7.277 TB [0x3a3812ab0 Sectors]
Non Coerced Size: 7.276 TB [0x3a3712ab0 Sectors]
Coerced Size: 7.276 TB [0x3a3700000 Sectors]
Sector Size: 512
Logical Sector Size: 512
Physical Sector Size: 4096
Firmware state: JBOD
Device Firmware Level: GX4D
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x500056b3295a37cb
Connected Port Number: 0(path0)
Inquiry Data: 77N4K3BIFYRDTOSHIBA MG05ACA800E GX4D
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :28C (82.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No Enclosure Device ID: 32
Slot Number: 12
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 12
WWN: 5000CCA02D78FCDB
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS Raw Size: 1.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Sector Size: 512
Logical Sector Size: 512
Physical Sector Size: 512
Firmware state: Online, Spun Up
Device Firmware Level: FU29
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca02d78fcd9
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HGST HUC101812CSS200 FU2906J4JPYZ
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :55C (131.00 F)
PI Eligibility: No
Drive is formatted for PI information: Yes
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
参考:Linux系统下安装MegaCli64工具查看和管理raid卡
使用MegaCli监控Linux硬盘的更多相关文章
- Day 7 Linux之系统监控、硬盘分区等
Linux之系统监控.硬盘分区等 系统监控 系统监视和进程控制工具—top和free 1) 掌握top命令的功能:top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况, ...
- linux系统中的基础监控(硬盘,内存,系统负载,CPU,网络等)
Linux系统常见日常监控 系统信息 查看 CentOS 版本号:cat /etc/redhat-release 综合监控 nmon 系统负载 命令:w(判断整体瓶颈) 12:04:52 up 1 ...
- MegaCli 监控raid状态 限戴尔服务器
MegaCli 监控raid状态 MegaCli是一款管理维护硬件RAID软件,可以通过它来了解当前raid卡的所有信息,包括 raid卡的型号,raid的阵列类型,raid 上各磁盘状态,等等.通常 ...
- MegaCli 监控raid状态
MegaCli 监控raid状态 http://blog.chinaunix.net/uid-25135004-id-3139293.html 简介 MegaCli是一款管理维护硬件RAID软件,可以 ...
- 使用 Nmon 监控 Linux 的系统性能
Nmon(得名于 Nigel 的监控器)是IBM的员工 Nigel Griffiths 为 AIX 和 Linux 系统开发的一款计算机性能系统监控工具.Nmon 可以把操作系统的统计数据展示在屏幕上 ...
- (转)使用 Nmon 监控 Linux 的系统性能
看到一个使用Nmon的文章,写的很基础,适合新手,转载之.下面是原文的信息: 作者:Hitesh Jethva 译者:sonofelice 校对:wxy 传送门:linux.cn/article-68 ...
- NO.7day系统监控,硬盘分区和文件系统管理
系统监控,硬盘分区和文件系统管理 1.系统监控 top命令:top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.默认每5秒刷新屏幕数 ...
- 监控Linux系统性能的工具--nmon(一)
今天看到一资料上写着,nmon可以对linux系统进行性能监控,随手在自己的阿里云上敲了一下这个命令,提示'command not find' 一脸懵~,然后探索了一下如何安装这个工具以及如何更好的查 ...
- Loadrunner监控Linux系统资源
一.安装rsh和rpcbind 1.查看是否安装:rpm -qa |grep rsh 2.安装rsh:yum -y install rsh* 3.yum -y install nfs-utils r ...
随机推荐
- JS 数组方法
1.栈方法 ECMAScript 提供了一些让数组行为类似其他数据结构的方法 栈是一种后进先出(LIFO)的数据结构,也就是最新添加的项最早被移除:而栈中数据的添加和删除只发生在栈的顶部 数组可以对其 ...
- show full processlist
mysql 显示哪些线程正在运行: show full processlist; 如果mysql 发生了锁表的情况,这个命令很容易知道是哪个表被什么操作锁住了
- Java 适配器模式
在阎宏博士的<JAVA与模式>一书中开头是这样描述适配器(Adapter)模式的: 适配器模式把一个类的接口变换成客户端所期待的另一种接口,从而使原本因接口不匹配而无法在一起工作的两个类能 ...
- python 生成动态密码
import stringimport randomdef gen_psd(length=10): """length is password length"& ...
- django之模型层(model)--添加、单表查询、修改基础
上篇带大家简单做了一下图书表的创建.简单的查看和删除,今天会先简单介绍添加和修改,因为添加和修改与删除一样都很简单,本篇会相对多介绍一点单表查询,大家都知道数据库中查询是最重要的一部分,毕竟无论是修改 ...
- 20、collections模块和re模块(正则表达式详解)
从今天开始我们就要开始学习python的模块,今天先介绍两个常用模块collections和re模块.还有非常重要的正则表达式,今天学习的正则表达式需要记忆的东西非常多,希望大家可以认真记忆.按常理来 ...
- linux i2c 的通信函数i2c_transfer在什么情况下出现错误
问题: linux i2c 的通信函数i2c_transfer在什么情况下出现错误描述: linux i2c设备驱动 本人在写i2c设备驱动的时候使用i2c transfer函数进行通信的时候无法进行 ...
- Spring Boot + Mybatis 实现动态数据源
动态数据源 在很多具体应用场景的时候,我们需要用到动态数据源的情况,比如多租户的场景,系统登录时需要根据用户信息切换到用户对应的数据库.又比如业务A要访问A数据库,业务B要访问B数据库等,都可以使用动 ...
- 毕业论文Word格式技巧
word利用多级列表功能实现章节标题自动编号 坑:在选择级别1后,直接在当前对话框直接继续设置级别2:然后选中级别2,设置相应的格式,主要在将级别链接到样式处选择为标题2,然后要在库中显示的级别选择级 ...
- 使用插件扩展Docker
http://wwwbuild.net/dockerone/241249.html Docker吸引我的,同时也是促使其成功的一个重要方面,是其开箱即用的特性. “开箱即用”是指什么呢?简单来说, ...