HomeFreeBSD

Don't request CTLTYPE_OPAQUE if we can't print them.

Description

Don't request CTLTYPE_OPAQUE if we can't print them.

The intent is to skip expensive opaque sysctls like tcp_pcblist unless
they are explicitly requested. Sysctl nodes like this don't show up in
sysctl -a, but they do generate output that winds up being dropped,
unless the user specifically requested binary/hex output or opaques.

This reduces the runtime of sysctl in many circumstances on a loaded
system. It also reduces the likelihood that simply gathering
diagnostics on a sick machine (stuck lock, etc) via sysctl -a might
push it over the edge into a total lockup.

Reviewed by: jtl
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D11461

Details

Provenance
gallatinAuthored on
Reviewer
jtl
Differential Revision
D11461: Don't request CTLTYPE_OPAQUE if we can't print them.
Parents
rS321789: Add myself.
Branches
Unknown
Tags
Unknown