Process status for NOHUP command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Process status for NOHUP command
# 1  
Old 08-30-2011
Process status for NOHUP command

Hi,

I have run a shell script as a background process using 'nohup' command. I want to see the process id of this, so that I will be able to kill it later on when required.

I tried to collect these details using 'ps' command and could not view this information.

How do we get this details, please help.

Thank you.
# 2  
Old 08-30-2011
Refer here
# 3  
Old 08-30-2011
Process status for NOHUP command

Hi,

The below link is not quite helpful for me and I'm using bash shell, please give me more relevant examples and which is easier to understand.

Thank you.
# 4  
Old 08-30-2011
The example given in the referenced thread is relevant, as it tells you a way to get the PID of a background nohup process. And bash and ksh are largely (though not completely) compatible.
# 5  
Old 08-30-2011
Hi,

I could not get any output, when I use the Print command. It throws an error. Please help, thank you.

Code:
Test> print $$ > .pid
-bash: print: command not found

# 6  
Old 08-30-2011
That would be one of the few cases where ksh and bash aren't compatible, as ksh has a built-in print command, while bash doesn't. Use echo or printf instead.
This User Gave Thanks to pludi For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Nohup Command gets status Stopped

Good Morning I need your help please, i tried to execute this script using nohup command but it gets in status stopped nohup ./SapInterfases.sh > SapInterfases.log & prodstg02$ jobs + Stopped(SIGTTOU) nohup ./SapInterfases.sh > SapInterfases.log & I check out log: $ more... (15 Replies)
Discussion started by: alexcol
15 Replies

2. UNIX for Advanced & Expert Users

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... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

3. Shell Programming and Scripting

Help with finding the exit status of a 'nohup' command using 'PID'.

Hello All, I need to run a set of scripts, say 50 of them, parallely. I'm running these 50 scripts, from inside a script with the help of 'nohup' command. 1.The fifty scripts are stored in a separate file. 2.In a master script, i'm reading every line of the file through loop and executing... (4 Replies)
Discussion started by: SriRamKrish
4 Replies

4. Shell Programming and Scripting

Storing process Id of a nohup command

Hi, I am running below code: for i in `ls` do nohup sqlldr userid=apps/apps data=data01.dat log=my1.log control=my.ctl bad=my1.bad direct=yes silent=all parallel=true & done This will run the sqlldr command in parallel as a background process. I want to store the process Id each... (7 Replies)
Discussion started by: Pratiksha Mehra
7 Replies

5. 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

6. UNIX for Dummies Questions & Answers

Can I convert a foreground process to NOHUP ?

OS : AIX 6.1/Solaris 10 After I started running a shell script, I've realized that it will take another 5 hours to complete. Is there anyway I could convert this foreground process to run in nohup mode so that I can go home peacefully ? I have the process ID $ ps -ef | grep... (4 Replies)
Discussion started by: kraljic
4 Replies

7. Shell Programming and Scripting

Process id of the exe started with nohup

Hi, I have a strange problem. In my shell script, i am startting another program (a c++ exe) with nohup . I am getting the process id of this started process with using $! I am writing this process id into another file so that i can keep checking for this process ids to check whether the... (2 Replies)
Discussion started by: parvathi_rd
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