Gentoo Archives: gentoo-user

From: Johannes Rosenberger <gentoo@×××××.eu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] kernel config setting for console scroll back
Date: Fri, 17 Feb 2017 14:04:06
Message-Id: 45e616a4-3de7-f0bc-5971-64173a4978b0@jorsn.eu
In Reply to: [gentoo-user] kernel config setting for console scroll back by Harry Putnam
On 17.02.2017 04:11, Harry Putnam wrote:
> In make menuconfig, under: > Device Drivers → Graphics support → Console display driver support > (700) Scrollback Buffer Size (in KB) > > I think the default was 64 but I like a big scrollback buffer. > > As you see I set 700 but really didn't have much of an idea what that > would be in lines. > > Can any one offer a close guestimate what 700 kb would be in lines. > > That is pretty close to 1 mb isn't it?... but still what is that in > lines? I'm guessing 1 MB might be around 10,000 lines. Is that even > roughly close... if so I probably should have went higher. > >
Your estimate is probably pretty good: I think 'the norm line' used to be 80 chars. Now, that's not really the case anymore but you won't probably get an average line length over 80-100 chars (except if you only compile/emerge on the terminal). There's also a variable '$COLUMNS' which tells you how many columns your terminal has. 1 char usually needs 1 Byte (ascii/utf8), so you can store about 1M/100=10k lines in 1MB. Colors add some Bytes (about 4-8 Bytes per color change), but I guess, the average should not exceed 100 chars/line. But why don't you use tmux or the like? There you also have a scrollback buffer, but you can also search and copy there, you have a terminal window manager (multiplexed) with different possible layouts and detached sessions, means that e.g. when you log in remotely and lose the connection, you just relogin and type 'tmux attach' and you're back.