Questions tagged [nohup]

The tag has no usage guidance.

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

resume tar command when nohup/screen is not possible

I have a dataset which is quite big - a few petabytes. Untarring it into a new filesystem takes a couple days. The problem is that the server does not allow me to have a process running over 24h - it ...
0
votes
0answers
103 views

How to use nohup properly within an ssh session invoked by gitlab-runner?

I use gitlab runner's ssh executor to access an embedded device via ssh. I want to run a script there. Basically the script invokes an upgrade routine on the device using dbus. Simple enough, isn't ...
1
vote
1answer
652 views

nohup multiple sequential commands not logging output

I have a python script (which takes a lot of time to complete the execution) that I need to run several times varying the parameters. And it's executed in a remote machine. For instance and test ...
0
votes
1answer
179 views

Saving PID in nohup output

I want to save the PID of a nohup process as part of the name of nohup's generated output file. This is going in the right direction, but only works if the process with it's ID is already settled, i....
0
votes
2answers
2k views

Create nohup.out file based on date

I am using nohup command to run a java web server application. This is the command i am using: nohup java -jar WEB-SNAPSHOT.jar & This command will create a nohup.out and my server logs are ...
0
votes
3answers
643 views

nohup daemon process dies when terminal is close

I'm trying to copy the contents of a remote server to my local computer. Here is the command that I'm using: nohup rsync -chavP -e 'ssh -p 23' --stats user@ipaddress:~/great/stuff /volume1/code > ~...
1
vote
1answer
737 views

Using nohup on remote SSH script, inside the script itself

I'm trying to use nohup + redirection + background operator ("&") to run a remote script via SSH and disconnect. This works: ssh -n fred@fredbox.local 'nohup sudo /opt/scripts/do-thing.sh arg1 ...
0
votes
1answer
2k views

How do I run a program as another user properly with “nohup” and “&” in bash

I have been learning bash and linux administration over the past few months while producing more and more code that needs to run in the background. I would ideally like to run my development system ...
0
votes
1answer
186 views

Understanding how to foreground a background process correctly [duplicate]

I am wanting to background a long running script, which I know I can do using the following: nohup ./install.sh &>/dev/null & However, I also realize that if I leave that session, I can ...
0
votes
1answer
1k views

How do I install nohup on a QNAP TVS-871T

I'm trying to setup a background job in a QNAP TVS-871T. It doesn't come with nohup pre-installed. I've found multiple references to install it on a QNAP device (e.g. https://stackoverflow.com/...
0
votes
0answers
94 views

Nohup at boot in Debian

