summaryrefslogtreecommitdiffstats
path: root/man/man5
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-09-01 13:19:10 -0700
committerBrian Behlendorf <[email protected]>2015-09-04 16:08:14 -0700
commit3b36f8319d56842c85782e7842218a7499f3cf16 (patch)
treedfb586465b239054d8cba80200059ea55882978f /man/man5
parent0500e835af3ea1f3abe27a572f7b2328b4cde386 (diff)
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 <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #3728
Diffstat (limited to 'man/man5')
-rw-r--r--man/man5/zfs-module-parameters.525
1 files changed, 25 insertions, 0 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index 27b5346e2..6d4a8c304 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -610,6 +610,31 @@ Use \fB1\fR for yes (default) and \fB0\fR for no.
.sp
.ne 2
.na
+\fBzfs_dbgmsg_enable\fR (int)
+.ad
+.RS 12n
+Internally ZFS keeps a small log to facilitate debugging. By default the log
+is disabled, to enable it set this option to 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.
+.sp
+Default value: \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fBzfs_dbgmsg_maxsize\fR (int)
+.ad
+.RS 12n
+The maximum size in bytes of the internal ZFS debug log.
+.sp
+Default value: \fB4M\fR.
+.RE
+
+.sp
+.ne 2
+.na
\fBzfs_dbuf_state_index\fR (int)
.ad
.RS 12n