0

I'm pretty new to tmux. Commands that I run in my ssh server give out pretty large outputs and I should be able to scroll/search the output. I've read some answers for increasing the scrollback buffer but the downside is it consumes huge RAM as said here. I'm looking for a solution that doesn't stress the RAM at the same time allowing me to search no matter the size of logs.

If I don't use tmux and do a plain ssh server from my mac, I can easily browse the logs because there are no buffers involved. I want something like this.

Is this possible at all?

duplex143
  • 619
  • 2
  • 9
  • 25

1 Answers1

1

I can easily browse the logs because there are no buffers involved

That's not how that works. To be able to scroll back through output, it has to be saved in RAM. There is no way to scroll back through previous command output without storing that information in RAM (you could also save all command output to a file, and then open that file, but when you open that file, you're loading that data into memory).

That answer recommends against a huge amount of buffer for tmux because tmux has: a) multiple panes; and b) persistent terminals. These together means that if you use a ton of panes and never stop your tmux session, eventually tmux will be storing a lot of data... but if you need access to that data, you have to store it somewhere, and if you need instant access, you need to store it in RAM.

TL;DR: tmux is not somehow worse at storing scrollback data than any other program, it just makes it more likely that you have lots of data.

jeremysprofile
  • 10,028
  • 4
  • 33
  • 53
  • If I modify history-limit to a very large number, all tmux panes reserve this much amount of buffer despite the pane being a new one? – duplex143 Dec 22 '20 at 06:31