Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use a detached screen session to launch a process, I like it 'cause I can reattach the session and check how it is going.

The process shows output on a session, checked with screen -r or screen -x, I would like to create a log too, for this informations, both for the screen session and to a log file.

usually I use this screen command:

screen -A -m -d -S prog01 binarie_program

and I have tried this:

screen -A -m -d -S prog01 binario > server.log

with no success, in fact it creates the file called server.log but empty of rows.

Any suggestions?

Thanks in advance

share|improve this question

2 Answers 2

From the man page:

 -L   tells screen to turn on automatic output logging for the windows.
share|improve this answer
    
@Eddy excellent! best answer! work very well... my scrolling was too fast to see -L option from 2man" thanx again! –  xer Nov 19 '09 at 16:00
    
Happy to help :) –  Eddy Nov 19 '09 at 17:22
    
Just to improve this answer, what I noticed is that the log file will be named screenlog.N where N represents the screen session. If you only have one screen session, it will be named screenlog.0 and it is placed in $HOME –  icasimpan Jul 30 '12 at 2:31

you can try utility script

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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