/srv/irclogs.ubuntu.com/2014/06/12/#upstart.txt

fluterhi01:38
fluteris there a tool to log and track all the events emited and handled by upstart and jobs?01:38
xnoxfluter: please stay on irc10:31
xnoxfluter: i've answered before, but you left.10:31
xnoxfluter: there is upstart-monitor10:31
xnoxand one can also use dbus-monitor10:31
xnoxfluter: another option is to set $ initctl log-priority debug10:32
fluterxnox, sorry about that,11:02
fluterxnox, I'd like to see all event since system starts, 11:03
fluterinitctl will be late I think11:03
fluterI will use upstart-monitor, thanks a lot11:03
xnoxfluter: you can specify "--debug" on kernel command line, then it will be honer from the start of upstart11:04
fluterxnox, ah, that's great,11:04
fluterlet me try it11:04
jgornickhey guys, if I start my application via start-stop-daemon, how can I run some script to stop the daemon when service my-service stop is called?16:41
xnoxjgornick: did you look into "pre-stop" stanzas?16:42
xnoxjgornick: in the cookboot16:42
xnoxjgornick: in the cookbook16:42
jgornickxnox: Yes, but does that mean I should start-stop-daemon --start in the pre-start stanza and start-stop-daemon --stop in pre-stop stanza?16:44
xnoxjgornick: no, why?16:44
xnoxjgornick: pre-stop runs before killing the main pid.16:44
xnoxjgornick: if you want to do clean up after your daemon is killed, use "post-stop"16:44
xnox(post-stop exec; or post-stop script/end script)16:45
jgornickxnox: I think you just shed some light on how Upstart works.16:45
xnoxjgornick: it's all in the cookbook.16:45
xnoxjgornick: read about the job life-cycle and what happens after what.16:45
jgornickxnox: Will do. Thank you!16:45
jgornickxnox: Is it good practice to use start-stop-dameon with Upstart?16:52
detroutI'm running upstart on debian testing/unstable and with kde and networkmanager. my laptop doesn't try to redetect network after changing locations while its sleeping.16:58
detroutany suggestions on where to look to diagnose that?16:58
xnoxjgornick: usually no. but it's the last resort, if the daemon miss-behaves. (E.g. forks more than twice to reach the "main" process)17:01
xnoxdetrout: as far as I understand that's unrelated to upstart, just pure network-manager debugging.17:01
xnoxdetrout: and/or standard debian if-up / if-down scripts17:02
detroutok17:02
jgornickxnox: Thanks for the insight. I've been able to get my application to start and stop gracefully now.17:02
xnoxjgornick: no problem17:02
detrouti was wondering if upstart was missing the sleep/resume event and not triggering a reconnect17:02
xnoxdetrout: upstart drops an if.up script to generate events. but it doesn't configure networking at all.17:03
detroutwhere would the if.up script be?17:03
xnoxdetrout: no, upstart doesn't do anything on sleep/resume. pm-utils handles that.17:03
detroutahh ok17:03
xnoxdetrout: if up & down scripts are all in /etc/network/. Again it's not upstart, but rather standard debian.17:04
detroutok17:04
detroutand to make sure i'm understanding it... pm-utils is responsible for triggering on the ACPI sleep resume events, it calls into debian ifup/down, 17:05
detroutxnox: thank you for explaining.17:07
xnoxdetrout: pm-utils is responsible, unless you are running under logind session management, in that case it does take over some functionalities - e.g. activies triggered by power button, etc.17:28
detroutxnox: sid's network-manager pulls in libsystemd-logind17:30
xnoxdetrout: it's best for you to seek support on #debian / #debian-devel on OFTC.17:31
detroutOk. thank you17:32
xnoxdetrout: i'm not that involved in debian network / boot stacks. despite being a debian developer =)17:32
detroutat least now I have a better idea why it worked when I was running systemd-sysv17:32

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!