和硬盘相关的一些操作系统命令

sfdisk

(详见文档:http://fedora.linuxsir.org/main/?q=node/41):

   看有多少硬盘组成,但是如果在底层做了raid,在这里反映不出来

 

sfdisk -l

(如2块硬盘做了raid1,显示出来只有一块硬盘)

Disk /dev/cciss/c0d0: 17848 cylinders, 255 heads, 63 sectors/track

Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

 

   Device             Boot Start     End   #cyls    #blocks         Id  System

/dev/cciss/c0d0p1   *      0+     12     13-       104391          83  Linux

/dev/cciss/c0d0p2         13   17847   17835   143259637+   8e  Linux LVM

/dev/cciss/c0d0p3          0       -        0          0                  0    Empty

/dev/cciss/c0d0p4          0       -        0          0                  0    Empty

Warning: start=63 - this looks like a partition rather than

the entire disk. Using fdisk on it is probably meaningless.

[Use the --force option if you really want this]



hdparm检查磁盘的性能:

[root@tomcat57 ~]# hdparm -Tt  /dev/cciss/c0d0p2

/dev/cciss/c0d0p2:
 Timing cached reads:   3604 MB in  2.00 seconds = 1802.27 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
 Timing buffered disk reads:  110 MB in  3.16 seconds =  34.84 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device


看哪个进程占用磁盘IO最多


内核2.6.18以上的可以通过 dstat
以下的需要自己下载一个包进行,参考:  http://www.xaprb.com/blog/2009/08/23/how-to-find-per-process-io-statistics-on-linux/


通过看谁的page  faults 最多,来初步断定谁占用IO最多( 将top的输出通过faults进行排序。我们可以看到vmware产生最多的page faults。也就是说它进行了大量的IO操作

硬盘读写速度:

通过time命令,执行某个操作,看实际使用多少时间;





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值