Questions tagged [nohup]

The nohup standard utility and the nohup builtin from shells like csh, which cause the SIGHUP signal to be ignored

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Benefits/drawbacks of using Screen instead of daemon to run Python scripts in background of a Linux server?

I have an Ubuntu LTS 20.04 server and I have to run 70 Python scripts in the background, with the option to turn all OFF and turn all ON whenever I want (usually I turn all OFF once a week). Currently ...
-1
votes
1answer
25 views

What is the difference between nohup and crontab? [duplicate]

Say I want to delete the contents of a directory every hour, what is the difference between having let's say a python script do this for me: nohup python dir_cleaner.py & vs setting a cronjob to ...
0
votes
1answer
23 views

How to send “enter/any key” signal when using nohup?

For example, I've executed a script using nohup and & to put the script execution in background, and in some step the script ask me to do something else to be able to continue the current ...
0
votes
0answers
16 views

Doing nohup samtools sort and [ 1]+ Exit 1 is showing up

I'm currently trying to run a samtools sort on some bam files nohup samtools sort sample.bam s0rted.bam & and I keep on getting [ 1]+ Exit 1 nohup samtools sort sample.bam s0rted.bam when I press ...
0
votes
1answer
44 views

nohup ends when I close the SSH terminal and doesn't show up on ps/job when running

I have an AWS EC2 Ubuntu 20.04 instance, accessed via puTTY SSH. Running a Python process via OpenMPI through the following command on non root: nohup mpirun python3 job.py When the shell is open it ...
2
votes
0answers
17 views

Using nohup and & on remote Mac OS X causes process to become idle?

I am running some code on a remote server (an iMac), and I want the process to keep running after I log out. So, I am using nohup and &. However, the process becomes idle when I leave (log off) ...
0
votes
1answer
26 views

starting Python IDLE with setsid or nohup requires a sleep

A bit of context: I am creating a small Python programming lab for novice users. I want them to use Python's IDLE editor (which you launch as python -m idlelib) but since they may not be comfortable ...
4
votes
1answer
133 views

How to limit the number of background process in Unix

I have to run a script in 100 parts while making sure that only 10 parts run at parallel at any point of time. Below script will trigger all the 100 processes at the same time :- for i in {1..100} do ...
0
votes
1answer
35 views

sudo error when using nohup to run programs in the background

I have a simple exec running in my terminal to run program.py in the background using nohup. Here is the script: cd "$(dirname "$0")" sudo -v nohup sudo python3 program.py & ...
0
votes
1answer
73 views

Bash Creates Child Process Using && and not with ; for a nohup programm

I have a macbook (default shell is zsh) I have an executable python script (srcript1.py). I use another executable script (called starter) that runs script1.py when my computer starts, the terminal ...
1
vote
1answer
33 views

How to use the nohup command properly in a custom script

I have a script that allows me to perform a number of automated tasks. At the end of the script, I run the following command: nohup ./MyServer & This command launches in the background my server ...
1
vote
0answers
25 views

When i use nohup command..Are nohup exit codes same as script return codes

I am using below command in one script abc. Sh Nohup script1.sh $tablename & This script1.Sh passes some returncodes based on success/fail Ex:0-success 99fail When I use exitstatus=$? .. Will this ...
1
vote
1answer
29 views

nohup won't show next prompt in SSH session

Assume that I am connected via SSH on a remote Ubuntu system. I want to execute a script there using nohup in case of potential connection drops and redirecting its log to a file. The command I run is ...
0
votes
0answers
42 views

Why is `nohup` necessary

I have to start a rather long duration script (it can run for half an hour or more) through SSH, and collect its StdOut/StdErr and return code. I want to avoid waiting for the process end in the same ...
0
votes
0answers
128 views

How to kill a Python process within an SSH session

This question involves running a bash script, say helloworld.sh, which executes an MPI mpirun command which in turn runs a Python program, say helloworld.py, using mpi4py. The bash command is used in ...
0
votes
1answer
29 views

Redirecting breaks output (Python Script)

I am running the same python script multiple times redirecting the output in different ways and getting broken output. Sometimes lines are missing and sometimes the order is reversed. The python ...
-1
votes
1answer
28 views

