Re: top(1) annoyances

看板DFBSD_kernel作者時間15年前 (2011/02/05 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串11/11 (看更多)
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 > : ꀠ乸 sensible default to prevent the annoying warning on a handy-dandy > : ꀠ氽efault 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 > > ꀠ啱 don't see any reason to re-enable the annoying top warning message. > > ꀠ咗e could just set DEFAULT_TOPN to something big, too, like 100, but > ꀠ湶t might make more sense to simply size it to the number of rows on > ꀠ濳he terminal. 啱 dunno. > > ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀭMatt > ꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠꀠ嗰atthew 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
文章代碼(AID): #1DJ5GtVu (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1DJ5GtVu (DFBSD_kernel)