Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to keep program running after logout Post 302726127 by lepetal on Saturday 3rd of November 2012 04:20:20 PM
Old 11-03-2012
How to keep program running after logout

Hello everyone.
I am logged into a computer through ssh. I would like to run a program and have it keep running after I log out without screen (i forgot to run it).

For example:
Code:
ssh server
user/comp~$ top &
[1] 12021
exit

after that:
Code:
ssh server
user/comp~$ (something, maybe shell script) 12021

How can I do that except disown solution?
 

10 More Discussions You Might Find Interesting

1. Programming

Running a compiled Program

Just getting into the Unix command line programming and am unable to run any program I write. I am using a Makefile and the source is compiling but when I enter the name of the output file I get back: bash: lab01exe.out: command not found I'm sure I am just dooing something simple... (2 Replies)
Discussion started by: Krebsbac
2 Replies

2. Shell Programming and Scripting

Running a program automatically

How can I make a program run automatically at a certain time of day? My problem is I need to make a small backup program that will back up a few files every day? (3 Replies)
Discussion started by: jvadn0
3 Replies

3. UNIX for Dummies Questions & Answers

Running a program

Hi.Iam new to Linux.i got linux 7.0 pro and dont know how to run programs. I want a perl interputer and i know i installed one but how do i run it ??? Also how do i run a C or C++ editor ?and how do i run cron ? (3 Replies)
Discussion started by: perleo
3 Replies

4. Programming

running a program for a specified time

how can i run a program for a specified time? i need to print a current time during program execution. (3 Replies)
Discussion started by: prosputko
3 Replies

5. Shell Programming and Scripting

Keep process running (wget) and logout

well, i have only been learning about linux, unix and shells for a few days. For my online game to work, i need run a file each 10 seconds. Running that file will update mysql data, causing my online game to "tick". This adds resources and fights battles in game. I know that i need to use a... (3 Replies)
Discussion started by: mikey1090
3 Replies

6. Programming

Running app after logout and monitoring

Hello! I just programmed a very simple app, it's function is to report every minute the state of the memory and cpu and put it to and xml. All this stuff is working ok since I'm logged in into the machine, but i want it to run as a service, how can I do that?? P.S: Any one knows how can I... (1 Reply)
Discussion started by: ncatdesigner
1 Replies

7. UNIX for Dummies Questions & Answers

Running a program (Dynflow)

Lets get some stuff out of the way before the question. I am currently running FreeBSD 7.0 on a VirtualBox virtual machine. I do not know much about Unix or FreeBSD, though I do run linux at home. My boss gave me some files that he says are a unix version of the program Dynflow. The Programs... (0 Replies)
Discussion started by: poet_will
0 Replies

8. UNIX for Dummies Questions & Answers

Keep process running on logout

Hey All, I'm logging in via an SSH shell. I'm wondering if there's a way to execute a command and it not die when I close my terminal window (or rather, logout of the SSH shell). Thanks, Nathan (3 Replies)
Discussion started by: NathanWarden
3 Replies

9. Shell Programming and Scripting

Help with Running More than One Program

Folks, I'm really new to scripting and was wondering if you could help me out. I have the following script that I inherited: #!/bin/bash # # Usage # From the agent directory: # ./run-any-agent AgentName # TAC_AGENT_HOME=`pwd` LIB=${TAC_AGENT_HOME}/lib CLASSPATH=.... (17 Replies)
Discussion started by: DTriniWay
17 Replies

10. Shell Programming and Scripting

Running a program using csh

I have a program which I can run on the command line like below and works fine /nethome/chrisd/HSeis/TommyCD/TommyCD-1101/bin/raytrac vmod=npt10-z30.vmod srfile=jcdint.sc rcfile=jcdint.rc phases="SP FS" level=twop format="X T" dtau=0.1 mdacc=0.5 mindist=0.1 maxitertp=25 ray=npt10-z30.ry... (0 Replies)
Discussion started by: kristinu
0 Replies
AUTOLOG(8)                                                    System Manager's Manual                                                   AUTOLOG(8)

NAME
autolog - Log out idle users SYNOPSIS
autolog [ options ] DESCRIPTION
The program reads the utmp file, entry by entry. The username for each 'user process' is compared to the entries in the configuration file (see autolog.conf(5) ). The first entry to match both the name, the group, and the tty line of the process will be used to conduct the automatic logout. CALL
/etc/init.d/autolog start or autolog to run this program in daemon-mode autolog -o to run this program as "ordinary" program. Keep in mind: Also when running as ordinary program, it will stay in memory until all its jobs are done. OPTIONS
-a (all processes) Print information on ALL utmp entries--not just user processes. -d (debug mode) This is helpful in setting up your configuration file. The program runs in foreground rather than forking and it prints out verbose messages about what it is doing. -n (nokill) Use this to prevent autolog from actually "killing" anyone. Use -d and -n together when setting up a new configuration file. ( This will not affect killing of lost processes. ) -o (ordinary) Use this to run this program as ordinary program, not as daemon. Program will end, when its job is done. In this case, some data is kept in "/var/lib/autolog/autolog.data". This is read, when the program is called again. -f config_file_name Use this to override the default: "/etc/autolog.conf" -l log_file_name Use this to override the default: "/var/log/autolog.log". Note that if this file doesn't exist, no logging will happen. Create the file (with touch) to enable logging. -t idle_time Use this to override the internal default idle time (minutes) -g grace_period Use this to override the internal default grace period (seconds) -m yes/no Use this to override the internal mailing switch. If "yes" the program will send mail to the users right after killing them. -c yes/no Use this to override the internal "pre-clear" switch. If "yes" the program will clear the terminal screen before warning the user. -w yes/no Do timeouts based on total session time--not idle time. (hard) -l yes/no If set to "yes" activities will be written to the logfile if present. AUTHOR
Kyle Bateman <kyle@actarg.com> (autolog 0.35), Carsten Juerges <juerges@cip-bau.uni-hannover.de> (autolog 0.40) This manual page was modified for Debian by Paul Telford <pxt@debian.org> Linux Administrative Utilities AUTOLOG(8)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy