LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   background job differs in putty and actual server (https://www.linuxquestions.org/questions/linux-newbie-8/background-job-differs-in-putty-and-actual-server-4175577364/)

arun natarajan 04-13-2016 11:14 AM

background job differs in putty and actual server
 
2 Attachment(s)
Hi,

Am accessing my rhel6 linux server via putty.
When i created a background jobs using putty, it is being listed only in putty and not on actual server.
Hope background job actually runs directly on server without any terminal connection.
Need to know the reason for this.

PFAs for the same.

TenTenths 04-13-2016 11:26 AM

Using nohup to try and run non-demonizing processes in the background and disconnecting the session can have variable results.

My personal preference would be to make use of a "screen" session - https://www.rackaid.com/blog/linux-s...al-and-how-to/ or start your background job from crontab.

thllgo 04-13-2016 01:44 PM

The command "jobs -l" only lists jobs for that user in that terminal. If you login to two different terminals the command will produce two different outputs. What you may wish to do is "ps -elf | grep <string>" where string is what ever you are looking for. So the command "ps -elf |grep root" will list all jobs run by root or have the word root in the command. You could have run the command "ps -elf |grep cat" in the case you listed


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