test veritas logo


vxfsstat(1M)

NAME

vxfsstat - display VxFS file system statistics

SYNOPSIS

vxfsstat [ -aCgmsvxz ] [ -e columns ] [ -c count ]
[-t seconds ] mount_point

vxfsstat [ -abBiI ] [-c count ] [-t seconds ] mount_point

vxfsstat [ -w outfile ] [-c count ] [-t seconds ] mount_point

vxfsstat -r infile [ -aCvxz ] [ -e columns ]

AVAILABILITY

VRTSvxfs

DESCRIPTION

vxfsstat is a statistical reporter to aid in performance tuning and determining performance anomalies. vxfsstat gathers buffer cache, inode cache, DNLC (directory name lookup cache), per-CPU statistics, per-file system statistics for mounted file systems.

The mount_point specifies any VxFS file system mount point. mount_point is used as an ioctl entry point to access the statistics maintained by the VxFS kernel.

NOTES

The vxfsstat command was introduced to provide a diagnostic and tuning tool for knowledgeable VxFS file system users. The command is still under development and may undergo significant additions and changes. There is a strong possibility that functionality introduced and modified in future versions will not be completely backward compatible. Take this into account when you begin using this command and incorporating it into scripts. As an alternative, consider using the static interfaces vxfsu_get_bc_counters and vxfsu_get_dnlc_counter. These APIs are in the vxfsutil.h header file.

Cluster File System Issues

Some options can be used only on cluster mounted file systems. Read the option descriptions for details on whether the option is valid for local mounts.

OPTIONS

-a Displays absolute values.
-b Displays global buffer cache statistics. vxfsstat displays the following counters:
Kbyte current
  The memory in kilobytes that are consumed by the VxFS metadata buffer cache.
maximum
  The maximum memory in kilobytes that the VxFS metadata buffer cache can consume.
lookups
  The count of read requests for a buffer that may be read from the disk if not incore.
% hit rate
  Hit rate is defined as a percentage of successful buffer lookups (total - misses) with respect to total lookups. A miss is counted when a buffer read request fails if memory is unavailable and it is a non-blocking request.
sec recycle age
  The average age (in seconds) of the recycled buffer.
-B Displays per file system metadata buffer cache statistics. The vxfsstat command displays the following counters:
Metadata Buffer cache lookups
  The count of read requests for a buffer.
Metadata Buffer cache % hit rate
  Hit rate is the percentage of successful buffer lookups (total-misses) with respect to total lookups.
-c count Specifies the number of samples to take.
-C Displays per-CPU statistics.
-e columns Selects the number of column entries to display per line of output. The default is two columns. -e does not affect all output formats.
-g Displays cluster file system global statistics. Not valid on non-cluster (local) mounted file systems.
-i Displays global inode cache and DNLC statistics. -i is the default output format. vxfsstat displays the following counters:
maximum entries in dnlc
  The maximum number of DNLC entries.
total lookups
  The total number of actual directory lookups.
% fast lookup
  The percentage of fast directory lookups with respect to the total directory lookups.
total dnlc lookup
  The total number of DNLC lookups. The value is the sum of the total number of DNLC hits (positive and negative) and DNLC misses.
% dnlc hit rate
  The percentage of total DNLC hits (positive and negative) with respect to the total DNLC lookup.
total enter
  The number of times that a positive DNLC entry was entered into the DNLC.
hit per enter
  The number of total DNLC hits (positive and negative) per DNLC enter (positive and negative).
total dircache setup
  The count of directory cache setup.
calls per setup
  The number of directory cache calls, including dircache name and space hits and misses, per dircache setup.
total directory scan
  The number of times that a directory was scanned while looking for a name or space to hold a name. The value is the sum of normal directory scans and fast directory scans.
% fast directory scan
  The percentage of fast directory scans to the total number of directory scans.
inodes current
  The current number of incore inodes.
peak The maximum number of inodes that were brought incore since system startup. The value is the maximum recorded value of current inodes.
maximum
  The maximum number of inodes that can be brought incore, which is equal to the inode cache size. VxFS limits the number of incore inodes to this value.
lookups
  The number of times iget was called while looking for an inode.
% hit rate
  The percentage of inodes that were found incore with respect to the total number of inodes looked up.
inodes alloced
  The total number of inodes for which memory was allocated since system startup.
