]> granicus.if.org Git - zfs/commit
Add dbufstat.py command
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 25 Oct 2013 20:58:45 +0000 (13:58 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 25 Oct 2013 21:52:45 +0000 (14:52 -0700)
commitd738d34da5b25b5e5daef966c29386468fd16263
tree9cd97bc1866b61b6539970b36aa02a3493401585
parente0b0ca983d6897bcddf05af2c0e5d01ff66f90db
Add dbufstat.py command

The dbufstat.py command was added to provide a conveniant way to
easily determine what ZFS is caching.  The script consumes the
raw /proc/spl/kstat/zfs/dbufs kstat data can consolidates it in
to a more human readable form.  This was designed primarily as
a tool to aid developers but it may also be useful for advanced
users who want more visibility in to what the ARC is caching.

When run without options dbufstat.py will default to showing a
list of all objects with at least one buffer present in the
cache.  The total cache space consumed by that object will be
printed on the right along with the object type.  Similar to the
arcstats.py command the -x option may used to display additional
fields.

Two other modes of operation are also supported by dbufstat.py
and the expectation is additional display modes may be added as
needed.  The -t option will summerize the total number of bytes
cached for each object type, and the -b option will show every
dbuf currently cached.

The script was designed to be consistent with arcstat.py and
includes most of the same options and funcationality.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
cmd/Makefile.am
cmd/arcstat/arcstat.py
cmd/dbufstat/Makefile.am [new file with mode: 0644]
cmd/dbufstat/dbufstat.py [new file with mode: 0755]
configure.ac