I currently have a background process on my unix server that's running hours longer than it should be.
I can't remember the command to allow me to see the output of a background process. I'll remember to bookmark this answer!
I currently have a background process on my unix server that's running hours longer than it should be.
I can't remember the command to allow me to see the output of a background process. I'll remember to bookmark this answer!
What also might be useful if you're uncertain whether it's doing anything at all, is use 'strace'.
If your app is the 'dhcpd' service, run
ps ax | grep [d]hcpd
Your PID is 21645, so you'd run
sudo strace -p 21645
. Or drop the 'sudo' if you're root already.It will get the system calls from your application in real time and tell you precisely what your program is doing.
Note: Wrap a letter of the grep command in a bracket to strain out the grep command itself.
As a follow up to Mariano Montañez Ureta.
If you can see the task in the
jobs
window, all you should be able to see something like this:If you then use the
fg
command coupled with the job number you can bring that to the foreground, i.e.fg %1
would bring mytail
command to the foreground. You can also use thefg
command with a PID.use fg wich means foreground :)