LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-07-2016, 10:04 AM   #1
Lenin1
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Process killed during close ssh session, how prevent such thing


I use Debian 8 on ARM V7 system. I run some program that should run for long period of time. I start them from SSH connection ( no other way to do ) . After I close SSH session process I started is killed .
How can I prevent such thing ?
I heard about nohup .How is the best way use it ? Maybe there is other applications that preffered for such things


Thanks
 
Old 10-07-2016, 02:05 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Here's an example of using nohup:

Code:
nohup /home/isaackuo/mybackgroundscript.sh &
Note that this will open up an output file "nohup.out" that contains the output from the program which you have started. Depending on what the program outputs, this might get uncomfortably large at some point.

If this program is interactive, though, you might want to use something like "screen" instead.
 
1 members found this post helpful.
Old 10-07-2016, 03:59 PM   #3
Lenin1
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Wink The nohup output problem

I run Wildfly and it output file names / max size / number of files before rolling didn't work while I use nohup even if I declare same path for output. You mention something about screen do you know more details about it?
 
Old 11-23-2016, 01:56 PM   #4
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Code:
anthony@miranda:~$ apt-cache show screen
Package: screen
Version: 4.4.0-6
Installed-Size: 981
Maintainer: Axel Beckert <abe@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.15), libpam0g (>= 0.99.7.1), libtinfo5 (>= 6)
Suggests: byobu | screenie | iselect (>= 1.4.0-1), ncurses-term
Description-en: terminal multiplexer with VT100/ANSI terminal emulation
 GNU Screen is a terminal multiplexer that runs several separate "screens" on
 a single physical character-based terminal. Each virtual terminal emulates a
 DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions
 can be detached and resumed later on a different terminal.
 .
 Screen also supports a whole slew of other features, including configurable
 input and output translation, serial port support, configurable logging,
 and multi-user support.
Description-md5: 2d86b86ed6058a04c540802e49312f40
Homepage: https://savannah.gnu.org/projects/screen
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
 role::program, scope::utility, suite::gnu, uitoolkit::ncurses,
 works-with::software:running
Section: misc
Priority: optional
Filename: pool/main/s/screen/screen_4.4.0-6_amd64.deb
Size: 597136
As stated above, one of the greatest benefits of screen is that you can detach, close your ssh session, and then reattach to that screen session later on, picking up exactly where you left off - even from a different remote workstation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-executed script does not terminate when ssh session killed matthewg42 Linux - General 6 03-24-2011 12:15 PM
ssh process wont get killed vikrambhimbar Linux - General 3 05-29-2009 03:52 AM
How to run a program in an ssh session that will run after you close out the session? dr_zayus69 Linux - Networking 5 03-05-2006 07:15 PM
ssh-agent process not killed Notwerk Fedora 0 06-20-2005 07:07 AM
how to prevent process from being killed? iclinux Linux - Newbie 7 01-14-2005 10:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration