logging stdout


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers logging stdout
# 1  
Old 09-01-2006
logging stdout

Hello

I run a program that creates number of processes.
Is there a way of viewing their standard output on terminal and logging it to a log file simultaneously?
# 2  
Old 09-01-2006
yes, look into 'man tee'
# 3  
Old 09-01-2006
I mean, that i don't want to do it permanently , but from some point of execution. For example, the program and all its processes run, and when some error occures, i decide to switch to debugging mode and both view output on screen and save to log. May be durung this time new processes were created and i want to duplicate its output two. And after logging all needed data i switch back and only view output on screen.

Last edited by masha; 09-01-2006 at 03:47 PM.. Reason: second question
# 4  
Old 09-01-2006
screen may be able to do what you want. I don't know of anything else that can hide output then suddenly grab it back later.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Syslog not logging successful logging while unlocking server's console

When unlocking a Linux server's console there's no event indicating successful logging Is there a way I can fix this ? I have the following in my rsyslog.conf auth.info /var/log/secure authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies

2. UNIX for Dummies Questions & Answers

STDout

Hi, I have a program set to read in a text file, change certain characters and then print the altered version to the screen but does anyone know how to save the new version as another text file? And, if possible, how to specify the file name, and perhaps location? Thanks! (2 Replies)
Discussion started by: PerlNutt
2 Replies

3. UNIX for Dummies Questions & Answers

STDIN and STDOUT

Hallo, i have a script like: if ;then echo "OK" else echo "ERROR $2 is missing" fi; if ;then touch $2 fi; if ;then cat $1 | grep xy > $2 (1 Reply)
Discussion started by: eightball
1 Replies

4. Shell Programming and Scripting

stderr/stdout

Can somebody explain to me why the diff output is not going to stderr? Yet when I issue a diff from the command line the return code is -ne 1. I am guessing diff always writes to stdout??? Is there away I can force the difff to write to stderr USING THE CURRENT template. If possible, I... (5 Replies)
Discussion started by: BeefStu
5 Replies

5. Post Here to Contact Site Administrators and Moderators

Constant Logging In (After Logging Out)

Hi Everyone. First, I want to thank all of you for letting me participate in this great group. I am having a bit of a problem. After I get an email from a responder, I login to make my reply. In the mean time I get another response by email from another member, I go to reply to them and I... (6 Replies)
Discussion started by: Ccccc
6 Replies

6. UNIX for Advanced & Expert Users

How to use gzip on stdout

Does anyone know how I can use gzip to zip a large log file on the fly. My simulation is currently logging a large file that I need for analysis at a later point. However the files are so huge that I may even run out of disk space. The content is mainly text so when compressed the files are... (2 Replies)
Discussion started by: mitch1710
2 Replies

7. UNIX for Dummies Questions & Answers

not able to capture STDOUT

I am using a third party API to get some real time feed. When I run the command it shows the results properly: etd@mhs-apps5009 $ mamalistenc -m lbm -tport mamaqa -S MLALERTS -s KANA wFinancialStatus Type CTRL-C to exit. (null).MLALERTS.KANA Type: INITIAL Status OK wFinancialStatus |... (5 Replies)
Discussion started by: aks__
5 Replies

8. Solaris

stdout redirected?

Hi all, I have a c++ program which is running fine but has some printfs which its spews on to the screen, which I need for debugging. But, I execute this program through a java, i.e I run a java program which actually launches my c++ executable and when it does this, I see none of my printfs... (1 Reply)
Discussion started by: Naanu
1 Replies

9. UNIX for Dummies Questions & Answers

pipe and stdout

Hi there I know that this isn't the place to put a question like this i supose, but i'm geting desperated. I have searched in interbase forums and nothing helped. If anyone can help me i would apreciated. I'm using HP-UX with a version 3 of interbase wich means i can't split the backup file into... (3 Replies)
Discussion started by: vascobrito
3 Replies

10. Filesystems, Disks and Memory

where does stdout link to?

As I read the source code of unix I wonder where u_ofile(it should be stdout) link to ? Does it link to a file structure like ordinary files? :confused: (7 Replies)
Discussion started by: jiangyanna
7 Replies
Login or Register to Ask a Question