Use of screen in running background jobs and how to use this


 
Thread Tools Search this Thread
Operating Systems AIX Use of screen in running background jobs and how to use this
# 1  
Old 03-26-2014
Use of screen in running background jobs and how to use this

Hello,

Please advise use of screen in running jobs in nohup background and how to use this


Best regards,
Vishal
# 2  
Old 03-26-2014
Install via rpm, its helpful to edit/create a screenrc (either in /etc/screenrc of ~/.screenrc)

simple screenrc:
Code:
------------------------------------------------
# no default message, no audible bell
startup_message off
vbell on
 

# more usable scrollback
defscrollback 5000
 

# detach on hangup
autodetach on

 

# make bold work
#attrcolor b ".I"

#attrcolor i "+b"

 

# hardstatus and caption
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

 

 

# resize
bind + resize +5
bind - resize -5
bind = resize =

 

# bindings
bind % screen -t top top

read the MAN so you know how to reattach disconnected sessions, etc. Basic key bindings start with Ctrl-a then the key-combo you want to send to screen (ex, Ctrl-a then ctrl+c will create a new psuedo terminal, Ctrl+a then Ctrl+A will allow you to name the new terminal something useful in the statusbar)
screen is useful as it grabs the hup message, if you get disconnected from your session your psuedo terms will still be running so your programs don't get the hup and continue to run.

helpful args for this -
screen -ls
screen -rd "session-name" = reconnect the session and disconnect it from elsewhere if needed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nohup and background jobs

Hi All, Can someone help me in knowing the exact difference between nohup and &. The definition is quite clear but i only want to know if i run my job using & and in between i hung up my terminal. (10 Replies)
Discussion started by: Uinx_addic
10 Replies

2. Shell Programming and Scripting

Problem with Background Jobs

We had a generic process where the jobs are scheduled to run sequentially and in background. We are noticing the problems with the background jobs. Error Message: /bin/ksh: /home/suren/bin/GenericReportScript.sh: cannot execute The same script is existing in bin and it had enough... (2 Replies)
Discussion started by: sureng
2 Replies

3. Shell Programming and Scripting

Waiting for an arbitrary background process (limiting number of jobs running)

Hi, I'm trying to write a script to decompress a directory full of files. The decompression commands can run in the background, so that many can run at once. But I want to limit the number running at any one time, so that I don't overload the machine. Something like this: n=0 for i in *.gz... (15 Replies)
Discussion started by: p.f.moore
15 Replies

4. UNIX for Dummies Questions & Answers

Background jobs

If I run a job in the background and logoff. Will the job continue to run or will my processes be killed ? (1 Reply)
Discussion started by: jxh461
1 Replies

5. Shell Programming and Scripting

How to find the jobs running in background and stop

Hi All, I have requirement. I am running a job every 30mins. before starting the process, i need to check the process, if the process is still running then i need not trigger the process again, if it is not running then trigger the process again. I am using cron to trigger the shell script. Can... (7 Replies)
Discussion started by: srinivas_paluku
7 Replies

6. UNIX for Advanced & Expert Users

Notification from Background jobs

Reposting, as it got lost during the database backup. :( Via a shell script a spawn 3 background jobs namely a, b & c. These will take different times to complete. I want to print a different message on completion of each. How can i find out when each one has completed independently. ... (19 Replies)
Discussion started by: vibhor_agarwali
19 Replies

7. Shell Programming and Scripting

background jobs exit status and limit the number of jobs to run

i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help. $cat run_job.ksh #!/usr/bin/ksh #################################### typeset -u SCHEMA_NAME=$1 ... (1 Reply)
Discussion started by: GrepMe
1 Replies

8. Shell Programming and Scripting

Issues with exit after running jobs in background

I have the following sample script to run a script the jobs with the same priority(in this case field3) in parallel; wait for the jobs to finish and run the next set of jobs in parallel.When all the lines are read exit the script. I have the following script which is doing evrything I want... (1 Reply)
Discussion started by: hyennah
1 Replies

9. Programming

Background jobs

Hi there, I'm quite new to UNIX for programming. I have a script that does this: Shows on screen real-time results taken from phone calls and logs them in a file. However, when I start my script, I want my script to start logging in the file in the background, so I can continue working on... (1 Reply)
Discussion started by: Jeremiorama
1 Replies

10. Shell Programming and Scripting

background jobs

Hi, i have a problem with turning a job into backgrund. When i enter this at the shell: spice -b darlington.cir -r output.raw > screenout.tmp & and then let me show the currently running jobs, i get the following output: + Suspended (tty output) spice -b darlington.cir -r output.raw >... (4 Replies)
Discussion started by: qsi
4 Replies
Login or Register to Ask a Question