You are not logged in.

#1 2012-05-22 05:42:33

Archdove
Member
Registered: 2011-09-23
Posts: 118

[SOLVED] Read tty2 messages after rebootq

Hi

We've a software which causes a SIGSEGV and stops working. This seems only to be logged in the standard output an therefore only to the tty where i started it.
Is there a way to access old messages on tty? Like from two days (one reboot) ago?

Regards, Archdove

Last edited by Archdove (2012-05-29 12:59:17)

Offline

#2 2012-05-22 08:51:23

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,476
Website

Re: [SOLVED] Read tty2 messages after rebootq

Check your logs in /var/log/

Last edited by Unia (2012-05-22 08:51:50)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2012-05-22 09:07:25

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,655

Re: [SOLVED] Read tty2 messages after rebootq

Archdove, in case /var/log doesn't have the info you need, redirecting output from the problem software (foo) to a file seems the easiest way to get it.

create an empty textfile, say foo-output.txt

start foo like this :

foo >> foo-output.txt
This will append all output of foo to foo-output.txt

if foo has any debug or loglevel options, also add them to the command.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#4 2012-05-22 11:28:26

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [SOLVED] Read tty2 messages after rebootq

Hey Guys

/var/log/ does not contain anything for that matter. For now i will activate ptrace and pipe stdout to a textfile.

Offline

#5 2012-05-23 15:50:48

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [SOLVED] Read tty2 messages after rebootq

Piping did not help. The SIGSEGV error was still printed to stdout and thus into the terminal window. Too bad.
Maybe there is another way? ... The system is Rebooting at 4am and i can't do anything about that ...

Offline

#6 2012-05-23 15:54:41

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,751
Website

Re: [SOLVED] Read tty2 messages after rebootq

"normal" pipes or redirects only redirect the stdout.  Errors do not go to stdout, they go to stderr.

Try

foo > log.text 2>&1

This redirects the stdout to a log and the stderr to the stdout, which then goes to the log file.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#7 2012-05-29 05:52:20

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [SOLVED] Read tty2 messages after rebootq

@Trilby: That sounds sane. Can you provide me a hint about what to google to learn more about what you're doing there?

2>&1

Last edited by Archdove (2012-05-29 05:53:18)

Offline

#8 2012-05-29 07:28:08

fracek
Member
From: Italy
Registered: 2012-05-27
Posts: 5

Re: [SOLVED] Read tty2 messages after rebootq

Archdove wrote:

@Trilby: That sounds sane. Can you provide me a hint about what to google to learn more about what you're doing there?

He's using redirections, you can learn more on the bash manual.

Offline

Board footer

Powered by FluxBB