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

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命令,执行某个操作,看实际使用多少时间;





你可能感兴趣的:(vmware,html,linux,.net,Blog)