I have a Debian server with kernel version 2.6.26-2-686. At boot time it reaches a line `nohup: ignoring input and appending output to 'nohup.out' and then it stops. I can't get to the command ...
1
vote
3answers
5k views

How to use nohup to continue to run a command after the user logout?

nohup <command> <arg> & When I SSH into a Linux server, if I want to run a command and make sure that it will continue to run in the background after I logout from SSH, I will use the ...
0
votes
1answer
2k views

Nohup stops script after logging out

I have to run a python script in the background in my server. I am using the command: nohup python MyScript.py & in the command line. Now, when after running this I close the connection and log ...
0
votes
4answers
2k views

Script started with nohup get killed when leave terminal

I need to run some python scripts with infinite loop on ubuntu server (Amazon EC2). And I really like the idea to use nohup as it is simple and I can have output.out log file. I start script like ...
1
vote
0answers
1k views

Simple progress for rsync when piping output to a log file

I ran rsync with nohup and --progress: nohup rsync --progress --[other-options] source destination & tail -f nohup.out When I'm tailing the file, I see the output with a changing last line (...
-2
votes
1answer
3k views

How to find out reason of python script stop working in background?

I've bought a VDS server some days ago just to have some Telegram Bots working 24/7. I can't keep shell always open, so I've decided to use this "hack": 1. In Python script add #!/usr/bin/python3.4 ...
0
votes
1answer
488 views

Why c app is not writing to nohup.out

I wrote a simple master-slave failover setup for my two servers using c, running redhat6 which using udp heartbeats to monitor one another. In my app I'm printing out some information like, heartbeat ...
1
vote
0answers
1k views

How to kill all process on ssh logout? (Kill running Background proccess started with screen etc)

Hi i have a multiuser centos server running. There are for example 3 users (non root) - each of them have their own homedir. SSH Login is allowed (bash). How could it be reached, if a user started ...
1
vote
1answer
2k views

how to run nohup when prompted for password and/or input parameter

I typically use nohup like so: nohup ./myscript.sh 11111 > nohup.out & Where 11111 is an input parameter. In this case, the application is prompting for a password and I'm unable to use nohup....
7
votes
1answer
3k views

rsync termiates after a while unexpectedly

I run a rsync command with nohup in ssh session, but after a while it returns this error: rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [generator=3.0.9] rsync error: ...
0
votes
1answer
2k views

How to run putty with -m command line *and* get log?

I'd like to launch putty and run my script automatically, it works, but I can't save the logs (I need them to debug)! The way I call putty: "D:\Some-Path\putty\PUTTY.EXE" -t -load "Server - 111.22....
0
votes
1answer
1k views

Rotating a nohup.out logfile

There are a few questions on how to rotate the output file generated by nohup. Most of the answers say to use logrotate with the copytruncate option. However this does not actually work -- when the ...
10
votes
6answers
20k views

how to rotate nohup.out file without killing my application

My nohup.out file is growing fast. I am running an application in the background, it's writing nohup.out file, now I need to rotate nohup.out file without killing my application. Can this be done?
0
votes
1answer
558 views

nohup.out is no longer being appended

I have a Ubuntu Linux ec2 instance that's running on AWS. I used the following command nohup php script.php so that when I disconnect from the instance with SSH, it still runs. The script contains ...
1
vote
1answer
756 views

Why does my command stop when I exit SSH? [closed]

I am running the following command in a loop (without notable memory leaks) as a cPanel user: nohup php ~/www/app/console.php run clean 1> /dev/null 2> ~/www/logs/run_clean.log & But when ...
0
votes
2answers
3k views

How to kill the process using the name of the program instead of PID?

I started my Python program in the background using nohup as mentioned below - nohup zook.py & Now I am trying to kill this process so I did the ps command as mentioned below root@phxdbx1145:/...
6
votes
1answer
3k views

nohup vs screen vs ? for manually starting daemon processes

When I need to start a background process on a low-importance server, I tend to use nohup: nohup ./server.sh & Most colleagues seem to prefer screen: screen -D -R mydaemon ./mydaemon.sh ^A ^D ...
1
vote
1answer
908 views

nohup create multiple process

I am using nohup for the script run inotify command, because inotify stop when I exit from terminal so I want the script to run on background. so I run the script like this nohup /path/to/script.sh &...
1
vote
2answers
7k views

How to run rsync without staying logged in?

I want to run the following rsync command to transfer a folder from a remote server to my current one sudo -r -a -v -e 'ssh -p portnum' username@serverip:/home/path/* /home/path this directory is ...
2
votes
3answers
7k views

how to convert a running process into a nohup and keep a logfile

I have a process currently occupying a terminal ]$ command some_argument I want to exit from the terminal and go home, but in the mean time I don't want to kill this running process. For the ...
3
votes
2answers
2k views

Remote synchronous-then-asynchronous execution with SSH

TL;DR I want to remotely execute a script that begins synchronously (so that the local ssh command fails if the preparatory commands fail) and then goes asynchronous, thus terminating the local ssh ...
3
votes
1answer
2k views

Move a running process in background and keep it running even if you disconnect

You already have a running process and you want to put it to run in background. If you want to be sure that this will still run after you close you ssh connection, what should you do? Note: you are ...
1
vote
1answer
4k views

How do I prevent a nohup process from being killed when ssh connection fails

I'm having an odd problem. I have a server process that gets started with nohup, and persists across logout and re-login just fine. However if I leave myself logged in and then get the "broken pipe" ...
4
votes
1answer
13k views

nohup - no such file or directory

I'm trying to execute the following command on my CentOS 6.3 x64 server: nohup "/usr/local/bin/php -v" The result is: nohup: ignoring input and appending output to `nohup.out' nohup: failed to run ...
2
votes
2answers
3k views

