Skip to main content

Questions tagged [nohup]

nohup is a POSIX command to ignore the HUP (hangup) signal.

Filter by
Sorted by
Tagged with
3 votes
1 answer
591 views

Unable to capture remote client data with nohup and socat

I need to capture the verbose and debug output of socat running on a remote server. I can achieve the above when running socat in the foreground: $ socat -x -d -d -d tcp-l:8080,bind=0.0.0.0,fork,...
Harry's user avatar
  • 851
0 votes
1 answer
906 views

tail -f nohup.out gives cannot open 'nohup.out' for reading: No such file or directory

I connected to a remote server using ssh protocol and launched this command in order to run my python script remotely: nohup python3.8 -u sab.py > log_15_09_2023.txt & This works fine since if ...
tail's user avatar
  • 111
3 votes
2 answers
501 views

SSH remote command with nohup not working as expected

I wanted to run a long running command in a remote server, even after the connection terminates. So I thought of using ssh host "nohup cmd &". But for some reason, neither cmd is going ...
Sourav Kannantha B's user avatar
1 vote
1 answer
477 views

Maintain a fixed-size-queue of nohup jobs

Suppose I would like to run multiple nohup jobs but at each time I would like to at most run 4 nohup jobs. Is there a way to: keep track of 4 nohup job status once one of them finishes, it triggers ...
Sheng Yang's user avatar
1 vote
0 answers
531 views

how to prioritize windows process to WSL tasks?

I have a Windows OS, with a WSL installed. I am running some computation heavy processes in WSL, written in Fortran, submit using nohup, which usually takes 10 hours to complete a task. I wanted to ...
Raymond Chen's user avatar
0 votes
1 answer
1k views

using nohup even after a complete shutdown or sudo reboot, Possible?

I am using nohup python -u nationalbiblioteket_logs.py --query 0 > log_q0.out & in my Ubuntu 16.04 machine as an administrator to run really time and memory consuming program. I am already ...
doplano's user avatar
  • 103
0 votes
1 answer
1k views

How can I prevent a shell script that calls itself recursively from leaving remainders that accumulate and use more and more RAM?

I execute this command: nohup bash /home/opc/TEST.sh >/dev/null 2>&1 $ and TEST.sh has nohup bash /home/opc/TEST.sh >/dev/null 2>&1 $ at the end of it, so it repeats itself ...
Kostia's user avatar
  • 15
0 votes
1 answer
1k views

Execute Script Via SSH And Disconnect Immediately

The idea is to connect to a remote machine via ssh and execute a shell script without waiting for it to finish. EDIT: The issue was ssh, not nohup.
James's user avatar
  • 1
1 vote
1 answer
581 views

How to not expect return code from nohup command from remote

env : centos7, lang : bash enter image description here If I call wasctl from a remote server, ssh remote1 "./wasctl start" it hangs forever after running everyjob successfully. It turns out ...
Lunartist's user avatar
  • 159
0 votes
1 answer
2k views

I am trying to run the tcpdump on remote machine using ssh using nohup

I am trying to run the tcpdump on remote machine using ssh using nohup. [support@sv4-haswell107-bqkp91500107-node-1 ~]$ nohup sudo tcpdump -i lo port 2049 -s0 -w ./test.pcap >/dev/null& ...
sureshbabu's user avatar
0 votes
0 answers
52 views

nohup not starting mono

What I've done I have a home server where I test scripts before deploying them on a remote server. The script does some checks and at the end it starts a mono process in the background, using nohup to ...
Themelis's user avatar
  • 111
1 vote
1 answer
1k views

Nohup does not work with bash for loop properly

I have been trying to use nohup with bash for loop and I came across this post here which was helpful and gave me an idea but my command is still not working properly. What I have right now looks like:...
ahajib's user avatar
  • 113
0 votes
2 answers
478 views

A simple script for submitting jobs on a server

I'm trying to write a simple script to "submit jobs" on a server without a job queuing system. In bash terminal, I figured I could use commands like nohup to achieve this, e.g.: nohup bash -c 'echo "...
Tim Mak's user avatar
  • 141
2 votes
1 answer
2k views

how to change directory and spin off process

I know how to change directory: cd path I know how to detach a process: command &, nohup command > /tmp/test_output.txt 2>&1 &, nohup command > /dev/null 2>&1 &, ...
MetaStack's user avatar
  • 135
2 votes
2 answers
4k views

Retrieve process information from nohup command

I use nohup command to run shell scripts as the following: nohup ./run.sh & My question is: After logging out the terminal and coming back later, how can I retrieve the information about this ...
Alli's user avatar
  • 23
0 votes
0 answers
984 views

nohup process keep shutting down

I am trying to run 10.000 processes to create asterisks phone accounts. This is to stress-test our Asterisk server. I called with php an exec() function to create a Linux command. nohup /usr/src/...
Wesley Schravendijk's user avatar
1 vote
0 answers
319 views

