Running process in nohup


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Running process in nohup
# 1  
Old 09-17-2014
Running process in nohup

Hi All,

I am facing issue in running a process in nohup. I ran a process in terminal since it is taking too long to complete I need to make it as background and nohup. I tried below and was able to make it in back ground

1. Cntrl + Z
2. bg

I am using Korn Shell so disown is not working can you please help me to know how can I force it to nohup

Thanks,
Arun
# 2  
Old 09-17-2014
Hello Arun,

Please use code tags while mentioning the commands in your post this is one of the important rule of this forum which you have agreed while creating your user profile. Also you can login to a seprate session to server and grep for the specific process then can use kill command if you are the root or owner of the process(In case process got hung). Kindly refer man kill, man grep and man nohupfor same too.


Thanks,
R. Singh

Last edited by RavinderSingh13; 09-17-2014 at 10:51 AM..
# 3  
Old 09-17-2014
Hi Arun

Looks like you can't go home until the process completes Smilie , there is a disown builtin in recent versions of ksh (certainly on my rhel6 box @ work anyway)

From the ksh manual page
Code:
       disown [ job... ]
	      Causes  the shell not to send a HUP signal to each given job, or all active jobs if
	      job is omitted, when a login shell terminates.

This User Gave Thanks to Skrynesaver For This Post:
# 4  
Old 09-17-2014
Hi Arun,

Some flavours of unix have a -p switch associated with nohup, you could try;
Code:
nohup -p pid

Something to check though is the use of pipes in the command.

Regards

Dave
This User Gave Thanks to gull04 For This Post:
# 5  
Old 09-17-2014
Tried nohup -p which didn't help. I am using redhat . so there is no possibility that I can make the running process to nohup

Thanks,
Arun
# 6  
Old 09-18-2014
Which version of RHEL do you have?

The suggestions from Skrynesaver may apply.



Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nohup not give expected output. Non-stop running process

Hello, I am trying to make a bash script, I tested nohup but it did not help me. My code is: ffmpeg -i $input_url -c:v copy -c:a copy -listen 1 -f mpegts http://localhost:port/live/test When I open it in VLC, it starts feeding my screen and I see bitrate values. When I stop watching it,... (4 Replies)
Discussion started by: baris35
4 Replies

2. Shell Programming and Scripting

Running nohup command on remote server

I am having an issue in running a nohup command in a remote linux box from a linux box. Here are the details. Linux Machine 1: I have a script which starts a services and dumps the output into a log file. nohup sh weblogic.sh >> /home/log.out & I have placed the entire command in a... (2 Replies)
Discussion started by: accessbalaji
2 Replies

3. Shell Programming and Scripting

Keep a script on remote machine running (nohup?)

Hi, I'm using expect to ssh into remote machine (i know its not the best practice), and run script "script.sh". This "script.sh" checks whether an other process (some another script) is running and if not, it runs it as some other user. #!/bin/bash /usr/bin/expect << EOD set... (5 Replies)
Discussion started by: oseri
5 Replies

4. Shell Programming and Scripting

How to pause process running under nohup?

Hi ALL, Is there any way to pause a running process under nohup ? I have fired a build commands with required flags under nohup as below. now how can I pause the started build process. nohup make DEVICE=ap DEBUG=1 & I understand we can use ctrl + z to pause a foreground process... (3 Replies)
Discussion started by: useless79
3 Replies

5. Shell Programming and Scripting

Error while running script using nohup

Hi, I am running the below script. When i run the script normally it executes fine but when i run the same script using nohup it throws an error as getStatus.sh: syntax error at line 3: `(' unexpected . Can you let me know why it is so? while do . $(dirname $0)/include.sh cd... (2 Replies)
Discussion started by: vignesh53
2 Replies

6. AIX

Query on running script with nohup

Hi, I'm trying to run database restore script with the nohup command as it will run for long hours since if I run it normally, the putty session will become inactive and the restore gets terminated. The command I use is nohup db2 -tvf FBR_NODE0000.scr -z FBR_NODE0000.log & But the problem is... (2 Replies)
Discussion started by: vkcool.17
2 Replies

7. Shell Programming and Scripting

Usage of NOHUP - How to keep the child process running even if I close the Server connection

Hi. ! When I use the 'NOHUP' along with the '&', the process will be running in the background. Even when I attempt to close (Meaning 'EXIT') the session (say PUTTY in this case), it wont exit unless the process is completed. But, say when I forcefully terminate the session (SHUT DOWN the... (2 Replies)
Discussion started by: WinBarani
2 Replies

8. UNIX for Advanced & Expert Users

nohup and background process

What is the difference between running a process using nohup and running a process in background ? Please explain (6 Replies)
Discussion started by: srksn
6 Replies

9. Shell Programming and Scripting

pid of nohup process

I want to print the pid of a nohup process to a file so later I can use the list of pid's in that file to stop the background processes again. I use ksh on AIXv5.3: nohup /start/script.ksh 1>/dev/null 2>&1 print $$ > .pid nohup /start/script2.ksh 1>/dev/null 2>&1 print $$ >> .pid But... (2 Replies)
Discussion started by: rein
2 Replies

10. Shell Programming and Scripting

nohup process hangs

Hi All, I tried searching for this, but I have yet to find anything useful. So here goes, if a script executed from another script with nohup & hangs, does it affect the parent script? Reason I ask, we have a windows box with NFS, and we use it to store some of our files. Currently, I mount the... (2 Replies)
Discussion started by: Sully
2 Replies
Login or Register to Ask a Question