trap “” HUP v.s Nohup ? How can I run a portion of shell script in nohub mode?

I want to run a shell script over the weekend, but I wanna make sure if the terminal loses the connection, my script won't be terminated. I use nohup for the whole script invokation, but I also want ...
7
votes
4answers
15k views

nohup multiple sequential commands

I need to nohup two commands, one after another. The second command has to be executed AFTER the first command. Here are the commands: tar -zcf archive.tar.gz.tmp mydir mv archive.tar.gz.tmp archive....
14
votes
2answers
19k views

Redirect nohup to stdout

Is it possible to let a process started with nohup, write to stdout instead of in a file? or maybe in the file and on the screen? nohup python start.py & writes to nohup.out, but I'd like it to ...
10
votes
3answers
15k views

What does the ampersand (&) symbol mean with `nohup`?

Ive seen tons of examples where a & follows the end of a command string, but I can't seem to find an explanation on what it does. It's not even in nohup's man page. Is this a shell thing? ...
3
votes
1answer
2k views

reattaching a process started with nohup?

Is it possible to reattach a process started with nohup? For example, start in a terminal: nohup tail -f /dev/null & Close the terminal. Now open a new terminal. How do you reattach the nohup'd ...
0
votes
4answers
2k views

nohup command on Mac

I connect to some mac machine using SSH and run a command similar to: nohup /var/root/install.sh param1 param2 </dev/null >/var/root/vvv.out 2>&1 & echo '' ; echo ERROR_CODE:$? It ...
4
votes
2answers
4k views

Estimating MySQL Query Runtime

I ran a MySQL query from command line using the following: nohup mysql --user=root --password=XXXXXXXXX database < report.sql > results.tab This query is extensive (5000 lines) and running a ...
0
votes
2answers
1k views

How to run at boot a program that will run until shutdown

I am using Debian (6) and need to run at boot an X server (without a login manager). What is the best way to do this? From what I've read, the usual way is to have a script in /etc/init.d. I created ...
1
vote
1answer
1k views

Mysterious per-session CPU limiting?

TL;DR: CPU-hungry processes are sharing cores on a multi-core server while other cores sit idle, whereas I expect the Linux scheduler to distribute jobs evenly across cores. What could cause this ...
0
votes
1answer
456 views

Shutdown server in background using PHP

I'm trying to shutdown an Ubuntu machine from PHP and am running into an issue if I want to delay the shutdown. The PHP line I'm using is: exec("sudo shutdown -h +5 &", $output); Where 5 is ...
1
vote
2answers
6k views

terminate a processed launched by nohup

I have loaded debian etch into my NAS and I am trying to use it to routinely extract information from a website. Since there are quite a lot of pages to download, I used the nohup command, like this: ...
2
votes
3answers
489 views

How can I return to nohup after logout?

I'm working on an AIX and cannot install screen but want to use its capabilities. Basically I want to be able to run a session (maybe logout), then the same user but logged in again to be able to get ...
7
votes
2answers
7k views

rotate nohup out file (nohup.log)

is there a 'native' way where i can rotate nohup out file ?
5
votes
4answers
10k views

How do I find out the process id of the backgrounded process?

I've got a command (program) that I'd like to run with nohup and background it. Like nohup command > logfile.txt & How do I find out the process ID? I would like to be able to write the ...
2
votes
4answers
2k views

Using nohup on Solaris 10

I need to transfer a large number of files over SFTP (only between Solaris servers) which takes a very long time. I cannot keep my PC on for this duration. I tried: nohup sftp server1 While the ...
0
votes
3answers
5k views

Run netcat in background on Ubuntu Lucid 10.04

I am trying to do a pg_dump from one server and simultaneously restore at the other server. The command on source server (192.168.3.94): pg_dumpall -v | nc 192.168.3.95 4000 The command on the ...