freed The total number of inodes that were freed. This is the memory for inodes that were de-allocated. The difference between this counter and inodes alloced is that freed gives the current number of incore inodes.
recycle age
  The average age (in seconds) of recycled inodes.
free age
  The maximum length of time that you want inodes to be on the free-list. If inodes are staying on the free-list for more than this time, then the inode table size is reduced.
-I Displays per file system inode cache and DNLC statistics. The vxfsstat displays the following counters:
Inode cache lookups
  The number of times that iget() was called while looking for an inode.
Inode cache % hit rate
  The percentage of inodes that were found incore with respect to the total number of inodes looked up.
Inodes current
  The current number of incore inodes.
Total DNLC lookups
  The total number of DNLC lookups. The value is the sum of the total number of DNLC hits (positive and negative) and DNLC misses.
% DNLC hit rate
  The percentage of total DNLC hits (positive and negative) with respect to the total DNLC lookup.
% DNLC fast directory scan
  The percentage of fast directory scans taken from the total number of directory scans.
-m Displays counters, in units of bytes, showing the current pinned memory usage by VxFS. The following counters are displayed:
Total Allocated
  Displays the pinned memory currently in use by the VxFS driver.
Inode cache
  Displays pinned memory usage associated with the VxFS inode cache.
Buffer cache
  Displays pinned memory usage associated with the VxFS metadata buffer cache.
-r infile Replays output from the specified file infile. You can create output files using the -w option.
-v Displays VxFS shared counters and statistics.
-s Displays per-file system statistics for cluster file systems. Not valid on non-cluster (local) mounted file systems.
-t seconds Specifies the duration of the sampling interval in seconds.
-w outfile Appends output to the specified file outfile. vxfsstat can be invoked multiple times with the same file to collect multiple samples. The -w option can only be used with the -c and -t options.
-x Displays per-file system VxFS statistics.
-z Displays only non-zero values.

EXAMPLES

The following examples show the output of vxfsstat using various options. The following command displays buffer cache statistics:

# vxfsstat -b -c 5 /mnt1

0:43:44.091 Mon Apr 15 2002 -- absolute sample

buffer cache statistics 36992 Kbyte current 377456 maximum 688187425 lookups 99.98% hit rate 37165 sec reuse age [not limited by maximum]

10:43:54.121 Mon Apr 15 2002 -- delta (10.029 sec sample)

buffer cache statistics 36992 Kbyte current 377456 maximum 29793 lookups 99.10% hit rate 37175 sec reuse age [not limited by maximum]

10:44:04.131 Mon Apr 15 2002 -- delta (10.010 sec sample)

buffer cache statistics 36992 Kbyte current 377456 maximum 29199 lookups 99.15% hit rate 37185 sec reuse age [not limited by maximum]

The following command displays shared counters and statistics kept by VxFS:

# vxfsstat -v /mnt1

10:49:10.791 Mon Apr 15 2002 -- absolute sample

vxi_alloc_emap 127699050 vxi_alloc_expand_retry 891125 vxi_alloc_find_retry 153857 vxi_alloc_findfail 225394263 vxi_alloc_findfix 889319 vxi_alloc_mapflush 2 vxi_alloc_prev 14581575 vxi_alloc_search 59147260 vxi_alloc_smap 0 vxi_alloc_sumclean 0 . . . vxi_cbuf_cache_hit 0 vxi_cbuf_cache_miss 0 vxi_cgetblk_pbhit 0 vxi_cgetblk_pbmiss 0 vxi_cbuf_initlock 0 vxi_send_vrtinit 0 vxi_send_vrtmnt 0 vxi_send_vrtunmnt 0 vxi_send_vrtremnt 0

The following command displays the inode cache and DNLC statistics:

# vxfsstat -i /mnt1

10:52:54.051 Mon Apr 15 2002 -- absolute sample

Lookup & DNLC Statistics 174944 maximum entries in dnlc 22798260 total lookups 88.02% fast lookup 24065082 total dnlc lookup 83.39% dnlc hit rate 2649796 total enters 7.57 hit per enter

inode cache statistics 127577 inodes current 127577 peak 174931 maximum 3764456 lookups 43.72% hit rate 127757 inodes alloced 921 sec recycle age [not limited by maximum] 4294967295 sec free age

The following command displays all shared counters that are non-zero:

