From nobody Thu May 20 16:09:28 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F1208BB829 for ; Thu, 20 May 2021 16:09:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FmF780jMFz3GP7 for ; Thu, 20 May 2021 16:09:39 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f171.google.com with SMTP id w127so13040647oig.12 for ; Thu, 20 May 2021 09:09:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i9WgZgGBObbPkd7RwTnLDHdLH4Qha+th9K1VD3etdko=; b=HJAq3lkpFctwyhdlshCzfzuV7qRY3JrXTYvauknX0XMNBOuSpZ/9D8eJhWs89CUHOJ f252g0vZvlQg3CMjFMDxN3nDEN7Hrko29+szkWvhPayBzLYQDeAzv6RATqH/M4AwqYzH apIMAO4aD37zRnk755cqo8gp79+WYHOO/KR20C2zb/EbOop3+Uhf4TePEHUzBE1Foazz hUcZB1cOSeovVXhl2XdUVsxW8EmEYIP2ppyhL7/7G0Yk/BCQqpGzxNcvb2ON7nlqtM1c jPNK2fQmMtdGDkOwSWrJ2vfxQFT9lcmAn1aHYRmSfy0fl/X05uNfrzX7vr3VJAwJXtWH v7Og== X-Gm-Message-State: AOAM531zisfQ8VHckBSnUyYVYNE38yPODh+dtxgCrTT/WAMiGdk1e/ZZ f+wxQTmzup0+LyWzA3HFpIPoQnaO1Az3F1/5Fvl9I+SBcH0= X-Google-Smtp-Source: ABdhPJwwIraoHp00lLJSNy0j/lxd8KbkzY2gh8NvARMLCr0INRJeMlNt3tXm8sSwyh+qOWR1BMBcOepyq0qM/336rNg= X-Received: by 2002:aca:e142:: with SMTP id y63mr3764938oig.57.1621526978956; Thu, 20 May 2021 09:09:38 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20210520180155.3e23500e@bsd64.grem.de> In-Reply-To: <20210520180155.3e23500e@bsd64.grem.de> From: Alan Somers Date: Thu, 20 May 2021 10:09:28 -0600 Message-ID: Subject: Re: Reducing SIGINFO verbosity To: Michael Gmelin Cc: "freebsd-current@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000009312cd05c2c52b8f" X-Rspamd-Queue-Id: 4FmF780jMFz3GP7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] --0000000000009312cd05c2c52b8f Content-Type: text/plain; charset="UTF-8" On Thu, May 20, 2021 at 10:05 AM Michael Gmelin 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 --0000000000009312cd05c2c52b8f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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<= br> it up.

Traditionally, CTRL-t would give a one-line output + whatever the
process specific signal handler comes up with:

=C2=A0 # sleep 120 <--- hits CTRL-t
=C2=A0 load: 0.27=C2=A0 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780= k
=C2=A0 sleep: about 119 second(s) left out of the original 120

=C2=A0 # cat <--- hits CTRL-t
=C2=A0 load: 0.02=C2=A0 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k

On 13 I get:

=C2=A0 # sleep 120 <--- hits CTRL-t
=C2=A0 load: 0.12=C2=A0 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k=
=C2=A0 mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12<= br> =C2=A0 _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b
=C2=A0 amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119
=C2=A0 second(s) left out of the original 120

=C2=A0 # cat <--- hits CTRL-t
=C2=A0 load: 0.09=C2=A0 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k =C2=A0 mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9
=C2=A0 _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56<= br> =C2=A0 devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c<= br> =C2=A0 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

=C2=A0 sysctl kern.tty_info_kstacks=3D0
=C2=A0 echo kern.tty_info_kstacks=3D0 >>/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_in= fo.c?h=3Dreleng/13.0&id=3D508a6e84e785f642545b81c3ecb325685a2e56a7<= br>
--
Michael Gmelin

I tend to agree.=C2=A0 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
--0000000000009312cd05c2c52b8f--