aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/truss
diff options
context:
space:
mode:
authorRyan Moeller <freqlabs@FreeBSD.org>2020-10-05 20:13:22 +0000
committerRyan Moeller <freqlabs@FreeBSD.org>2020-10-05 20:13:22 +0000
commit92e17803cd19bf55d07779e0b56b12e9fa50ec92 (patch)
treec73fa248662506864e968b05e8da224696072d99 /usr.bin/truss
parentce3e137ca1bf6638f9200d5313a0afb25099abf9 (diff)
downloadsrc-92e17803cd19bf55d07779e0b56b12e9fa50ec92.tar.gz
src-92e17803cd19bf55d07779e0b56b12e9fa50ec92.zip
Enable iterating all sysctls, even ones with CTLFLAG_SKIP
Add an "nextnoskip" sysctl that allows for listing of sysctls intended to be normally skipped for cost reasons. This makes it so the names/descriptions of those sysctls can be discovered with sysctl -aN/sysctl -ad/sysctl -at. It also makes it so children are visited when a node flagged with CTLFLAG_SKIP is explicitly requested. The intended use case is to mark the root "kstat" node with CTLFLAG_SKIP so that the extensive and expensive stats are skipped by default but may still be easily obtained without having to know them all (which may not even be possible) and request each one-by-one. Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26560
Notes
Notes: svn path=/head/; revision=366465
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/syscalls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index 1074ba4c0dcf..c32f46b10464 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -2360,6 +2360,9 @@ print_arg(struct syscall_args *sc, unsigned long *args, register_t *retval,
fprintf(fp, "oidlabel ");
print_sysctl(fp, oid + 2, len - 2);
break;
+ case CTL_SYSCTL_NEXTNOSKIP:
+ fprintf(fp, "nextnoskip");
+ break;
default:
print_sysctl(fp, oid + 1, len - 1);
}