PuTTY - Display whole server output (screen command)

10,326

You can adjust the amount of backscroll Putty has in the "Window" settings. As someone who has managed server like this in the past, downloading the log to see the history is much easier to do!

Alternatively, use tail -f server.log to get a live "feed" of your server log while not in a screen session.

Share:
10,326

Related videos on Youtube

BrainStone
Author by

BrainStone

Updated on September 18, 2022

Comments

  • BrainStone
    BrainStone almost 2 years

    I am using PuTTY to administrate a Minecraft server on a remote Linux machine. I do not own the server but I have an SSH account.
    The server has a console window which can be accessed with the screen command. The problem is that the output is VERY long. And if I start the session with PuTTY I can only see a few lines. I noticed when I resize it (make it bigger) more lines are loaded and displayed. So I wondered if PuTTY is able to load the entire log or at least a few hundered more lines.
    This is necessary because some things happen and if too much happened I can't see it if I log in some time later.

    Notice:
    I already have the alternate screen display style enabled but this does not load anything that happened above the top-most line on my screen!

  • Nathan C
    Nathan C about 11 years
    Open ~/.screenrc and put the line defscrollback 5000 in. You'll need to restart screen for this to take effect though. You're dealing with a limitation of screen at this point.
  • BrainStone
    BrainStone about 11 years
    On the server? Or on my machine?
  • Nathan C
    Nathan C about 11 years
    On the server..
  • BrainStone
    BrainStone about 11 years
    Does not work. As I said before I only have limited access. Might it be usefull to post the content of the sh file I use to start the screen?
  • BrainStone
    BrainStone about 11 years
    I forced it to use my file by putting the parameter -c .screenrc (I used the cd command before) but in PuTTY I still can't scroll up!
  • Nathan C
    Nathan C about 11 years
    If the server's still running, then it's probably a limitation of the backlog of the daemon (minecraft) itself. You'd be better served just using cat server.log to show what's happening.
  • BrainStone
    BrainStone about 11 years
    Ok. I made it work. This keeps the displaying the entire screen while I do not close PuTTY. When I start a new session the old log is not displayed. What could I do to fix that?
  • terdon
    terdon about 11 years
    @YannickSchinko aren't the logs simple text files? Why can't you use a terminal pager like less or more to view the files and scroll around them easily? Something like less /var/log/logfile.txt?
  • BrainStone
    BrainStone about 11 years
    Because this won't give me the possibility to enter commands. And since the file keeps updating and growing I can't just use the file!
  • Nathan C
    Nathan C about 11 years
    I think this is a matter of "best practice". The point of the console is to give point-in-time feedback on actual commands, while the log file gives you historical data. Use the screen session to do commands, but you can use tail -f server.log to keep a live output of your log file (it's written to live).
  • BrainStone
    BrainStone about 11 years
    That is an good solution for me! Thanks! (You probally could put thsi in your answer)
  • user2313067
    user2313067 about 11 years
    You can also use screen copy mode (using Ctrl+A Esc) to navigate through screen's history. See samsarin.com/blog/2007/03/11/…