DragonFly BSD
DragonFly kernel List (threaded) for 2011-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: top(1) annoyances


From: "Samuel J. Greear" <sjg@xxxxxxxxxxxx>
Date: Fri, 4 Feb 2011 12:01:49 -0700

On Fri, Feb 4, 2011 at 11:42 AM, Matthew Dillon
<dillon@apollo.backplane.com> wrote:
> :in conclusion, I suggest:
> :
> :1) re-enabling the annoying top warning message, and perhaps choosing
> :    a sensible default to prevent the annoying warning on a handy-dandy
> :    default punched-card sized 80x24 display
> :
> :this would mean changing DEFAULT_TOPN in /usr/src/usr.bin/top/config.h
> :to 17. (24 - 7 for the 'header' stuff)
> :
> :fun.
> :
> :comments?
> :
> :- Chris
>
>    I don't see any reason to re-enable the annoying top warning message.
>
>    We could just set DEFAULT_TOPN to something big, too, like 100, but
>    it might make more sense to simply size it to the number of rows on
>    the terminal.  I dunno.
>
>                                        -Matt
>                                        Matthew Dillon
>                                        <dillon@backplane.com>
>

I don't see any reason not to re-enable the warning if we make row
detection programmatic, it would only appear then if something wonky
is going on (and if something wonky / out of the norm. is going on
with my terminal, I -would- want to see the warning).

In my opinion the best thing to do would be to firstly check the
environment for ROWS (I think?) and if those are not present,
determine rows in the same fashion as `stty size`, and if that fails,
fall back to using DEFAULT_TOPN.

I have no opinion on the default value of DEFAULT_TOPN if the above is
done, but 17 is probably quite reasonable, as most terminals default
to 24 rows.

Sam




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]