LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2008, 11:51 AM   #1
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 89

Rep: Reputation: 16
launch a long running process at startup


I want to launch tcpdump at startup on my router. If I run it from a script, the script will never stop (is this an issue?), and I won't be able to see tcpdump end messages in a terminal, if I want to. With screen, I don't know how to run a command in it automatically.

Any advice?

Thank you for your great site.
 
Old 09-08-2008, 01:48 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
run it in a startup script with the "&" at the end.
This puts it in the background, and allows the script to continue without waiting for the program to return.
tcpdump &
 
Old 09-10-2008, 03:03 AM   #3
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 89

Original Poster
Rep: Reputation: 16
Thank you for your answer. It works.

I also used "screen -d -m command" to start tcpdump in a screen, but it is more complicated than running it in the background, and still I can not see the tcpdump statistics, because the screen terminates immediately after tcpdump, as it is normal to do.
 
  


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
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 04:47 AM
Can kernel kill long-running process? registering Linux - Kernel 5 07-20-2007 09:45 AM
Grub takes a LONG time to launch. FrankRizzo Linux - Software 9 01-26-2007 12:21 AM
How does one launch programs 'out of process' in a terminal window? DKnight Linux - General 5 06-07-2003 11:11 PM
running a process at startup jmu Linux - Newbie 5 02-11-2003 06:52 PM


All times are GMT -5. The time now is 03:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration