Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2029730
  • 博文数量: 593
  • 博客积分: 20034
  • 博客等级: 上将
  • 技术积分: 6779
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-06 14:07
文章分类

全部博文(593)

文章存档

2016年(1)

2011年(101)

2010年(80)

2009年(10)

2008年(102)

2007年(16)

2006年(283)

我的朋友

分类:

2006-05-26 23:40:43

Using filemon for Detailed I/O Analysis

The command uses the trace facility to obtain a detailed picture of I/O activity during a time interval. Since it uses the trace facility, filemon can be run only by root or by a member of the system group.

In AIX Version 4, the filemon command is packaged as part of the Performance Toolbox for AIX. To determine whether filemon is available, use:

lslpp -lI perfagent.tools

If this package has been installed, filemon is available.

Tracing is started by the filemon command, optionally suspended with trcoff and resumed with trcon, and terminated with trcstop. As soon as tracing is terminated, filemon writes its report to stdout. The following sequence of commands gives a simple example of filemon use:

# filemon -o fm.test.out ; cp smit.log /dev/null ; trcstop

The report produced by this sequence, in an otherwise-idle system, was:

Wed Jan 12 11:28:25 1994
System: AIX alborz Node: 3 Machine: 000249573100
    
0.303 secs in measured interval
Cpu utilization:  55.3%
    
Most Active Segments
------------------------------------------------------------------------
  #MBs  #rpgs  #wpgs  segid  segtype              volume:inode
------------------------------------------------------------------------
   0.1     26      0   0984  persistent           /dev/hd1:25
   0.0      1      0   34ba  .indirect            /dev/hd1:4
    
Most Active Logical Volumes
------------------------------------------------------------------------
  util  #rblk  #wblk   KB/s  volume               description
------------------------------------------------------------------------
  0.66    216      0  357.0  /dev/hd1             /home
    
Most Active Physical Volumes
------------------------------------------------------------------------
  util  #rblk  #wblk   KB/s  volume               description
------------------------------------------------------------------------
  0.65    216      0  357.0  /dev/hdisk1          320  MB SCSI
    
------------------------------------------------------------------------
Detailed VM Segment Stats   (4096 byte pages)
------------------------------------------------------------------------
    
SEGMENT: 0984  segtype: persistent  volume: /dev/hd1  inode: 25
segment flags:          pers 
reads:                  26      (0 errs)
  read times (msec):    avg  45.644 min   9.115 max 101.388 sdev  33.045
  read sequences:       3
  read seq. lengths:    avg     8.7 min       1 max      22 sdev     9.5
SEGMENT: 34ba  segtype: .indirect  volume: /dev/hd1  inode: 4
segment flags:          pers jnld sys 
reads:                  1       (0 errs)
  read times (msec):    avg  16.375 min  16.375 max  16.375 sdev   0.000
  read sequences:       1
  read seq. lengths:    avg     1.0 min       1 max       1 sdev     0.0
    
------------------------------------------------------------------------
Detailed Logical Volume Stats   (512 byte blocks)
------------------------------------------------------------------------
    
VOLUME: /dev/hd1  description: /home
reads:                  27      (0 errs)
  read sizes (blks):    avg     8.0 min       8 max       8 sdev     0.0
  read times (msec):    avg  44.316 min   8.907 max 101.112 sdev  32.893
  read sequences:       12
  read seq. lengths:    avg    18.0 min       8 max      64 sdev    15.4
seeks:                  12      (44.4%)
  seek dist (blks):     init    512
                        avg   312.0 min       8 max    1760 sdev   494.9
time to next req(msec): avg   8.085 min   0.012 max  64.877 sdev  17.383
throughput:             357.0 KB/sec
utilization:            0.66
------------------------------------------------------------------------
Detailed Physical Volume Stats   (512 byte blocks)
------------------------------------------------------------------------
    
VOLUME: /dev/hdisk1  description: 320  MB SCSI
reads:                  14      (0 errs)
  read sizes (blks):    avg    15.4 min       8 max      32 sdev     8.3
  read times (msec):    avg  13.989 min   5.667 max  25.369 sdev   5.608
  read sequences:       12
  read seq. lengths:    avg    18.0 min       8 max      64 sdev    15.4
seeks:                  12      (85.7%)
  seek dist (blks):     init 263168,
                        avg   312.0 min       8 max    1760 sdev   494.9
  seek dist (cyls):     init    399
                        avg     0.5 min       0 max       2 sdev     0.8
time to next req(msec): avg  27.302 min   3.313 max  64.856 sdev  22.295
throughput:             357.0 KB/sec
utilization:            0.65

The Most Active Segments report lists the most active files. To identify unknown files, you could translate the logical volume name, /dev/hd1, to the mount point of the file system, /home, and use the find command:

# find /home -inum 25 -print

which returns:

/home/waters/smit.log

Using filemon in systems with real workloads would result in much larger reports and might require more trace buffer space. filemon's space and CPU time consumption can degrade system performance to some extent. You should experiment with filemon on a nonproduction system before starting it in a production environment.

Note: Although filemon reports average, minimum, maximum, and standard deviation in its detailed-statistics sections, the results should not be used to develop confidence intervals or other formal statistical inferences. In general, the distribution of data points is neither random nor symmetrical.
阅读(776) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~