freebsd-nq/include/sys
Brian Behlendorf 3b36f8319d Add dbgmsg kstat
Internally ZFS keeps a small log to facilitate debugging.  By default
the log is disabled, to enable it set zfs_dbgmsg_enable=1.  The contents
of the log can be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file.
Writing 0 to this proc file clears the log.

$ echo 1 >/sys/module/zfs/parameters/zfs_dbgmsg_enable
$ echo 0 >/proc/spl/kstat/zfs/dbgmsg
$ zpool import tank
$ cat /proc/spl/kstat/zfs/dbgmsg
1 0 0x01 -1 0 2492357525542 2525836565501
timestamp    message
1441141408   spa=tank async request task=1
1441141408   txg 70 open pool version 5000; software version 5000/5; ...
1441141409   spa=tank async request task=32
1441141409   txg 72 import pool version 5000; software version 5000/5; ...
1441141414   command: lt-zpool import tank

Note the zfs_dbgmsg() and dprintf() functions are both now mapped to
the same log.  As mentioned above the kernel debug log can be accessed
though the /proc/spl/kstat/zfs/dbgmsg kstat.  For user space consumers
log messages are immediately written to stdout after applying the
ZFS_DEBUG environment variable.

$ ZFS_DEBUG=on ./cmd/ztest/ztest -V

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Closes #3728
2015-09-04 16:08:14 -07:00
..
fm Improve on the ZFS events documentation 2015-06-09 11:19:19 -07:00
fs Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
arc_impl.h Illumos 5817 - change type of arcs_size from uint64_t to refcount_t 2015-07-23 09:42:28 -07:00
arc.h Dbuf hash table should be sized as is the arc hash table 2015-09-02 09:33:02 -07:00
avl_impl.h
avl.h Illumos 4745 - fix AVL code misspellings 2015-07-10 11:58:37 -07:00
blkptr.h
bplist.h
bpobj.h Illumos 5810 - zdb should print details of bpobj 2015-05-11 15:10:24 -07:00
bptree.h
dbuf.h Illumos 5911 - ZFS "hangs" while deleting file 2015-07-06 09:31:42 -07:00
ddt.h
dmu_impl.h
dmu_objset.h Illumos 5269 - zpool import slow 2015-06-09 13:48:02 -07:00
dmu_send.h Illumos 5765 - add support for estimating send stream size with lzc_send_space when source is a bookmark 2015-05-13 09:03:59 -07:00
dmu_traverse.h
dmu_tx.h
dmu_zfetch.h
dmu.h zvol processing should use struct bio 2015-09-04 15:30:24 -04:00
dnode.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
dsl_bookmark.h
dsl_dataset.h Illumos 5765 - add support for estimating send stream size with lzc_send_space when source is a bookmark 2015-05-13 09:03:59 -07:00
dsl_deadlist.h
dsl_deleg.h
dsl_destroy.h
dsl_dir.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
dsl_pool.h Illumos 5981 - Deadlock in dmu_objset_find_dp 2015-07-06 09:31:35 -07:00
dsl_prop.h
dsl_scan.h
dsl_synctask.h Illumos 4951 - ZFS administrative commands should use reserved space 2015-05-04 09:41:10 -07:00
dsl_userhold.h
efi_partition.h
Makefile.am Add temporary mount options 2015-09-03 14:14:55 -07:00
metaslab_impl.h
metaslab.h
mntent.h Add temporary mount options 2015-09-03 14:14:55 -07:00
multilist.h Illumos 5497 - lock contention on arcs_mtx 2015-06-11 10:27:25 -07:00
nvpair_impl.h
nvpair.h
range_tree.h
refcount.h
rrwlock.h Illumos 5008 - lock contention (rrw_exit) while running a read only load 2015-07-06 09:34:13 -07:00
sa_impl.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
sa.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
sdt.h
spa_boot.h
spa_impl.h Illumos 5818 - zfs {ref}compressratio is incorrect with 4k sector size 2015-06-10 16:24:01 -07:00
spa.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
space_map.h
space_reftree.h
trace_acl.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_arc.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_dbgmsg.h Add dbgmsg kstat 2015-09-04 16:08:14 -07:00
trace_dbuf.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_dmu.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_dnode.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_multilist.h Fix build failure with Linux 4.1 and FTRACE 2015-08-18 16:47:21 -07:00
trace_txg.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_zil.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace_zrlock.h Fix build failure with Linux 4.1 and FTRACE 2015-07-29 07:35:06 -07:00
trace.h
txg_impl.h
txg.h
u8_textprep_data.h
u8_textprep.h
uberblock_impl.h
uberblock.h Illumos 5347 - idle pool may run itself out of space 2015-07-14 10:35:21 -07:00
uio_impl.h
unique.h
uuid.h
vdev_disk.h
vdev_file.h Update all default taskq settings 2015-06-25 08:58:16 -07:00
vdev_impl.h Disable LBA weighting on files and SSDs 2015-09-01 15:22:07 -07:00
vdev.h Illumos 5269 - zpool import slow 2015-06-09 13:48:02 -07:00
xvattr.h
zap_impl.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zap_leaf.h Illumos 5056 - ZFS deadlock on db_mtx and dn_holds 2015-04-28 16:25:34 -07:00
zap.h Illumos 3654,3656 2015-05-04 09:41:09 -07:00
zfeature.h
zfs_acl.h
zfs_context.h Align thread priority with Linux defaults 2015-07-28 13:36:47 -07:00
zfs_ctldir.h Linux 3.18 compat: Snapshot auto-mounting 2015-08-31 13:54:39 -07:00
zfs_debug.h Add dbgmsg kstat 2015-09-04 16:08:14 -07:00
zfs_delay.h
zfs_dir.h
zfs_fuid.h
zfs_ioctl.h zfsdev_getminor() should check for invalid file handles 2015-06-22 17:02:13 -07:00
zfs_onexit.h
zfs_rlock.h
zfs_sa.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zfs_stat.h
zfs_vfsops.h Add temporary mount options 2015-09-03 14:14:55 -07:00
zfs_vnops.h
zfs_znode.h Illumos 5008 - lock contention (rrw_exit) while running a read only load 2015-07-06 09:34:13 -07:00
zil_impl.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zil.h Illumos 5269 - zpool import slow 2015-06-09 13:48:02 -07:00
zio_checksum.h
zio_compress.h
zio_impl.h
zio.h Illumos 5661 - ZFS: "compression = on" should use lz4 if feature is enabled 2015-07-10 12:11:45 -07:00
zpl.h Add temporary mount options 2015-09-03 14:14:55 -07:00
zrlock.h
zvol.h Check large block feature flag on volumes 2015-08-28 09:25:03 -07:00