1

I have a linux server that is connected to my ec2 instance and I'm trying to do some debugging when I'm in screen. The issue I'm facing is that sometimes I get big long error messages that fill up the PuTTy screen, and I can only see a few lines, maybe like 20. I've tried doing shft+pgup and ctrl+pgup but this just brings me back up to where I started leaving the rest of the output hidden. I've also tried doing ctrl+a+[ and then try to page up with the up arrows but nothing happens. I also my scrollback is set to 2000 by default, but it's obviously not showing 2000 lines.

I've tried pretty much everything that I've found online and none of them seem to work. It's a little bit of a bummer not being able to see all the logging, especially when I need to find out what's causing some of my errors. Only seeing part of the error or just the bottom half definitely doesn't help me.

If anyone knows how I can see the rest/all of the logs that I'm outputting to my server, I would appreciate it greatly! Thanks.

0

I use screen a lot, but I chose to automatically log all the console output to a file (by editing the .screenrc file in the home directory).

Then you can conveniently review or tail the file. There are alternatives to screen such as tmux that may behave differently, but I don't have enough experience.

If you have error messages, the application generating those errors should log them to a file anyway. Error logs should be persistent, relying on the screen is not enough.

4
  • I've tried looking for an error-log on my server, but there isn't one. My application is just logging them to the console. I'm not quite sure how to get those logs to show up in a file from my web-based application though. I can't just write to a file with a web-based application because accessing the file system isn't allowed. – Michael Jan 31 '20 at 21:02
  • That's what I am saying, you can configure screen to log all the console output to a file. The best is to add a .screenrc file to your home directory, otherwise pass parameters to screen from the command line. See for example: softpanorama.org/Utilities/Screen/screen_logging.shtml or gist.github.com/joaopizani/2718397. There are quite a few options that will enhance your user experience too. Even in a very restricted environment there should be a location on your file system where the application has write rights ? – Anonymous Jan 31 '20 at 21:39
  • I will take a look at these links and see if I can do something with them. – Michael Jan 31 '20 at 21:40
  • If I were to go to the currently attached screen and do ctrl+a+H will that send all my logs to a file then? Or am I completely off? – Michael Jan 31 '20 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.