Display filesystem statistics (QNX Neutrino)


fsysinfo [options]* device|filesystem

Runs on:



-l period
Loop with the specified period (in milliseconds).
-L period
Loop with the specified period (in milliseconds), displaying the differences in the statistics between iterations.
Don't add in metadata (filesystem mountpoint) disk I/O counts.
Display the versions of io-blk.so and the filesystem.
Zero (reset) the statistics after reading them.
Zero (reset) the statistics, without displaying them.


The fsysinfo utility is a front end to the devctl(DCMD_FSYS_STATISTICS) command (from <sys/fs_stats.h>), which queries a disk filesystem for its statistics. These statistics include disk sectors read and written, the efficiency of internal caches, the count of various system calls made from user code, and so on.

By default, the current statistics are displayed once. There's also a looping mode, in which the utility loops and redisplays the statistics at the specified interval (-l displays the raw values, and -L displays the difference from the previous values). Press Ctrl-C to exit.

You can reset the statistics to 0 by using -z or -Z (-z displays what the values were prior to being reset, but -Z produces no output and is useful in scripts).

If you specify the -m option, fsysinfo doesn't combine disk I/O statistics from the specified filesystem and its host device/partition; usually this is necessary for many filesystem implementations that internally target metadata updates against the host device and not to a particular higher-level file. (For example, if you specify -m, modifications to the .bitmap and .inode files for an fs-qnx4 filesystem don't show as I/O on the mounted filesystem.)

The output includes the following:

Section Statistic Description
FILESYS   Mountpoint and type of filesystem
MOUNT mounted Time that the filesystem was mounted
  elapsed Time since the statistics were reset
DISK I/O write Physical sector writes to the device
  read Physical sector reads from the device
  r/a Predictive readaheads from the device
  direct DCMD_FSYS_DIRECT_IO sectors
  bad The number of bad blocks
CACHE write Sectors delayed-write to buffer cache (blk delwri= commit=)
  read Sectors reread from buffer cache
  rate Ratio of (CACHE read) : (DISK IO read + r/a)
  mru The size, in KB, of the Most Recently Used region
  mfu The size, in KB, of the Most Frequently Used region
  ratio Ratio of (CACHE mru) : (CACHE mfu)
SYSCALL open Number of open() calls
  stat Number of stat() or fstat() calls
  namei Number of conversions from a pathname to a file
  write Number of write() calls
  read Number of read() calls
  devctl Number of devctl() calls
  create Number of creations
  delete Number of deletions
NAMES exist Filenames known to exist (avoid scan)
  enoent Filenames known to not exist (avoid scan)
  misses Filename unknown (have to scan directory)
  unsuit Filename unsuitable for caching (too long or ambiguous)
  stale Stale name entry (fsys unmounted or associated vnode recycled)
  rate Ratio of (exist + enoent) : (misses + unsuit)
BMAP hit Known logical to physical block mapping
  miss Unknown logical to physical block mapping
  rate Ratio of (hit) : (miss)
VNODES create Open of unknown file (must load/build the vnode from the filesystem)
  hit Open of a known or recently-used file
  rate Ratio of (hit) : (create)
  lock Number of locked vnodes
  recycl Reuse of cache entry for new file (blk vnode=)
SLAB map The number of pages mapped in by the heap-allocation subsystem
  unmap The number of pages released by the heap-allocation subsystem
  active The difference of (map) − (unmap)

You can use this information to analyze the efficiency of the various io-blk.so caches, possibly leading to fine-tuning of the driver command-line options (blk cache= ncache= map= vnode=).


# fsysinfo /tmp
FILESYS     / (qnx6)
MOUNT       mounted  Mon Sep 21 06:31:21 2009     elapsed 39 secs
DISK I/O    write          0   read           0   r/a            0
            direct         0   bad            0
CACHE       write        328   read       23696   rate        100%
            mru        6792k   mfu        2832k   ratio        29%
SYSCALL     open        1211   stat        1331   namei       2718
            write          3   read        2499   devctl       579
            create         3   delete         3
NAMES       exist       4960   enoent      1096   misses       652
            unsuit         8   stale          1   rate         90%
BMAP        hit         3977   miss         464   rate         89%
VNODES      create       345   hit         7698   rate         95%
            lock       17391   recycl         2
SLAB        map          114   unmap          2   active       112

Determine what/how many disk operations were required by an activity:

# fsysinfo -Z /fs/hd/tmp
# cd /fs/hd/tmp
# fsysinfo /fs/hd/tmp

Monitor disk access in realtime, updating the statistics every 500 ms:

# fsysinfo -L500 /fs/hd

See also:

chattr, devb-*, fs-*, io-blk.so