Date: Thu, 20 May 2021 10:09:28 -0600 From: Alan Somers <asomers@freebsd.org> To: Michael Gmelin <freebsd@grem.de> Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: Reducing SIGINFO verbosity Message-ID: <CAOtMX2i-_baXgQ8_yM-jSeGX7hj4kbn0XP=csq1%2B%2BPN8D4m85w@mail.gmail.com> In-Reply-To: <20210520180155.3e23500e@bsd64.grem.de> References: <20210520180155.3e23500e@bsd64.grem.de>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Thu, May 20, 2021 at 10:05 AM Michael Gmelin <freebsd@grem.de> wrote: > Hi, > > I'm leaving this here, mostly so that others (or future me) can google > it up. > > Traditionally, CTRL-t would give a one-line output + whatever the > process specific signal handler comes up with: > > # sleep 120 <--- hits CTRL-t > load: 0.27 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780k > sleep: about 119 second(s) left out of the original 120 > > # cat <--- hits CTRL-t > load: 0.02 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k > > > On 13 I get: > > # sleep 120 <--- hits CTRL-t > load: 0.12 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12 > _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b > amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119 > second(s) left out of the original 120 > > # cat <--- hits CTRL-t > load: 0.09 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9 > _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56 > devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c > fast_syscall_common+0xf8 > > which is quite way too verbose when checking the progress of > long-running processes, like cp, dd, or poudriere. Especially as CTRL-t > is part of the user experience to me - I use it to interact with the > machine outside of debugging software issues. > > Setting > > sysctl kern.tty_info_kstacks=0 > echo kern.tty_info_kstacks=0 >>/etc/sysctl.conf > > fixes this permanently. > > Apparently, this was enabled by default on purpose[0], so that people > find the feature (which certainly worked ^_^), but I think it would > been worth mentioning the sysctl somewhere in the release notes/errata, > so that people understand how to disable it again. > > Best > Michael > > [0] > https://cgit.freebsd.org/src/commit/sys/kern/tty_info.c?h=releng/13.0&id=508a6e84e785f642545b81c3ecb325685a2e56a7 > > -- > Michael Gmelin > I tend to agree. I'm already using to using procstat to see a stuck process's stacks, so I don't need to see them during ctrl-T, too. -Alan [-- Attachment #2 --] <div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 20, 2021 at 10:05 AM Michael Gmelin <<a href="mailto:freebsd@grem.de">freebsd@grem.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> I'm leaving this here, mostly so that others (or future me) can google<br> it up.<br> <br> Traditionally, CTRL-t would give a one-line output + whatever the<br> process specific signal handler comes up with:<br> <br> # sleep 120 <--- hits CTRL-t<br> load: 0.27 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780k<br> sleep: about 119 second(s) left out of the original 120<br> <br> # cat <--- hits CTRL-t<br> load: 0.02 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k<br> <br> <br> On 13 I get:<br> <br> # sleep 120 <--- hits CTRL-t<br> load: 0.12 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k<br> mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12<br> _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b<br> amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119<br> second(s) left out of the original 120<br> <br> # cat <--- hits CTRL-t<br> load: 0.09 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k<br> mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9<br> _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56<br> devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c<br> fast_syscall_common+0xf8 <br> <br> which is quite way too verbose when checking the progress of<br> long-running processes, like cp, dd, or poudriere. Especially as CTRL-t<br> is part of the user experience to me - I use it to interact with the<br> machine outside of debugging software issues.<br> <br> Setting<br> <br> sysctl kern.tty_info_kstacks=0<br> echo kern.tty_info_kstacks=0 >>/etc/sysctl.conf<br> <br> fixes this permanently.<br> <br> Apparently, this was enabled by default on purpose[0], so that people<br> find the feature (which certainly worked ^_^), but I think it would<br> been worth mentioning the sysctl somewhere in the release notes/errata,<br> so that people understand how to disable it again.<br> <br> Best<br> Michael<br> <br> [0]<a href="https://cgit.freebsd.org/src/commit/sys/kern/tty_info.c?h=releng/13.0&id=508a6e84e785f642545b81c3ecb325685a2e56a7" rel="noreferrer" target="_blank">https://cgit.freebsd.org/src/commit/sys/kern/tty_info.c?h=releng/13.0&id=508a6e84e785f642545b81c3ecb325685a2e56a7</a><br> <br> -- <br> Michael Gmelin<br></blockquote><div><br></div><div>I tend to agree. I'm already using to using procstat to see a stuck process's stacks, so I don't need to see them during ctrl-T, too.</div><div>-Alan<br></div></div></div>help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2i-_baXgQ8_yM-jSeGX7hj4kbn0XP=csq1%2B%2BPN8D4m85w>