How to ssh in, start top, and close ssh session with a custom ~/.toprc

If I log into my remote host via ssh and run top, it picks up the ~/.toprc configuration file. I can also run the following command successfully ssh -t <user>@<host> "top -b > top.dat" ...
jesse_partman's user avatar
4 votes
1 answer
1k views

Remote code execution after tmux reboot

I've read about tmux-resurrect, but it's still not clear to me if I can do the following: start tmux session ssh to remote server launch long-running code on remote host kill tmux server (e.g. local ...
MichaelSB's user avatar
  • 143
3 votes
2 answers
26k views

nohup cannot find file or directory when running script to start davmail

I am trying to set up davmail on text based Ubuntu to run in server mode and am following the instructions here, but when I try to run the line nohup davmail.sh davmail.properties & I get the ...
Tom's user avatar
  • 31
1 vote
1 answer
408 views

Create STD IN/OUT Buffer for a Program Running in a Screen Session

Environment Linux version 2.6 Screen version 4.03.01 I am running an application inside of a screen session. The program prints to STDOUT and reads from STDIN. What I would like to do: First, have ...
Tim's user avatar
  • 190
1 vote
0 answers
681 views

Linux, Screen / nohup not working for background process

I'm using a remove site (a mac if that makes a difference) to run some processes. The first time I sshed into it and set up the process using nohup / & before logging off. When I came back to see ...
Zintho's user avatar
  • 11
4 votes
2 answers
7k views

python runs differently with nohup

I have a python package that runs fine when I launch as python -m myproject. However, when I launch as nohup python -m myproject, I get an ImportError. Furthermore, when I launch as nohup python3 -m ...
ericksonla's user avatar
2 votes
0 answers
1k views

Nohup and & keep exiting

I am trying to run a process in the background, but every time I do, the terminal stands-by, then I press enter, and my process is exited. I have tried: nohup ./binary & nohup bash -c "./binary"...
chromechris's user avatar
4 votes
1 answer
4k views

The nohup process isn't listed using `ps`

nohup can help user keeping process running after log-out. But while I log out & in again, the process python is gone. Before log out Log in again We can find the python process ...
Han Zhengzu's user avatar
0 votes
1 answer
179 views

nohup on bash redhat is one processID different

I'm using capistrano to deploy a python service. I was trying to both start the service and also write a pidfile, so I can restart the service or stop the service later. The problem is the pidfile is ...
Allen's user avatar
  • 111
2 votes
0 answers
3k views

Node nohup process is killed on closing putty (but not on exit)

I am running my node server on a cluster by remotely connecting to the server using Putty windows interface. I am running my node process as nohup .. & so that it runs in background and does not ...
gaurav5430's user avatar
2 votes
1 answer
34k views

How to run a task in background in windows

I usually use nohup to run any task in background in linux nohup python sss.py & What is the similar command used to run a background task in windows?
Mounarajan's user avatar
0 votes
1 answer
1k views

command nohup tail with redirection in shell script not invoked properly under a particular situation

I have an issue where a tail command in bash script does not work correctly when called from remote by providing only 1 param out of 2 params. But it works correctly if: executed directly on local ...
Neha Sharma's user avatar
5 votes
1 answer
9k views

Nohup doesn't work when executing script from Jenkins [closed]

I have bash script which executes following nohup ws --port 8080 & when executing that script directly on remote server and closing connection - process still exists. But when i am using Jenkins ...
user454546's user avatar
1 vote
2 answers
2k views

Python logging class not working when sending stdout to /dev/null

I have a Python 3 script that has logging enabled (for debugging purposes). Whenever I run/execute this script it is working fine and the logfiles are created. I've also created a setup.sh-bash ...
Qlii256's user avatar
  • 171
0 votes
2 answers
464 views

Forcing a process to background from bash script

I'm trying to crfeate a bash script that - amongst other things starts sunwait: /root/bin/sunwait sun up -0:00:00 54.453158N 11.013071E; mycommand & Sunwait is a binary that will wait for ...
Niksac's user avatar
  • 133
3 votes
1 answer
2k views

how to get output of a running nohup process if nohup.out gets deleted

I have a nohup process running on my FreeBSD 8.4 box. Initially I was looking at nohup console messages output through tail -f nohup.out But I accidentally deleted nohup.out file. How can I access ...
Dcoder's user avatar
  • 131
1 vote
2 answers
764 views

Disown / background a command passed into bash

TL;DR at the bottom. I am trying to make a simple lock screen for my laptop running Arch / BSPWM. I found a program called cmatrix which has a screensaver flag that causes it to exit when a key is ...
Stephen Smith's user avatar
0 votes
2 answers
142 views

Linux slightly different behaviour If we give '&' before io redirection '>' and after redirection

I was starting jboss recently in background in Linux and saw that if you run command as follows: nohup ./startjboss.sh > server.log & Output is : [1] 18835 [root@cnt5-01b downloads]# The ...
Gaurav Fotedar's user avatar
0 votes
1 answer
117 views

can I `dtach` or `renice` graphical programs like `evince`?

I sometimes open PDF's and then want them "sort of" open "to read later", but I'm not looking at them at the moment. While I'm not looking at them I'd like the OS to spend less effort keeping them up. ...
isomorphismes's user avatar
18 votes
2 answers
9k views

Ctrl+c in a sub process is killing a nohup'ed process earlier in the script

I didn't know whether this belonged on SO (as it is a coding bug) but thought you guys would be more knowledgeable regarding the subtleties of the software used (so maybe even U&L could be ...
Hashbrown's user avatar
  • 3,079
2 votes
1 answer
2k views

After exiting from ssh connection, process is killed/times out

I'm running a python script in the background on an Ubuntu ssh server. nohup python x.py & After a certain amount of time, maybe half an hour, the python script stops running when I come back into ...
John's user avatar
  • 211
1 vote
1 answer
3k views

grep: can't open nohup.out

I am doing recursive grep (grep -r) but it is failing saying grep: can't open nohup.out How to make it going and grep in all directories. I have some idea about nohup but I am not interested in it. ...
Ahmad's user avatar
  • 229
4 votes
1 answer
24k views

How to find out is a program run with nohup or not?

There is no difference in ps -ef | grep sleep output to commands: nohup sleep 60 & sleep 60 & In which way can I discover that program is run with nohup?
TheSAS's user avatar
  • 900
39 votes
4 answers
62k views

Continue SSH background task/jobs when closing SSH

I have the same question as here but even beyond that. If I logout/exit the SSH connection, I need my program running in background. Before exit, I type bg and jobs to check background running task, ...
Huei's user avatar
  • 583
3 votes
4 answers
30k views

How to execute linux command in background?

Currently, I'm using nohup command & to send it in background. But the problem is: if I execute nohup command & I get outout as : root@ubuntu:/home/test# nohup sleep 10 & [2] 52439 root@...
ShitalSavekar's user avatar
2 votes
2 answers
1k views

qsub -hold_jid -afterok loop not starting

I am trying to run a series of jobs submitted to the cluster, one after the other, by suplpying the following .sh script: Annotation_Loop.sh : #!/bin/bash job=`qsub run_IntersectBed_1.sh 0` for i ...
Carmen Sandoval's user avatar
0 votes
0 answers
96 views

ssh firefox endless connection, even when the ssh connection is closed

I want to build a connection to a server with the help of ssh and run firefox(reload website with the addon ReloadEvery). Up to here I got it to work. Now the next step would be to close the PuTTY(...
user avatar
2 votes
0 answers
524 views

Why is there a long delay when using `nohup` on Linode

I have a shell script like: for((i=1;i<500;i++)) do python get_sequence.py done I want to run it on a Linode VPS. It would take a few days to run, so I'm going to use nohup ./run.sh &, so ...
Timothy's user avatar
  • 215
8 votes
3 answers
35k views

nohup output redirection to a different file

I use nohup quite often for important long running processes under linux/bash, so much so that nohup time my command with arguments && mv nohup.out my.log is almost an idiom for me. The ...
sds's user avatar
  • 2,060
4 votes
1 answer
6k views

Why a command launched with nohup isn't able to write file after user logout?

I'm using nohup to launch matlab and run a script which requires to read and write some given files. nohup matlab -nojvm -nodisplay -r 'MyScript'& This runs smoothly while I'm logged in but as ...
Pedro Pedrosa's user avatar
1 vote
0 answers
69 views

Process is shutting down when started by script and special user

I have a situation where I want to use a script during a build process which stops a process and starts it again after updating its files as a last step. The process is started via a build system ...
Asterix der Gallier's user avatar
2 votes
1 answer
953 views

Passing Return Key via Shell Script

I'm using phpseclib to run a shell script on my server at a given interval. That script involves using nohup. For whatever reason, if there isn't a user ready to send SIGINT or a return to nohup once ...
Peter Kazazes's user avatar
5 votes
1 answer
1k views

Nohup & Sass: Process keeps running but, after a while, *.scss files do not get compiled

I am using Sass on a CentOS 5.8 server and want it to keep running after SSH logout, so that other users can edit *.scss files for days or even weeks to come without any need to start the program each ...
maurits's user avatar
  • 151
2 votes
1 answer
2k views

Correct Method of Utilizing nohup in Batch Process

What would be the best method of using nohup in a batch script with multiple calls inside the script. For example, I have a script called filebuilder.sh and it contains something like: /usr/bin/...
Dave Johnshon's user avatar