- Increase buffer size while running screen
- 4 Answers 4
- UNIX for Dummies Questions & Answers
- how to increase size of the console screen buffer ?
- How do I increase the scrollback buffer in a running screen session?
- 5 Answers 5
- Per screen (session) interactive setting
- And the permanent default setting
- Taking effect
- Checking the screen effective buffer size
- Scrolling
- How do I increase terminal scrollback buffer size?
- 4 Answers 4
- How to increase scrollback buffer size in tmux?
- 4 Answers 4
Increase buffer size while running screen
I use screen as my window manager through putty. Screen has been great, but I need a way to increase my buffer when I run commands. I have no buffer when I scroll up, no std out is saved beyond my window size on any terminal.
How can I increase this I can’t seem to find an option in the commands? Ctrl + a ? doesn’t seem to have what I am looking for.
4 Answers 4
I actually figured this out after looking through the man page. Setting the screen buffer inside .screenrc does work, but you can change it inside your screen session.
Ctrl-a + : and typing
gives you a 1000 line buffer.
You can also set the default number of scrollback lines in .screenrc by using
Then entering copy mode will let you scroll around.
Do Ctrl + a : then enter scrollback 1234 sets your buffer to 1234 lines. You enter scrollback mode («copy mode») with Ctrl + a Esc , then move in vi-style, leave copy mode with another Esc
You actually do have something of a buffer, but it’s invisible to most terminal emulators (which is why e. g. scroll bars don’t appear to work). One way to get at it is to enter copy mode ( Ctrl — A , [ followed by arrow keys, PgUp , et cetera). The size of this buffer can be configured in .screenrc . You you an change its allocation inside your screen session:
Источник
UNIX for Dummies Questions & Answers
how to increase size of the console screen buffer ?
Its difficult to explain what I am exactly looking for, so let me try with an example..
Suppose my program prints out thousands lines. But once my program ends.. I am not able to scroll up and see all the 1000 lines. The size of the screen buffer is obviously limited. Is there anyway I can increase this size ?
If there is a way, then is there any harm in increasing the size?
what flavor is your OS?
what terminal software (xterm, gterm. )?
Worst case, you redirect the output to a text file (which is kinda better from a resource usage perspective. )
and how do I find out which terminal software .
hmm, yea I can redirect the output.. but lets say its an interactive application. hmm well. lets just suppose u dont want to direct the output to a text file.
dependant on the terminal software that you’re using, quite a few have an option somewhere that you can change to show the number of lines of ‘history’
PuTTY for example.
Alternatively, if you need to interactively run a program, you could always use ‘typescript’
1) type «typescript» at the prompt, then run your program.
2) everything outputted to screen now goes to a file called ‘typescript’ including your key inputs.
3) ctrl-d at the end to stop typescript.
Hope that makes sense, I’ve not explained it that clearly.
Are you talking about a real or virtual console (e.g., such as you get on a Linux system with Ctrl-Alt-F1), or a terminal window (e.g., xterm or rxvt in X)?
If the latter, the terminal program probably has an option to set the buffer size; in xterm and rxvt, it’s -sl NUM, where NUM is the number of lines you want to save. See your terminal’s man page for more details.
In either a console or a terminal window, you can use typescript to save the session to a file, or you can use a pager such as [i/less[/i] or more to display the output of the command:
Or redirect the output of the command to a file:
Источник
How do I increase the scrollback buffer in a running screen session?
Lets say I have a currently running screen session I am interacting with through putty. I’ve realized that the scrollback buffer is too small and would like to increase it without starting a new screen session.
Is there a way to do this?
5 Answers 5
Press Ctrl-a then : and then type
to get a 10000 line buffer, for example.
You can also set the default number of scrollback lines by adding
To scroll (if your terminal doesn’t allow you to by default), press Ctrl-a ESC and then scroll (with the usual Ctrl-f for next page or Ctrl-a for previous page, or just with your mouse wheel / two-fingers). To exit the scrolling mode, just press ESC .
Another tip: Ctrl-a i shows your current buffer setting.
/.screenrc` and it is getting the first line, but the second one seems to be ignored.
The man page explains that you can enter command line mode in a running session by typing Ctrl + A , : , then issuing the scrollback command.
There is a minimal amount of «default» buffer when you startup a ‘screen’ session within your ‘putty session’. I use screens a lot in my work, so I can tell you that you will not have a combination of ‘screen’ buffer & ‘putty’ buffer within your ‘screen’ session.
Setting the default number of scrollback lines by adding defscrollback 10000 to your
/.screenrc file is the correct solution.
By the way, I use «defscrollback 200000» in my ./screenrc file.
As Already mentioned we have two ways!
Per screen (session) interactive setting
And it’s done interactively! And take effect immediately!
CTRL + A followed by : And we type scrollback 1000000 And hit ENTER
You detach from the screen and come back! It will be always the same.
You open another new screen! And the value is reset again to default! So it’s not a global setting!
And the permanent default setting
Which is done by adding defscrollback 1000000 to .screenrc (in home)
defscrollback and not scrollback (def stand for default)
What you need to know is if the file is not created ! You create it !
And you add defscrollback 1000000 to it!
Or in one command
(if not created already)
Taking effect
When you add the default to .screenrc ! The already running screen at re-attach will not take effect! The .screenrc run at the screen creation! And it make sense! Just as with a normal console and shell launch!
And all the new created screens will have the set value!
Checking the screen effective buffer size
To check type CTRL + A followed by i
And The result will be as
Importantly the buffer size is the number after the + sign
(in the illustration i set it to 1 000 000)
Note too that when you change it interactively! The effect is immediate and take over the default value!
Scrolling
CTRL+ A followed by ESC (to enter the copy mode).
Then navigate with Up , Down or PgUp PgDown
And ESC again to quit that mode.
(Extra info: to copy hit ENTER to start selecting! Then ENTER again to copy! Simple and cool)
Now the buffer is bigger!
And that’s sum it up for the important details!
Источник
How do I increase terminal scrollback buffer size?
I’m using CentOS 5.4 servers installed in a VMWare virtual machine with no X.Org server installed, so all access is via command line and the Linux terminal. I use Shift + Page Up to view the scrollback buffer, but its size is very limited.
How do I increase the size of the scrollback buffer?
4 Answers 4
Hmm. didn’t notice how old this was until I was almost finished. Since this area isn’t well documented anywhere and I’m almost done typing answer, I’ll soldier on anyway.
If you are using the Framebuffer console, it’s possible to use the fbcon=scrollback: parameter at boot time to increase the size of the scrollback. You’re probably not using that though.
Instead you’re likely going through the standard VGA console. There’s another fork in the road here. If you have a kernel compiled with the VGACON_SOFT_SCROLLBACK parameter enabled, it’s possible to increase the scrollback of the VGA kernel modules, by changing VGACON_SOFT_SCROLLBACK_SIZE . But you’ll have to recompile your kernel to do it. See an earlier answer for an example of the things to change, and I Need to Build a Custom Kernel for details of how to do it on CentOS. I consider it unlikely you’re willing to go through all that, but if you’re already building a custom kernel it may be easy to you.
If VGACON_SOFT_SCROLLBACK is off, you don’t have this option. In that case, the scrollback is actually stored in the VGA memory, which makes it very limited. The only thing you can really do in that case is reduce the number of virtual terminals started by default.
The standard CentOS kernel is built with these options:
So you’re probably looking at the «recompile the kernel with larger CONFIG_VGACON_SOFT_SCROLLBACK_SIZE » as the main option. Maybe you can switch to the framebuffer driver instead.
When faced with this problem, rather than fix the kernel scrollback I would just use screen instead. Get lots of other benefits too.
Источник
How to increase scrollback buffer size in tmux?
How do I increase scrollback buffer size in tmux ?
If I enter copy mode, the number of available scrollback lines (visible in upper right corner) is always below 2000. I tried to find a list of all tmux commands, but I can’t find anything about scrollback size. For all I see the screen command for setting that option doesn’t work with tmux .
Using tmux 1.8, Ubuntu 12.04 LTS, either konsole or gnome-terminal .
4 Answers 4
The history limit is a pane attribute that is fixed at the time of pane creation and cannot be changed for existing panes. The value is taken from the history-limit session option (the default value is 2000).
To create a pane with a different value you will need to set the appropriate history-limit option before creating the pane.
To establish a different default, you can put a line like the following in your .tmux.conf file:
Note: Be careful setting a very large default value, it can easily consume lots of RAM if you create many panes.
For a new pane (or the initial pane in a new window) in an existing session, you can set that session’s history-limit . You might use a command like this (from a shell):
For (the initial pane of the initial window in) a new session you will need to set the “global” history-limit before creating the session:
Note: If you do not re-set the history-limit value, then the new value will be also used for other panes/windows/sessions created in the future; there is currently no direct way to create a single new pane/window/session with its own specific limit without (at least temporarily) changing history-limit (though show-option (especially in 1.7 and later) can help with retrieving the current value so that you restore it later).
Источник