# vxfsstat -vz /mnt1

10:53:56.471 Mon Apr 15 2002 -- absolute sample

vxi_alloc_emap 127970901 vxi_alloc_expand_retry 891135 vxi_alloc_find_retry 153918 vxi_alloc_findfail 25474427 vxi_alloc_findfix 889319 vxi_alloc_mapflush 2 vxi_alloc_prev 14598090 vxi_alloc_search 59282134 vxi_alloc_sumsum 31483425 vxi_alloc_try 73892402 . . . vxi_write_dio 4030035 vxi_write_donetran 645551 vxi_write_logged 5708641 vxi_write_only 75826 vxi_write_rand 145197162 vxi_write_seq 9729784 vxi_clone_create 73 vxi_clone_remove 120 vxi_clone_convnodata 33 vxi_clone_dispose 32

The following command saves two samples of the per-file system counters taken at 10-second intervals to a file named statfile, then displays only the non-zero values, one per line:

# vxfsstat -w /tmp/statfile -t 10 -c 2 /mnt1 # vxfsstat -vz -e 1 -r /tmp/statfile

11:01:42.481 Mon Apr 15 2002 -- absolute sample

vxi_bawrite 4 vxi_bcache_curkbyte 128 vxi_bcache_maxkbyte 37898 vxi_bcache_recycleage 3569 vxi_bc_hits 41 vxi_bc_lookups 74 vxi_bc_reuse 29 vxi_bc_waits 2 vxi_bdwrite 3 vxi_bmap 438 vxi_bmap_cache 407 vxi_bread 29 vxi_brelse 5 vxi_bwrite 3 vxi_dnlc_size 19940 vxi_eau_unexpand 1 vxi_iaccess 9 vxi_icache_allocedino 27 vxi_icache_curino 27 vxi_icache_inuseino 27 vxi_icache_maxino 19937 vxi_icache_peakino 27 vxi_ifree_timelag 600 vxi_iget 28 vxi_iget_loop 55 vxi_inopage 1 vxi_log 1 vxi_log_blks 6 vxi_log_flush 1 vxi_log_idle 1 vxi_log_write 3 vxi_lread 57 vxi_lwrite 6 vxi_physmem_mbyte 511 vxi_superwrite 3 vxi_tran_commit 1 vxi_tran_low 1 vxi_tran_space 5 vxi_tran_subfuncs 2 vxi_tranlogflush 2

04:09:48.804 Sun Apr 14 2002 -- delta (10.010 sec sample)

vxi_bcache_curkbyte 128 vxi_bcache_maxkbyte 37898 vxi_bcache_recycleage 3569 vxi_dnlc_size 19940 vxi_icache_curino 27 vxi_icache_maxino 19937 vxi_icache_peakino 27 vxi_ifree_timelag 600

The two example outputs below show the VxFS pinned memory usage before and after many files were created in a file system. The counters show both the VxFS inode cache and VxFS metadata buffer caches dynamically filling:

# vxfsstat -m /mnt1

13:01:35.931 Tuesday 03 April 2012 01:01:35 PM IST -- absolute sample

VxFS Pinned Memory Usage Statistics:

Total Allocated: 9659832 Inode cache: 5921424 Buffer cache: 1674720

# vxfsstat -m /mnt1

13:05:23.011 Tuesday 03 April 2012 01:05:23 PM IST -- absolute sample

VxFS Pinned Memory Usage Statistics:

Total Allocated: 26410040 Inode cache: 9927312 Buffer cache: 2474656

The following command displays the per file system inode cache and DNLC statistics:

# vxfsstat -I /mnt1

03:41:33.249 May 17, 2013 03:41:33 AM CDT -- absolute sample

Per file system Lookup, DNLC & Directory Cache Statistics 1109 total dnlc lookup 90.62% dnlc hit rate 204 total directory scan 49.02% fast directory scan Per filesystem inode cache statistics 137 lookups 1.46% hit rate 136 inodes current

The following command displays the per file system metadata buffer cache statistics:

# vxfsstat -B /mnt1

03:42:49.600 May 17, 2013 03:42:49 AM CDT -- absolute sample

Per filesystem buffer cache statistics 10287 lookups 99.68% hit rate

SEE ALSO

vmstat(1M), fs_vxfs(4)


VxFS 7.4 vxfsstat(1M)