Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2583868
  • 博文数量: 323
  • 博客积分: 10211
  • 博客等级: 上将
  • 技术积分: 4934
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-27 14:56
文章分类

全部博文(323)

文章存档

2012年(5)

2011年(3)

2010年(6)

2009年(140)

2008年(169)

分类: 系统运维

2008-03-06 16:01:57

 

1. 使用iostat命令找出最繁忙的硬盘.
#iostat 1 10
iostat命令输出:
tty:  ---tin  ---tout  avg-cpu: % user % sys % idle % iowait
---------0.1 ---4.6------------0.1 ---0.3 ---99.6---0.1
Disks:---% tm_act ------------Kbps ---tps ---Kb_read Kb_wrtn
hdisk0---89.0 --623.2 ---------0.0 ---125827 12264
hdisk1---0.1 ---0.8 -----------0.1---1443 ---323
cd0 -----0.0 ---0.0 -----------0.0 ---18 ---0

2. 找出硬盘对应的文件系统:
#lspv -l hdisk#
hdisk0:
LV NAME ------LPs ---PPs DISTRIBUTIONMOUNT POINT
hd2 ----------303 ---303 51..38..107..107..00 /usr
paging00 -----1 ------1 01..00..00..00..00 N/A
lv00----------69 -----69 00..69..00..00..00 /stash

3. 找出运行在文件系统或逻辑卷上的进程:
fuser -cux followed by or
例如:
#fuser -cux /dev/hd6 or fuser -cux /var

/dev/hd2:1e(root) 1928e(root) 2626e(root) 3132e(root)3628e(root)
进程ID后的字符表示进程访问该文件的方式:
c - Uses the file as the current directory(当前目录).
e - Uses the file as a program's executable object(可执行程序).
r - Uses the file as the root directory(作为根目录).
s - Uses the file as a shared library (共享库).

阅读(1425) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~