The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
nohup - help! bluemoon1 UNIX for Dummies Questions & Answers 9 10-11-2007 11:49 PM
Help on nohup bobbyjohnz UNIX for Advanced & Expert Users 3 10-18-2006 11:56 AM
nohup ( no log message) mike1022 Shell Programming and Scripting 1 09-16-2006 08:55 PM
Nohup miwinter UNIX for Dummies Questions & Answers 3 07-21-2006 05:20 AM
nohup usage.. charan81 UNIX for Dummies Questions & Answers 2 05-21-2006 02:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-02-2007
ramky79 ramky79 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
nohup.out

I have a program which writes to nohup.out ...
over the time this nohup.out becomes a large file and i cannot read the contents of this file using a vi editor.... whe i do a vi nohup.out it gives an error insufficient memory....
do i need to clean this nohup.out periodically ( or compress it using tar and place it as an archived file) how to clean this nohup.out. or how to look into the contents of this nohup.out

Anybody who came across a similar problem pls respond.

thanks n Happy NEW YEAR.
Ram
  #2 (permalink)  
Old 01-04-2007
johnf johnf is offline
Registered User
  
 

Join Date: May 2006
Location: England
Posts: 284
Quote:
Originally Posted by ramky79
I have a program which writes to nohup.out ...
over the time this nohup.out becomes a large file and i cannot read the contents of this file using a vi editor.... whe i do a vi nohup.out it gives an error insufficient memory....
do i need to clean this nohup.out periodically ( or compress it using tar and place it as an archived file) how to clean this nohup.out. or how to look into the contents of this nohup.out

Anybody who came across a similar problem pls respond.

thanks n Happy NEW YEAR.
Ram
The reason you cannot open the file with VI is the file is to large for VI to handle. You could look at the file using tail or more. The file is created by a background process running with nohup (No Hang Up) protection and the contents of the nohup.out is the output from the processes. First check the contents of the file and if safe just cat /dev/null to to clear it.
  #3 (permalink)  
Old 01-05-2007
ramky79 ramky79 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
thank you...
  #4 (permalink)  
Old 10-23-2007
OllieBond OllieBond is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 2
nohup.out (file size)

Quote:
Originally Posted by johnf View Post
The reason you cannot open the file with VI is the file is to large for VI to handle. You could look at the file using tail or more. The file is created by a background process running with nohup (No Hang Up) protection and the contents of the nohup.out is the output from the processes. First check the contents of the file and if safe just cat /dev/null to to clear it.
Hi..,
Related to this issue, is there a way to limit the size of nohup.out file automatically?

rgds,
Ollie
  #5 (permalink)  
Old 10-23-2007
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,628
Yes, there is: put a cron-job in effect, which truncates the file (by something like "cat /dev/null > nohup.out"). How often you will have to run this job depends on how much output your process generates.

But if you do not need the output of the job altogether (maybe its garbage anyways, only you can answer that) you could prevent writig to file nohup.out in first place. Right now you start the process in a way like this:

nohup command &

replace this by

nohup command 2>/dev/null 1>/dev/null &

and the file nohup.out won't even get created.

The reason why the output of the process is being directed to a file is:

Normally all processes (that is: commands you enter from commandline, there are exceptions, but they don't matter here) are attached to a terminal. Per default (this is how Unix is handling this) this is something which can display text and is connect to the host via a serial line. If you enter a command and switch off the terminal you entered it from the process gets terminated too - because it lost its terminal. Because in serial communication the technicians traditionally employed the words from telephone communication (where it came from) the termination of a communication was not called an "interruption" or "termination" but a "hangup". So programs got terminated on "hangups" and to program to prevent this was "nohup", the "no-termination-upon-hangup"-program.

But as it may well be that such an orphaned process has no terminal to write to it nohup uses the file nohup.out as a "screen-replacement", redirecting the output there, which would normally go to the screen. If a command has no output whatsoever though nohp.out won't get created.

bakunin
  #6 (permalink)  
Old 10-23-2007
OllieBond OllieBond is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 2
Thanks for the reply..

Just noticed that it is an AIX forum, I hope the answer is valid in HPUX (and others) too..

Thanks Bakunin
Hope to see you on the Bridge table

BBO: OllieBond
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0