Add to script comfirmation for nohup … & with enter

This is the script.sh: nohup myInnerScript.sh > LOG.log & which I run like this sh script.sh after execution it waits to confirm with enter. How to add the confirmation? Something like this: ...
1
vote
0answers
85 views

Running script on .xprofile fails to execute

I'm trying to run a login script executing a desktop audio visualizer (glava) on .xprofile but I am running to a few problems: First of all the script (on ~/.local/bin/glav): #! /bin/sh nohup glava --...
0
votes
1answer
185 views

Why does my process terminate upon log out despite nohup and disown?

I have an executable (a server made with Unity) which I want to continue to run after I log out. All the interwebs say that I should be able to accomplish this with nohup or disown or both. But it ...
0
votes
1answer
71 views

nohup process not persisting between ssh sessions

I have an ubuntu server on AWS EC2. I can access it, with Putty and ssh, from a Windows 7 laptop. I would like to start a process up during one of these ssh sessions and have it continue after I have ...
0
votes
1answer
20 views

memory increase after completion of scripts

(I am new user of linux). I am running several matlab scripts in parallel using nohup in this form: (cd Documents/dir_001; nohup matlab -nodisplay -nosplash -nodesktop -r "run('/home/user/...
0
votes
1answer
1k views

Use crontab to invoke nohup in script

I'm trying to use crontab to check and re-run a long running script. I've created a script that checks the status and runs the long-running script if needed. I'm running the long running script with ...
0
votes
1answer
56 views

When I use nohup and & to run in the background, will there be any effect on my output data?

With the command: nohup python get_seq.py TPH_hits all_genomes_eukaryotes_20200303.fas > TPH_seq2.fasta & nohup: ignoring input and redirecting stderr to stdout Will there be any effect on ...
0
votes
1answer
65 views

niceness of a background process

Do background process have different nice given? I noticed it is not having the default 0. This might be a problem because it is having less priority.. does anyone know how to change this behavior? I ...
2
votes
1answer
318 views

Without nohup on csh, background job still running after ssh exits

I'm trying to understand the need for using nohup with background commands in ssh. My shell is csh on CentOS. The background command below continues running even after ssh exits. I was expecting this ...
0
votes
1answer
189 views

How to nohup multiple SAS programs at once?

I have several SAS programs test1_2.sas test3_4.sas test7_8.sas and I hope to nohup those scripts at once. I tried to create a shell wrapper such as a test.sh: #test running multiple files ...
1
vote
0answers
24 views

How to keep a program with several executable keep running after ssh session closed?

I am working from home on VPN and my exceed or Mobaxterm window seems to close itself often. I am losing all the progress of my runs. The program calls for different executables while running also ...
0
votes
2answers
53 views

Using nohup with builtin unix commands with params and file redirection

I would like to run this command: tail -f mylog.log > snippet.log I want to run it in the background and not worry about shell timing out or other problems. This throws warnings and errors: ...
0
votes
0answers
84 views

Why does (nohup'ed) script need to sleep in order for `ps -ef` to work?

In a script that contains the following lines and is called by ansible (via ssh and then sudo), about 4 out of 5 times, I end up in the if branch, although the process I'm trying to ps and grep is ...
3
votes
2answers
302 views

when to use NOHUP

I would like to know the purpose of nohup these days. I ask because I read this Nohup is short for “No Hangups.” It’s not a command that you run by itself. Nohup is a supplemental command that tells ...
1
vote
0answers
103 views

For which versions of linux does nohup serve a purpose?

I am having a disagreement with a friend about the need for nohup. He says that you need it to keep a job running in the background when you log out. However it seems this is not true on centos 7 for ...
2
votes
2answers
247 views

Why doesn't nohup work on a specific process

For what reason(s) would nohup not work on a specific in-house developed process? I'm using it as follows: /usr/bin/nohup process_a & I can close the terminal where it was executed and see ...
0
votes
0answers
288 views

How to run script with nohup through sshpass

I want to pass a local script generated on the fly and it will trigger another script on my remote machine to running some commands for a long period of time. this is the command I have tried: cat &...
0
votes
0answers
67 views

Nohup is not working as expected

On a fresh install of OpenMediaVault (debian based), I try to start and keep rsync in background when leaving my ssh session. I've always do that with success in previous versions.. But now with this ...
0
votes
1answer
451 views

Nohup with shell variables before command

It seems that nohup is unable to run commands that have environment variables before them. For example, nohup LD_PRELOAD=~/file.so ./run & says nohup: failed to run command 'LD_PRELOAD=/home/...
0
votes
0answers
34 views

is there a setting that can be set so that jobs will continue after logoff, so that nohup isn't necessary?

is it possible to alter some setting in CentOS so that nohup isn't necessary? i.e. so that my scripts won't be killed when I log off? I think that the automatic output of text to nohup.out is ...
0
votes
2answers
167 views

Get output redirection part of a running process

Sometimes I run jobs, I lose track of which output files I have redirected the output to. How can I get the full command I ran a job with, including the output redirection part? For example, when I ...
0
votes
1answer
38 views

If zip runs out of space, will it save a partial zip?

I have been running this command to zip each subdirectory into a zip file: nohup sh -c 'for i in */; do zip -r "${i%/}.zip" "$i"; done' & With that said, I ran out of space, and I am trying to ...
0
votes
2answers
285 views

How to compress multiple folders in the background, each into its own zip archive?

I found that a great way to zip folders into their own zip files is through this loop: for i in */; do zip -r "${i%/}.zip" "$i"; done But I wanted to do this all in the background (e.g., nohup &)...
0
votes
3answers
54 views

Start command remotely and then close connection

I'm trying to start a trim command on a bunch of servers remotely since these are appliances and we lose support if you change anything like cron jobs locally. I'm trying to do this: ssh root@192....
0
votes
1answer
617 views

rsync (but also other commands) run with nohup gets sigterm

I'm connecting from my computer to a HP UX B.11.31 system and am running some very lengthy there commands using nohup so I can go to sleep and do something else for a few days while they complete. ...
0
votes
1answer
112 views

Is nohup supposed to kill my script process?

I got a script that I'm trying to run with nohup: nohup /home/user/script.sh& If I run ps -a I can still see the process but if I close the terminal and run ps -a again the process is not there. ...
1
vote
1answer
304 views

nohup exiting with error 125

nohup exits with Error 125 when trying to start a Python script in the background, yet when using wildcards, pointing to the very same file, nohup works. root@rpi_2:/home/pi/shortcuts# nohup -c ...
1
vote
2answers
891 views

Restart application after crash

I have some application (net core 2.1 app) which I run like this: nohup dotnet publish/TestApp.dll This application crashes sometimes, and I need to restart it when that happens. What do I need to ...
3
votes
2answers
340 views

Run script with user input and then disconnect job and run in background

So I have a bash script that first asks for a series of three variables from the user. I then want the script to run in the background disconnected from my session, so that when I cut the connection ...
0
votes
1answer
536 views

email notification upon completion or error of nohup background process

How would I send an email if a background process I run via nohup fails or is completed? I am running a lot of background processes via nohup in a for loop: for afolder in $dir/dothis* do nohup ...
3
votes
2answers
49 views

Is there a way to get the union of `ps a` and `ps x`?

I would like the union of the processes returned by ps a and the processes returned by ps x. When using Docker and nohup, it feels like one or the other of them works, but neither always shows the ...
1
vote
1answer
52 views

ssh: subscribe to nohup.out

Suppose I launch a long running task on a remote machine with nohup: nohup command & Is there a way for me to stream the contents of nohup.out to a terminal with ssh such that it is getting ...
0
votes
1answer
179 views

Run scripts at logout

Sometimes I ssh into a box, and run some script that makes a change to the system. I want to undo this change when my session ends, either explicitly (e.g., via exit from the logout shell) or ...
0
votes
1answer
135 views

umask doesn't work with nohup

It seems that umask and nohup don't work correctly together. I did this: $ umask 022 $ nohup java -jar blah.jar & [1] 12345 nohup: ignoring input and appending output to `nohup.out' $ ls -l ...

1
2 3 4 5