LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-02-2013, 03:47 AM   #1
sam42
LQ Newbie
 
Registered: Mar 2004
Posts: 20

Rep: Reputation: 3
upstart process tracking


Hi,

On Ubuntu (or Redhat, etc) , which process does an upstart job track?

Let me explain my question more.

Within an upstart config file, there can be "exec" lines and "script" lines. Perhaps there might be multiple instances of these? not sure. At the very least, within a "script" section there could be many lines of code, and each line of code would generate a PID. That PID may or may not be long lasting. In many cases, it would not be.

Put aside the issue of "expect fork" and "expect daemon", as I am not talking about forks or daemons.

Here is an attempt at answering my own question. Your feedback is welcome:

There is only one exec or script stanza permitted. The last PID is the one that's tracked.

Does that sounds right?

Thanks.
 
Old 04-02-2013, 05:52 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Within an upstart config file, there can be "exec" lines and "script" lines. Perhaps there might be multiple instances of these?
Only one instance.

Quote:
within a "script" section [...] each line of code would generate a PID.
This script is executed by shell (with -e option) and this shell PID is tracked. So "PID tracking" will end when any command within script fail.
 
Old 04-02-2013, 06:33 AM   #3
sam42
LQ Newbie
 
Registered: Mar 2004
Posts: 20

Original Poster
Rep: Reputation: 3
It appears that using "exec" within the script block makes for a cleaner process list with "ps -ef"

script
exec myprocess
end script

It appears that multiple statements won't be run:

script
exec myprocess1
exec myprocess2
end script

myprocess2 isn't launched.
 
Old 04-02-2013, 06:48 AM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
"exec" within "script" block is not the same as "exec" from upstart job configuration file. That "exec" is a normal shell command as everything within "script / end script".
 
  


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
upstart process tracking sam42 Ubuntu 3 04-02-2013 07:33 AM
IPtables and process tracking bweddell Linux - Security 1 09-18-2012 12:32 PM
CentOS-6.2 & Upstart: Alternative to starting process with runlevel @ boot-up jb60606 Linux - Server 4 07-12-2012 03:12 PM
Upstart process information for rhel6 Rohit_4739 Red Hat 5 05-02-2012 12:46 PM
Tracking Background PRocess ajeetraina Linux - Newbie 1 02-01-2008 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:34 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