From 90c05245350334a7d013c5e394dc06a17d90ccec Mon Sep 17 00:00:00 2001 From: Rich Ercolani <214141+rincebrain@users.noreply.github.com> Date: Tue, 25 May 2021 21:08:27 -0400 Subject: [PATCH] Add note for printing all dbgmsg entries on FreeBSD I looked for a bit, and couldn't find any documentation on how to print all logged dbgmsg entries, just messages since the DTrace probe started, until @allanjude kindly pointed me toward the sysctl. So let's add that note where the DTrace probe is mentioned for FreeBSD, so other people can find it. Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Reviewed-by: Allan Jude Signed-off-by: Rich Ercolani Closes #12113 --- module/os/freebsd/zfs/zfs_debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/os/freebsd/zfs/zfs_debug.c b/module/os/freebsd/zfs/zfs_debug.c index 74742ad36..7239db808 100644 --- a/module/os/freebsd/zfs/zfs_debug.c +++ b/module/os/freebsd/zfs/zfs_debug.c @@ -42,9 +42,12 @@ kstat_t *zfs_dbgmsg_kstat; /* * Internal ZFS debug messages are enabled by default. * - * # Print debug messages + * # Print debug messages as they're logged * dtrace -n 'zfs-dbgmsg { print(stringof(arg0)); }' * + * # Print all logged dbgmsg entries + * sysctl kstat.zfs.misc.dbgmsg + * * # Disable the kernel debug message log. * sysctl vfs.zfs.dbgmsg_enable=0 */