Page MenuHomeFreeBSD

Add freebsd-tips fortune about sysctl kern.tty_info_kstacks
ClosedPublic

Authored by grembo on May 21 2021, 4:18 PM.

Details

Summary

Following this discussion on -current,
https://lists.freebsd.org/archives/freebsd-current/2021-May/169405.html
add a little something to fortune.

Update: Mail archive link changed: https://lists.freebsd.org/archives/freebsd-current/2021-May/000021.html

Test Plan
$ cd usr.bin/fortune/datfiles
$ make
$ while true; do fortune freebsd-tips | grep -A4 stack && break; done

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

grembo created this revision.

Adding docs, as this might be more appropriate(?)

That sysctl is 2 by default, at least on -CURRENT.
Do we care that this is wrong on CURRENT (I don't think I do) ?

grembo edited the summary of this revision. (Show Details)
In D30388#689933, @ceri wrote:

That sysctl is 2 by default, at least on -CURRENT.
Do we care that this is wrong on CURRENT (I don't think I do) ?

I think it's 1 by default on CURRENT at the moment (https://cgit.freebsd.org/src/commit/sys/kern/tty_info.c?id=e94fdc38331157d7d0bc888a14279f03639e09a2).

@ceri Alternative wording:

You can control kernel stack(9) traces on ^T (tty info) by setting
kern.tty_info_kstacks to 0 (off), 1 (on), or 2 (verbose), e.g.:

# sysctl kern.tty_info_kstacks=2

		-- Michael Gmelin <grembo@FreeBSD.org>
%

@ceri Alternative wording:

You can control kernel stack(9) traces on ^T (tty info) by setting
kern.tty_info_kstacks to 0 (off), 1 (on), or 2 (verbose), e.g.:

        sysctl kern.tty_info_kstacks=2

		-- Michael Gmelin <grembo@FreeBSD.org>
%

Yeah, this is nicer and more futureproof, ta.

Make wording more general, use root prompt ("#").

This revision is now accepted and ready to land.Jun 9 2021, 1:35 PM

@ceri Thanks for taking the time to review.