summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-03-11 21:48:36 +0000
committerjhb <jhb@FreeBSD.org>2009-03-11 21:48:36 +0000
commit2548f05c6c8be3fe53f4191e634699bb4fa4c56b (patch)
tree48083c4fab749cb8da99377a83f7d470672d4c2c /usr.bin/kdump
parentde74558fd8fae07358ec61b9001d0a7590bb9d22 (diff)
downloadFreeBSD-src-2548f05c6c8be3fe53f4191e634699bb4fa4c56b.zip
FreeBSD-src-2548f05c6c8be3fe53f4191e634699bb4fa4c56b.tar.gz
Add a new type of KTRACE record for sysctl(3) invocations. It uses the
internal sysctl_sysctl_name() handler to map the MIB array to a string name and logs this name in the trace log. This can be useful to see exactly which sysctls a thread is invoking. MFC after: 1 month
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/kdump.11
-rw-r--r--usr.bin/kdump/kdump.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/kdump/kdump.1 b/usr.bin/kdump/kdump.1
index 34b5bd4..b5e313b 100644
--- a/usr.bin/kdump/kdump.1
+++ b/usr.bin/kdump/kdump.1
@@ -172,6 +172,7 @@ The possible operations are:
.It Li CSW Ta context switch Ta stop/resume user/kernel
.It Li USER Ta data from user process Ta the data
.It Li STRU Ta various syscalls Ta structure
+.It Li SCTL Ta Xr sysctl 3 requests Ta MIB name
.El
.Sh SEE ALSO
.Xr ktrace 1
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 72afdc8..079d272 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -217,6 +217,7 @@ main(int argc, char *argv[])
ktrsysret((struct ktr_sysret *)m);
break;
case KTR_NAMEI:
+ case KTR_SYSCTL:
ktrnamei(m, ktrlen);
break;
case KTR_GENIO:
@@ -288,6 +289,9 @@ dumpheader(struct ktr_header *kth)
case KTR_STRUCT:
type = "STRU";
break;
+ case KTR_SYSCTL:
+ type = "SCTL";
+ break;
default:
(void)sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type);
type = unknown;
OpenPOWER on IntegriCloud