/srv/irclogs.ubuntu.com/2011/01/14/#upstart.txt

=== JanC_ is now known as JanC
djszapiWhy does upstart not print the Process ID of an application launched from a script section ?13:23
djszapiWhat is the advantage of this way ?13:23
Keybukit does13:42
djszapiw00t ?13:43
djszapiScript part can have tens of commands and those are not printed. Only if there is problems like this one /proc/self/fd/6: /etc/pulse/pulseaudio_pre-start.sh: line 53: amixer: not found pulseaudio start/running, process 599. /proc/self/fd is where it runs script part of the .conf files13:44
Keybukprocess 599 is the script itself13:45
Keybukand the shared process group of all of those tens of commands13:45
djszapiso it does not print then.13:46
djszapiwell, what is the solution way if I need that sort of information, Keybuk ?13:51
djszapiI have just read your mail and I am still not sure the next version (that I do not know when will be released) is useful for my purpose.13:52
djszapiand for sure I do not have time to wait for that.13:52
djszapiaudit kernel stuff I thought can be a hackaround for now, but let me know, I am newbie in this area.13:53
KeybukI don't know what your purposes are13:53
djszapiwell13:53
Keybuk(so it's hard to me to answer questions where you state "for my purpose")13:54
djszapiI need the configuration file name and pid of the application that was run by upstart.13:54
djszapias it happens quite perfectly with 'exec' entries in the /etc/init/*.conf files.13:54
Keybukbut it does give you that, it gives you the pid of the script13:55
Keybukwhich is all that was run by Upstart ;-)13:55
djszapinope13:56
Keybukwhat do you mean "nope"13:57
KeybukI'm pretty sure only one of the two of us *wrote* Upstart, so knows what he's talking about :p13:57
djszapihwclock:329,sh:328,init:113:57
djszapifor example this is the procedure, init -> sh (upstart) -> hwclock13:57
Keybukright, Upstart ran "sh"13:58
djszapiI need the pid of the hwclock and the configuration file name which started it.13:58
Keybukso status in that example will give you the pid of sh13:58
Keybuknot of hwclock13:58
Keybukok, that's *NOT* what you said above13:58
Keybukyou said "id of the application that was run by upstart"13:58
Keybukupstart ran sh13:58
djszapino13:58
Keybukwhat sh did is entirely up to sh13:58
Keybukare you disputing what you typed?13:58
Keybukbecause I just copy & pasted it13:58
djszapiokay, you do not still understand it :)13:59
djszapilet me give you an example:13:59
Keybukno, I understand far more than you13:59
Keybukyou're just not explaining yourself13:59
Keybukand probably you don't actually know what you want13:59
Keybukand don't understand how processes work on UNIX13:59
djszapido not insult me, please.14:00
KeybukI believe what you want is:14:00
Keybuk  script14:00
Keybuk    foo &14:00
Keybuk    bar &14:00
Keybuk    baz &14:00
Keybuk  end script14:00
djszapias said, WAIT14:00
Keybukto give you the pids of foo, bar and baz ?14:00
djszapiI am gonna give you an example, patient pls...14:00
djszapiI need to boot the device up.14:01
Keybukis that not what you want?14:01
djszapiseems you cannot be patient :)14:01
Keybukno14:01
KeybukI'm busy14:01
KeybukI'm answering you rather than working14:02
Keybukbecause I'm nice ;-)14:02
Keybukbut I don't have much time14:02
djszapiwork now and ask when I provide info ?14:02
djszapiand to avoid the guesswork and wasted time till that ?14:02
Keybuksure, will you hang around here for, say, 6 hours?14:02
djszapiplease do not be arrogant for hours, if I may ask...14:03
KeybukI'm not being arrogant, I am, right now, using my lunch hour to try and help you14:03
Keybukand you're not answering my question14:03
djszapibecause I still cannot ?14:04
Keybukwhy?  you can answer questions?14:04
djszapihttp://pastebin.com/GjeJiy7n14:04
djszapi14th line for instance.14:05
Keybukthat's a shell script14:05
djszapiI would like to get this configuration file back and hwclock pid 14:05
Keybukhwclock has no pid at the point that script has finished14:05
Keybukbecause the shell runs hwclock, waits for it to finish, and reaps it14:05
djszapiweird it has.14:05
djszapievery process has pid14:05
Keybuktell you what14:05
Keybukwhy not read what I typed?14:05
KeybukAT THE POINT THAT SCRIPT HAS FINISHED14:06
djszapieven tho. the same sometimes than the parent process (setuid e.g.)14:06
Keybukthe shell does something like:14:06
Keybuk  fork()14:06
Keybuk    (child:14:06
Keybuk      exec hwclock)14:06
Keybuk    (parent:14:06
Keybuk      wait)14:06
Keybuk  // now at the next line of shell14:06
Keybukso there's no backgrounding going on here14:07
djszapik, so I cannot get this information by upstart....14:07
Keybukthe fact that hwclock has a separate pid is basically an implementation detail14:07
djszapihow can I get then ?14:07
Keybukfor example, a particularly over-the-top shell could have hwclock as a built-in14:07
Keybukwhich means it would have no pid14:07
Keybukget it when?14:07
djszapinope14:08
Keybukthe pid (if there even is one) will appear and vanish pretty quickly14:08
Keybukstop saying "nope" to me14:08
KeybukI know what I'm talking about14:08
djszapilet me wait for someone else to help then...14:09
Keybukthey'll either tell you the same thing 14:09
Keybukor they'll give you incorrect information14:09
djszapiseems you are in god-mode.14:09
Keybukno, I'm trying to help you14:10
Keybukbut you're not actually listening to anything I say14:10
Keybukwhich is exasperating14:10
djszapiby screaming at me ?14:10
KeybukI'm not screaming at you14:10
KeybukI'm telling you how things work14:10
djszapiand screaming if I am saying sth ?14:10
Keybukand you're refusing to believe me14:10
djszapiinteresting help, never tried14:10
Keybukwhich is insulting14:10
Keybukyou're wrong14:10
Keybukdo you accept that there is no need for hwclock to have a separate pid at that point?14:10
Keybuk(feel free to relink /bin/sh -> /bin/busybox and run that script, if you need physical proof)14:11
djszapino idea whether it has got pid that point, but I need the 1) conf file name 2) PID when it ran.14:12
Keybukyou could add strace -f to the shell invocation14:12
djszapiexactly as it happens in case the exec line in the configuration files.14:13
Keybukthat way you'd trace all the system calls, and follow forks, so you'd get the pids that way14:13
Keybukyou could use the proc connector kernel interface to follow the forks/execs of the shell and again get the pids14:13
Keybukproc connector is racey though, because the pid may vanish before you have an opportunity to read /proc/PID/cmdline and actually figure out what it is14:14
Keybuk(strace at least blocks)14:14
djszapipid is not enough, as said also the config file where it was run frm.14:14
Keybukaudit, ftrace, etc. any of those kernel tracing hooks14:14
djszapi* from14:14
djszapiwell, my original idea was the audit stuff.14:15
Keybukyou could mount a subsystem-less cgroup hierarchy and place that script into a new cgroup within it14:15
Keybukthat would collect the pids run in the tasks file14:15
Keybukbut again, that only really tells you background processes14:15
Keybukhwclock would come and go, so unless you polled the tasks file *really hard* you may not even see the pid14:15
Keybuk(and even then, /proc/PID/cmdline would probably be gone by the time you found the pid)14:16
djszapiyeah, but audit should not be racey.14:16
Keybukaudit is racey14:16
djszapior "slow".14:16
Keybukand slow14:16
djszapilol14:16
Keybuksadly14:16
Keybukaudit doesn't block the shell from doing its work14:16
djszapiwhich is nifty.14:17
Keybukso when the shell forks off hwclock, it doesn't actually stop anything14:17
Keybukso by the time that the audit system is told about the new pid, it could have already finished running14:17
djszapihard to imagine.14:17
Keybukwhich means there won't be any information about it - not even the fact it was hwclock at all14:17
Keybukhappens all the time14:17
djszapias long as the audit follows the syscalls.14:17
Keybukyou'd have to follow the fork and the exec calls14:17
Keybukand extract the strings from the exec call (which is actually an array of strings)14:17
Keybukthat's what then makes it slow14:18
djszapiwell, not really.14:18
djszapiit depends on the kernel configuration.14:18
Keybukno, really ;(14:18
djszapiyou are not obligate to enable the syscall tracing capability.14:18
Keybukno, I mean it's just slow when enabled14:19
Keybukit can be nearly free when turned off14:19
Keybukyour best bet, really, is to get the shell to tell you the pids ;)14:19
Keybukfor example, you could write that script as14:19
Keybuk  hwclock -s -u &14:19
djszapiyeah, but that option is just one of the available audit options, you can still use audit with no syscall trace.14:19
Keybuk  # you now have the PID in $!14:19
Keybuk  wait $!14:19
Keybuksure, but audit with no syscall trace means you won't get the pids ;)14:19
djszapimmh14:20
djszapiso the easiest way is to modify ALL the configuration files existing.14:20
Keybukwell, it depends yeah14:20
Keybuka better question is why do you need to know the PID of that hwclock invocation?14:21
djszapiI cannot talk about that, sorry. Company project and NDA.14:21
Keybukdo you need to know the pid of the date and test invocations?14:21
djszapiif it was run directly by upstart shell then yeah.14:21
Keybukthere's no such thing as "upstart shell"14:22
Keybukthat's what I was referring to earlier14:22
djszapiwtf ? :D14:22
Keybukeverything in that script block - upstart thinks is a big string14:22
Keybukyou can put whatever you want in there14:22
Keybukall upstart does is exec /bin/sh and pipe that string to it14:22
djszapiI mean in the process queue, there is a shell process after the init process and I meant that shell as an upstart shell.14:22
Keybukwhich is what I mean about "the application that Upstart runs" *is* /bin/sh14:22
Keybukinteresting example:14:23
Keybuk  script14:23
Keybuk    exec hwclock -s -u14:23
Keybuk  end script14:23
Keybukwhat will Upstart say the pid of that is? :-)14:23
Keybuk(hwclock)14:23
djszapino idea14:23
Keybukwithout knowing your project14:23
Keybukone option would be for you to patch /bin/sh itself14:24
djszapilol14:24
Keybukwhy lol ?14:24
djszapifunny14:24
Keybuklet's say you have this upstart job14:24
Keybuk  exec /lib/foo/some-binary14:24
Keybukif that some-binary is that shell script you paste-binned14:25
Keybukdo you *still* need the pids from it?14:25
djszapino14:25
Keybukinteresting, why the distinction?14:25
djszapi:)14:25
Keybuk*shrug*14:25
Keybukseems pretty arbitrary to me14:26
Keybukbtw, that script is *completely* bat shit insane14:26
Keybukyou don't need to run hwclock like that14:26
djszapino we need.14:26
djszapiand it was just an example if you do not like, the point is you got the idea.14:26
Keybukbut I don't get the idea14:26
djszapido not make it with me, pleae :)14:27
djszapi* please14:27
KeybukI don't get why you're treating scripts pasted into an upstart conf file differently to those elsewhere14:27
djszapido not do it to me :)14:27
Keybuklet's give a hypothetical example:14:27
djszapiyou do not need to understand that bit.14:27
Keybuklet's say you have a system which is entirely an upstart-native boot14:27
Keybukno, I *do* to help you14:27
djszapiour system is that.14:27
Keybukok14:27
Keybukso have upstart as the last thing run a shell14:28
djszapiwell, I can tell you why tbh.14:28
Keybukthe PIDs run by Upstart are "1 thru the PID of that shell:"14:28
Keybukno?14:28
djszapibut it requires a more in-depth understanding.14:28
djszapiand not 1 min14:28
djszapithat is why I would like to avoid it for now.14:28
djszapiI would not like to bother you.14:28
Keybukif, after booting, the shell's pid is 1456 then Upstart has resulted in 1,456 processes being run14:28
djszapiyeah, a sheel after the jobs, daemons.14:29
djszapi* shell14:29
djszapiyeah, it is trivial14:29
djszapibut what is your gist ?14:29
Keybukno gist, I'm trying to understand what you're trying to do14:29
djszapiwell14:30
Keybukfor example, if you were trying to measure the overhead of using shell scripts for things rather than writing them in C14:30
djszapithere are more shell scripts in fact, not just one.14:30
djszapidepends on the amount of configuration file stuff14:30
djszapiwell, put it that way.14:30
djszapido you know Maemo, MeeGo ?14:30
Keybukof course14:30
djszapidefine "of course".14:30
Keybukit's hard to work out, because - for example - what if hwclock forked off an extra child?14:30
Keybukdo you want to know two pids or one?14:31
djszapiare you a nokian ?14:31
Keybukof course I know of Maemo/MeeGo14:31
Keybukno, but I know lots of people who are14:31
djszapiexcellent14:31
djszapiso we use upstart in this project.14:31
djszapiright ?14:31
Keybukindeed14:31
djszapiwell14:31
Keybukwell, on/off14:31
* Keybuk checks whether there's a "u" in the day14:31
djszapi?14:32
Keybuksorry, possibly an English expression14:32
djszapinvm...14:32
KeybukMaemo/MeeGo uses Upstart on Sunday, Tuesday, Thursday and Saturday14:32
Keybukbut something else on Monday, Wednesday, Friday14:32
djszapiso you know maemo, meego security framework14:32
Keybuka joke about the fact that they change their mind every minute14:32
Keybukno, I don't know about that I'm afraid14:32
djszapiit is a bit different compared to the traditional posix capability stuff.14:32
djszapiit is more fine tuned stuff, like selinux, smack14:32
djszapiand the like14:32
Keybukok14:33
djszapibtw, do not starve because of me :)14:33
KeybukI've eaten :)14:33
djszapi*Nifty, googles*14:33
djszapi*giggles*14:33
djszapitypo king, so14:33
djszapiwe use manifest files for fine-tune capability management14:34
djszapiand upstart and daemon maintainer did something wrong :)14:34
djszapino manifest stuff, and all the run jobs, daemon, upstart have all the capabilities.14:34
djszapiWe wrote a debugger kernel module which gives a line like that:14:34
djszapi[    9.701293] captrace:allow=25|hwclock:329,sh:328,init:114:35
djszapi25 obv. comes from /usr/include/linux/capabili.*14:35
djszapiit is a capability14:35
djszapithat is the output during the boot-up14:35
djszapiand I do some kind of reverse engineering with the perl script14:36
djszapito generate the manifest files for upstart and jobs, daemons maintainers.14:36
djszapican you follow ?14:36
Keybukyup14:36
djszapiokay, great I need the conf path to put into the manifest file.14:36
djszapiand just the daemon binary path in case daemons14:36
djszapithat is why it does not matter in that case.14:36
djszapiso the jobs, daemons capabilities are separated.14:37
djszapibecause they are different debian packages.14:37
djszapior rpm, whateva'14:37
djszapie.g. /usr/bin/pulseaudio14:38
djszapibut the stuff run by upstart.14:38
djszapiwill be dropped by the upstart package.14:38
djszapiand we are still speaking about credentials.14:38
djszapiis it clear ?14:38
djszapiso [    9.701293] captrace:allow=25|hwclock:329,sh:328,init:1 is a good line, but I need to pass it with a configuration file14:39
djszapifrom which hwclock was run actually.14:39
djszapihwclock pid is there, 32914:40
djszapiand that is what I should match with upstart debug output, if any14:40
djszapiand get the related configuration file name14:40
djszapithat is all about, feel free to ask if something is vague.14:40
Keybukah, I usee14:44
Keybukso if you had a line saying date:330,sh:328,init:114:44
Keybukyou'd just ignore it?14:44
Keybukso there's an easy way to map <blah>:<pid>,init:1 to an Upstart conf name14:47
Keybukboot with --verbose, in the system logs upstart will list all the pids along with the job14:47
Keybukso you could compare the syslog to that log, and extract :PID,init:1 and map all instances of those to a .conf14:47
Keybukas for the things like hwclock and soforth run by the scripts, audit is *probably* the right place14:48
Keybuksince in those cases, hwclock's ppid remains 328, init never finds out about it - the only time init really cares about a pid is when the ppid dies and it gets reparented to init, you see14:49
djszapiusee ?14:49
Keybuk"see" sorry14:50
djszapiI would not ignore a line, why do you think that ?14:50
Keybukwell, date doesn't need any extra capabilities? :-)14:50
Keybukor maybe it does14:50
djszapigotcha14:50
djszapiyou are right14:50
djszapithe common linux commands do not.14:50
djszapibut it is just a whitelisty parsy thingy.14:51
djszapithis is not the main question here for now.14:51
djszapiso there's an easy way to map <blah>:<pid>,init:1 to an Upstart conf name14:51
djszapinope ^14:51
djszapi<blah>:<pid>,sh:xxx,init:114:51
Keybuk--verbose will give you the log messages to do that14:52
djszapithe blah process can most likely be "advanced" cmd.14:52
djszapiadvanced = extra credentials for now14:52
djszapimost likely the one left to that in the line is gonna be a common tool as you have just mentioned.14:52
djszapiit is a kinda process tree tho.14:52
Keybuk--verbose will give you:14:52
KeybukJan 14 14:52:49 deathspank init: tty6 main process (8557)14:53
Keybuklog messages14:53
Keybukthat means you know that all14:53
djszapiboot with --verbose, in the system logs upstart will list all the pids along with the job -> nope14:53
Keybuk<blah>:<pid>,sh:8557,init:114:53
djszapias said, we do not need jobs14:53
djszapijust commands from the scripts14:53
Keybukno, not ALL14:53
djszapijobs means by me the daemons.14:53
Keybukbut you don't need all14:53
KeybukJan 14 14:52:49 deathspank init: tty6 main process (8557)14:53
Keybuk<blah>:<pid>,sh:8557,init:114:53
Keybuksee how the 8557 lines up there14:53
djszapiso ?14:53
Keybukevery <blah> run by that script will still end ",sh:8557,init:1"14:54
Keybuk<blah>:<pid>,sh:8557,init:114:54
Keybukhwclock:8558,sh:8557,init:114:54
Keybukdate:8559,sh:8557,init:114:54
djszapigive me 2-3 mins to read your posts again.14:54
Keybukmkdir:8560,sh:8557,init:114:54
Keybukhwclock:8563,sh:8557,init:114:54
Keybukfor example14:54
Keybukif that script ran at least those four commands, that's what you'd see, no?14:54
Keybuk(the ppid of each of those remains 8557)14:54
Keybukand, in fact, the pgid and sid of even hwclock is 855714:55
Keybukso that tells you that the shell script run by upstart for the "tty6.conf" ran those four commands14:55
djszapisince in those cases, hwclock's ppid remains 328, init never finds out about it - the only time init really cares about a pid is when the ppid dies and it gets reparented to init, you see14:55
Keybukright14:55
djszapi-> yes, I mentioned an example in the beginning for that.14:56
Keybukunless a process deliberately attempts to shed its session, the pgid and sid will remain the same as the shell14:56
djszapi16:57 < Keybuk> Jan 14 14:52:49 deathspank init: tty6 main process (8557)14:57
djszapiwell it is not enough14:57
Keybukwhy not?14:57
djszapiit is just about the shell script, not the application run by that.14:57
Keybukwhy is it just about the shell script?14:57
Keybukfrom what you've told me, that'd exactly what you want, isn't it?14:58
djszapinope14:58
djszapiokay, give me a better example and not hwclock14:58
Keybukno, what _do_ you want then?14:58
djszapi* let me give you14:58
djszapisorry Keybuk15:01
Keybukmaybe I should have picked a better test command than "stop gdm" :p15:01
djszapi:P15:01
djszapiyou were right15:01
Keybukhttp://people.canonical.com/~scott/forkwatch.c.txt15:01
djszapiI did not understand what I mean15:01
djszapi* You mean15:02
djszapi* meant..erm15:02
Keybukif you need something that *really* can watch all the forks, that C program should help15:02
djszapiwait15:02
Keybukthough you'll see what I mean about the cmdline race there15:02
Keybukaudit might be better15:02
djszapiwe have just discussed the verbose stuff is ok'ish15:02
Keybukthe verbose stuff should get you back to an upstart .conf file, yeah15:02
Keybukand you can turn it off after boot with "initctl log-priority warn"15:03
djszapiwell, the pid idea was about the identification15:03
djszapibut I need the config file only at last.15:03
djszapihttp://people.canonical.com/~scott/ -> is it your stuff ?15:04
djszapiKeybuk: well not an issue15:04
Keybukdjszapi: yup15:04
Keybukmy stuff15:04
djszapias you got the point this task is because of a wrong maintainer past15:04
djszapiso hopefully it is not gonna require continous running.15:04
djszapiduring the lifecycle of the device, os.15:04
Keybuk*nods15:05
Keybukyou can turn on --verbose btw with "initctl log-priority info"15:05
Keybukso you don't even need to reboot to enable it15:05
djszapibut for confirmation, let me give you a better example than hwclock was.15:05
djszapi[    8.318542] captrace:allow=6|aegis-loader:191,sh:188,init:115:05
djszapiaegis-loader is an internal application15:06
djszapirun by upstart's script section15:06
djszapiright ?15:06
Keybukright15:06
KeybukI assume from that that aegis-loader still has pgid/sid=18815:06
Keybuk?15:07
djszapihighly doubt15:07
Keybukis it a background process?15:07
djszapiRM680-02-2_RD_001:/etc/init# grep -rni aegis-loader .15:08
djszapi./aegis.conf:14:    if [ -d /sys/kernel/security/credp -a -x /usr/bin/aegis-loader ]; then15:08
djszapi./aegis.conf:15:        /usr/bin/aegis-loader || echo "Failed to load aegis"15:08
Keybukright, so doesn't look backgroundy to me15:08
Keybukso it should still be easy to match up15:08
djszapirighty15:08
djszapik15:08
djszapione thingy I do not understand about your posts.15:09
Keybukwhat's that?15:09
djszapi16:52 < Keybuk> as for the things like hwclock and soforth run by the scripts, audit is *probably* the right place15:09
Keybukright, to find out the pid of hwclock in the first place, rather than the shell15:10
Keybukyou know the pid of the shell, upstart knows the pid of the shell, upstart logs it, etc.15:10
Keybukbut upstart doesn't know (or care) what the shell does15:10
Keybukso you need something to get the pid of the things the shell runs15:10
Keybukso then you map those things back to the .conf file15:10
Keybukbasically you'll end up with a process tree15:10
Keybukpid 1 forked pid 57 forked pid 13415:11
Keybuk134 might be hwclock15:11
Keybukso you look up its parent, 57, in the log - and that tells you its wibble.conf15:11
Keybukwibble main process (57)15:11
djszapiwell15:12
djszapish:pid,init:115:12
Keybukright15:12
djszapishS are the shell scripts coming from upstart (during the boot-up for instance), aren't they ?15:12
Keybuknot always15:12
Keybukthat's why I asked about exec /lib/blah/blah style15:12
Keybukthat can show up as just "sh" too15:12
Keybuk(if blah is a shell script)15:13
djszapibecause that way I would say we do not need anything else than the process id of the shell if it is quite enough information to figure out the configuration file.15:13
djszapilet us grep for exec lines, momment15:13
djszapiwell I do not see any shell script in the output.15:14
djszapigetty, syslogd, sshd, udevd, internal binaries...15:15
djszapino shell script.15:15
djszapimostly /usr/(s)bin stuf.15:15
djszapiand /sbin ofc.15:15
Keybukcool15:16
Keybukyou're using dash then? ;-)15:16
djszapiyour mean ?15:16
Keybukreadlink /bin/sh15:16
Keybukprobably /bin/dash or /bin/bash15:17
djszapibusybox15:17
Keybukoh right15:17
djszapiofc embedded mobile phones15:17
Keybukthat's usually a bugger for not setting proctitles ;-)15:17
djszapiand some netbook15:17
djszapiwe are talking about in case Maemo, MeeGo.15:17
djszapi'that's usually a bugger for not setting proctitles ;-)' -> can you be a bit more expressive, please ?15:17
Keybukoh, I mean that busybox often doesn't bother setting the proctitle15:18
Keybuk(the thing you see in ps)15:18
Keybukso when it gets a shell script, you often just see 'sh' rather than '/bin/foo'15:18
Keybukbut that, of course, depends on its configuration when built15:18
Keybukdoesn't matter15:19
Keybuksince it obviously does the right thing for you15:19
djszapiy15:21
djszapiso it seems we do not need audit and kernel hacking then15:23
djszapibut let me know the truth (aka. fixme).15:23
djszapiAfter this command: 'initctl log-priority warn' -> it works perfectly after every reboot that way until I set it back, right ?15:29
Keybukright15:31
djszapiright what ?15:32
Keybukright :)15:33
djszapiwell, I said/asked two things, both ?15:34
Keybukboth15:35
djszapik, ty.15:35
djszapibtw, are you an upstart developer ?15:38
KeybukI wrote Upstart15:38
djszapialone ?15:38
Keybukpretty much15:39
djszapilol15:39
djszapiyou are crazy :D15:39
Keybukyes15:39
djszapiCONFIG_CMDLINE="init=/sbin/preinit root=0xB302 rootfstype=ext4 rw console=ttyS0,115200n8 omap3_die_id" -> this is the default, so just -> CONFIG_CMDLINE="init=/sbin/preinit root=0xB302 rootfstype=ext4 rw console=ttyS0,115200n8 omap3_die_id verbose" ?15:40
djszapior what is the correct syntax ?15:40
Keybuk--verbose15:40
djszapiweirdy15:41
djszapiwell, it does not print anything in fact, I have just tried it out.15:42
Keybukno, it logs it so syslog15:43
djszapihighly doubt15:43
djszapiwe redirect it to console and watch in minicom15:43
djszapithere is no syslog here.15:44
djszapimmh....15:45
djszapino idea I guess.15:46
djszapiok I gave it up :/15:47
KeybukI've no idea what your configuration is wrt syslog15:47
Keybukbut that's where upstart sends its log messages15:47
djszapiby default: /var/log/syslog ?15:48
Keybukno, syslog15:49
Keybukman 3 syslog15:49
djszapithere is no /var/log/messages*15:49
Keybuksyslog is a socket interface15:49
Keybukwhere they go after that, depends entirely on your setup15:49
Keybuk(or even if anything listens)15:49
djszapiman 3 -> developer man pages.15:49
djszapiI do not develop with syslog.15:50
KeybukI do :)15:50
djszapiby default: -> there is not "depends entirely on your setup" thingy :)15:50
djszapianyways...no idea where the log should be then15:51
Keybukyou need to speak to the maemo/meego developer who knows where syslog() messages go on meego15:53
djszapiagain: minimum, serial port15:53
djszapiat least my printk goes there...15:54
djszapiand printk is supposed to go to the syslog if nothing else h appens.15:54
djszapi* minimum = minicom15:54
djszapiseems verbose does not work15:55
djszapimaybe the command line option struggles.15:55
djszapiis there any way to check the command line with which the system was booted up ?15:55
djszapisome sysfs or procfs heuristics ?15:56
djszapiRM680-01-2:~# initctl log-priority warn15:57
djszapiRM680-01-2:~# 15:57
djszapithis does not help either after the rebootl.15:57
djszapi* reboot15:57
djszapithe upstart might not work on this boot at all ??15:58
djszapiI do not see any other upstart related entries either.15:58
djszapishould they occur at all ?15:58
sam-_-so i want to disable an upstart job. would i just uncomment the "start on" line? what's the preferred way to do this?16:04
djszapihow can that be Keybuk, I do not get any upstart messages, nor the debug statements about the stopped, started processes ?16:14
JanCsam-_-: I think you mean *comment* the "start on" line?  (and yes, that should prevent it from getting started automatically)16:45
sam-_-JanC, is the preferred way?16:45
sam-_-JanC, y. that's what i meant. 16:46
* sam-_- hits himself in the head16:46
JanC16:46
Steveeif you are using upstart 0.6.7, there is a stanza called "manual" add this entry to any jobfile to prevent upstart to start it by any event16:46
sam-_-Stevee, ah ok. thx16:47
JanCin case you are using Ubuntu, Maverick still has 0.6.616:48
sam-_-i'm on 0.6.6 though :-(16:48
JanCso 0.6.7 is very new16:48
sam-_-yes16:48
sam-_-so the comment will have to do it :-)16:48
sam-_-so the commenting will have to do it :-)16:48
JanCfor now at least16:49
sam-_-y. no problem.16:49
JanCeven natty still has 0.6.6 it seems16:50
JanC(but I guess that will change?)16:50
Keybuknatty has 0.6.716:51
JanChm, no16:51
JanCpackage says 0.6.7, --version says 0.6.616:51
JanCinitctl --version16:52
JanCso probably it's 0.6.7 but doesn't know that itself  ;)16:53
Keybukhuh16:54
SpamapSHas there very been a discussion of an 'expect listen' ?16:57
Keybukyes16:57
Keybukthough it goes something more like "why not use 'start on socket'" :p16:59
SpamapSYeah thats where I get to as well.. the example I'd give is mysql .. which may take 20 minutes to start if it has to recover large innodb transaction logs.16:59
Keybukyeah, and on a server you might want mysql always running17:00
Keybuknot just started on first activation17:00
Keybukthough even then, it would have the listening socket passed to it17:00
Keybukso it's a bit of a tricky one17:01
Keybukthe other side of the question is - does the kernel even notify userspace of new sockets?17:01
KeybukI had a vague idea there might be something netlink-y but I've not looked17:01
djszapiKeybuk: gotta go, ty for your help today :)17:02
djszapimy virtual beer is yours, heh17:03
JanCKeybuk: the source package for upstart 0.6.7 in natty says 0.6.6 in configure.ac & configure, but that seems to be correct/fixed in upstream 0.6.717:30
Keybukweird17:30
Keybukwonder why 17:33
SpamapSt 20:47
SpamapS120:48
SpamapSoops wrong window20:49
bencccan you give an example of ubuntu package that uses upstart?22:44
benccI'm trying to package a server and want to see how to include the upstart script22:45
JanCbencc: you mean a server package?22:48
benccJanC: a web server22:49
benccwhat do you mean by a server package?22:49
JanCwell, there are many packages that use upstart jobs, but starting a server isn't the same as starting a TTY of course  ;)22:49
benccok22:50
benccI have a basic upstart job that start the server22:50
benccI want to see how to include it in a .deb package22:50
JanCI see mysql & squid have upstart jobs22:50
benccthanks, checking22:51
benccJanC: dh-make produces example files like init.d.ex22:54
benccI don't see an example for upstart22:54
JanCbencc: maybe file a (wishlist) bug about that then?22:56
benccJanC: ok but I don't know how to use it22:56
benccJanC: if there is init.d.ex the packaging tool probably handle it in a special way22:57
benccso I'm not sure if I need to put the upstart on the root or maybe treat it as a normal file22:57
tgm4883When looking at upstart services, what is the meaning of +, -, and ?. for example   [ ? ]  acpi-support23:51
tgm4883I've been querying the info, but + and ? tend to be the same23:51

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