LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-16-2006, 08:07 AM   #1
vbseeker
LQ Newbie
 
Registered: May 2005
Location: India
Posts: 13

Rep: Reputation: 1
problem with nohup command and nohup file size


Hi,

I am using rehl 4 server. Developed the bulk sms application.

In this i need to connect with 20 smsc. For connecting to each smsc i have created seperate java client programs.

Now if i am running this java appliation in the following way.

nohup java java1 & > java1.out
nohup java java2 & > java2.out
nohup java java3 & > java3.out
nohup java java4 & > java4.out
nohup java java5 & > java5.out
nohup java java6 & > java6.out
nohup java java7 & > java7.out
nohup java java8 & > java8.out
nohup java java9 & > java9.out
nohup java java10 & > java10.out

Now the problem i am facing is :

1. To check the status of the application i need tail the all the files one by one so see if the app is working well.
2. The nohup result file i.e. java1.out becomes too huge.
After 10 days i need to stop the application and delete the file and again run the command.

Can anybody help me to give a work around to do this work quickly.

Can anybody suggest any kind of utility that will help me to get rid off for the activity i am doing.

Thanks
Anand
 
Old 09-17-2006, 11:36 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
One suggestion is that instead of using nohup, use 'screen' and let the output go to stdout. Start each instance in a different screen session. You can then disconnect from screen. To check the status, just reconnect and you will have access to the most current output (100 lines in each session by default, but configurable).

For example (comments in parens):

screen -h 1000 (start screen with a scrollback of 1000 lines)
java java1 (start the first instance)
ctrl-a c (create a new session)
java java2 (start the second instance)
...
ctrl-a c (create a new session)
java java10 (start the last instance)
ctrl-a d (disconnect from screen)

Some time later:

screen -r (reconnect to the running screen sessions)
ctrl-a 0 (check the first instance)
ctrl-a 9 (check the last instance)
ctrl-a d (disconnect again)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nohup & bittorrent-console problem txm123 Linux - Newbie 2 02-25-2006 07:31 AM
nohup retuncode krusty_lab Linux - General 2 10-13-2005 06:04 AM
help on nohup vinayuh Linux - General 3 07-22-2005 12:24 PM
nohup command chbin Slackware 1 03-31-2005 03:47 AM
nohup failure tn1681 Programming 1 01-09-2003 05:40 PM


All times are GMT -5. The time now is 09:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration