2

Running Ubuntu 18.04 on a non-headless server dedicated only to cryptocurrency mining.

The server, after some moments of mining, beeps and reboots. While it does that, there is some kind of error message that I can't get to read, is a lot like if you blink it you'll miss kinda thing. Lasts less than a second on screen before rebooting.

I've tried checking every log at /var/log and also journalctl looking for this error message with no luck. Tried to log all the output of the miner to >> minerlog.log with no luck. If i SSH to the server through putty, the error message is not shown, so logging a putty session doesn't work either.

My question is, then, is there a way to log all the text displayed in the monitor to a file so I can check lather what's that error message? Or if a log like that already exists?

Pablo Bianchi
  • 17,371

2 Answers2

0

script

The standard tool is the script command. Here a description from the manual, man script:

DESCRIPTION
script makes a typescript of everything displayed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).

If you need more professional tools you can search for one on this link.

abu_bua
  • 11,313
0

When you are ready to start recording a log file, type:

script screen.log

Now, until you stop the script, all input and output in the Terminal will be stored in screen.log. When you are done, just type:

exit

Your screen.log file will be stored in the local directory. If you want to redirect it, use an absolute pathname such as ~/screen.log. This will do exactly what you are looking for.

See if you can add the above lines in a script that will execute as soon as the machine starts.

Source: Another answer

dgor
  • 101