Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 2021 15:57:17 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Michael Gmelin <freebsd@grem.de>,  "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Reducing SIGINFO verbosity
Message-ID:  <CAG6CVpWpDYid9F0fSWyyFVuh6SuNmV4HwEBQUKTCXDGfq6KwAw@mail.gmail.com>
In-Reply-To: <20210520185917.GL14975@funkthat.com>
References:  <20210520180155.3e23500e@bsd64.grem.de> <20210520185917.GL14975@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000014430805c2cadeab
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

No, I don=E2=80=99t think there=E2=80=99s any reason to default it differen=
tly on stable vs
current. I think it=E2=80=99s useful (and I prefer the more verbose form, w=
hich
isn=E2=80=99t the default).

Conrad

On Thu, May 20, 2021 at 11:59 John-Mark Gurney <jmg@funkthat.com> wrote:

> Michael Gmelin wrote this message on Thu, May 20, 2021 at 18:01 +0200:
> > 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=3D0
> >   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.
>
> I think the original intent was to disable this on -stable or at least
> -RELEASEs, but it looks like this didn't happen.  This is VERY helpful
> for a developer, but not as helpful for most users.
>
> Conrad,
>
> Should this be disabled on -stable now?
>
> --
>   John-Mark Gurney                              Voice: +1 415 225 5579
>
>      "All that I will do, has been done, All that I have, has not."
>

--00000000000014430805c2cadeab
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">No, I don=E2=80=99t think there=E2=80=99s any reason to d=
efault it differently on stable vs current. I think it=E2=80=99s useful (an=
d I prefer the more verbose form, which isn=E2=80=99t the default).</div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">Conrad=C2=A0</div><div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 20=
, 2021 at 11:59 John-Mark Gurney &lt;<a href=3D"mailto:jmg@funkthat.com">jm=
g@funkthat.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Micha=
el Gmelin wrote this message on Thu, May 20, 2021 at 18:01 +0200:<br>
&gt; I&#39;m leaving this here, mostly so that others (or future me) can go=
ogle<br>
&gt; it up.<br>
&gt; <br>
&gt; Traditionally, CTRL-t would give a one-line output + whatever the<br>
&gt; process specific signal handler comes up with:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# sleep 120 &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.27=C2=A0 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.0=
0s 0% 1780k<br>
&gt;=C2=A0 =C2=A0sleep: about 119 second(s) left out of the original 120<br=
>
&gt; <br>
&gt;=C2=A0 =C2=A0# cat &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.02=C2=A0 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s =
0% 2308k<br>
&gt; <br>
&gt;=C2=A0 =C2=A0<br>
&gt; On 13 I get:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# sleep 120 &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.12=C2=A0 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00=
s 0% 2172k<br>
&gt;=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait=
_sig+0x12<br>
&gt;=C2=A0 =C2=A0_sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b=
<br>
&gt;=C2=A0 =C2=A0amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about =
119<br>
&gt;=C2=A0 =C2=A0second(s) left out of the original 120<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# cat &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.09=C2=A0 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0=
% 2300k<br>
&gt;=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+=
0x9<br>
&gt;=C2=A0 =C2=A0_cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_=
read+0x56<br>
&gt;=C2=A0 =C2=A0devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_sysc=
all+0x10c<br>
&gt;=C2=A0 =C2=A0fast_syscall_common+0xf8 <br>
&gt; <br>
&gt; which is quite way too verbose when checking the progress of<br>
&gt; long-running processes, like cp, dd, or poudriere. Especially as CTRL-=
t<br>
&gt; is part of the user experience to me - I use it to interact with the<b=
r>
&gt; machine outside of debugging software issues.<br>
&gt; <br>
&gt; Setting<br>
&gt; <br>
&gt;=C2=A0 =C2=A0sysctl kern.tty_info_kstacks=3D0<br>
&gt;=C2=A0 =C2=A0echo kern.tty_info_kstacks=3D0 &gt;&gt;/etc/sysctl.conf<br=
>
&gt; <br>
&gt; fixes this permanently.<br>
&gt; <br>
&gt; Apparently, this was enabled by default on purpose[0], so that people<=
br>
&gt; find the feature (which certainly worked ^_^), but I think it would<br=
>
&gt; been worth mentioning the sysctl somewhere in the release notes/errata=
,<br>
&gt; so that people understand how to disable it again.<br>
<br>
I think the original intent was to disable this on -stable or at least<br>
-RELEASEs, but it looks like this didn&#39;t happen.=C2=A0 This is VERY hel=
pful<br>
for a developer, but not as helpful for most users.<br>
<br>
Conrad,<br>
<br>
Should this be disabled on -stable now?<br>
<br>
-- <br>
=C2=A0 John-Mark Gurney=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Voice: +1 415 225 5579=
<br>
<br>
=C2=A0 =C2=A0 =C2=A0&quot;All that I will do, has been done, All that I hav=
e, has not.&quot;<br>
</blockquote></div></div>

--00000000000014430805c2cadeab--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpWpDYid9F0fSWyyFVuh6SuNmV4HwEBQUKTCXDGfq6KwAw>