You are not logged in.

#1 2005-03-12 12:49:35

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

prefix a daemon with a @

I just got an update for initscripts and in rc.conf.pacnew its has at the DAEMONS line:
prefix a daemon with a @ to start it up in the background
                                         :?:
I'm confused, I thought they were all run in the background as long as they didn't have a '!'. Can someone explain this? Is it a new syntax?

Offline

#2 2005-03-12 12:56:34

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,432
Website

Re: prefix a daemon with a @

it means the next daemon after it will start without waiting for it to finish

it also means you can't tell if it failed or not (unless that got fixed)

Offline

#3 2005-03-12 13:51:40

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: prefix a daemon with a @

thanks dibble smile

Offline

#4 2005-03-12 16:43:36

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: prefix a daemon with a @

Yeah, I noticed that new entry as well, and didn't see the purpose of it.  Good to know...

Offline

#5 2005-03-12 22:05:04

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: prefix a daemon with a @

skoal wrote:

Yeah, I noticed that new entry as well, and didn't see the purpose of it.  Good to know...

it speeds my boot-up-time from 1:25 to 0:34 !

(i have a laptop that is not run 24h/7d but runs lots of daemons for me to be able to develop web things on it (httpd, mysql, cvs, rsync, ...))

the "@" is a good thing (tm)!


The impossible missions are the only ones which succeed.

Offline

#6 2005-03-12 22:17:06

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: prefix a daemon with a @

the classical boot:

http://daperi.home.solnet.ch/linux/boot … linear.png

the backgrounded daemons boot:

http://daperi.home.solnet.ch/linux/boot … ckgded.png

now measured with bootchartd!

1:12 -> 0:34


The impossible missions are the only ones which succeed.

Offline

#7 2005-03-12 23:22:19

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: prefix a daemon with a @

Is there a dependency list so we can know what daemons depend on what other daemons?
Maybe a wiki page on it?

Does the @ sign automatically determine daemon dependencies?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2005-03-12 23:22:51

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: prefix a daemon with a @

dp:
loading daemons simutaneiusly in this fashion kind of scares me...please let us know if it gives you any problems.

Offline

#9 2005-03-12 23:34:45

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: prefix a daemon with a @

Penguin wrote:

dp:
loading daemons simutaneiusly in this fashion kind of scares me...please let us know if it gives you any problems.

no problems at all ...

one thing to keep in mind:
portmap is loaded non-backgrounded and before fam and other parts that depend on a running portmap (everything else is @)

... and as i use kernel26mm i don't depend on pcmcia cardmanager any longer so this is also no problem (but can be a problem for some of you that e.g. have a network card in pcmcia and running stock kernel - here i would suggest not @ing pcmcia and network)


The impossible missions are the only ones which succeed.

Offline

#10 2005-03-12 23:42:47

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: prefix a daemon with a @

cactus wrote:

Is there a dependency list so we can know what daemons depend on what other daemons?
Maybe a wiki page on it?

Does the @ sign automatically determine daemon dependencies?

no - you need to use common sense to do this

the only dependency that can be of importance and i use/need is to have

- portmap running before fam and
@portmap ... @fam
portmap ... @fam

- pcmcia before network, if you need cardmgr and have a network card in pcmcia

most other daemons (ups: forgot hotplug that is maybe special) are not depending on each other (httpd does not need mpd or ssh in most cases ;-) ) so you are on the save side in most cases

the @ing is not newbie-friendly because the user needs to know what daemon needs what daemon to be running already, but hey! if you run a daemon, you need to know what it does and what it might need to do so, so it's not a big deal


The impossible missions are the only ones which succeed.

Offline

#11 2005-03-12 23:44:29

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: prefix a daemon with a @

ok, that makes sense...so if I have:

DAEMONS=(syslog-ng hotplug network netfs crond dbus hal ivman cups sshd esd clamav kdm)

should something like hotplug and dbus be the only ones not prefixed with @?

Offline

#12 2005-03-13 01:02:13

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: prefix a daemon with a @

and not network


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#13 2005-03-13 01:14:08

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: prefix a daemon with a @

....ah yes, thanks.
Pretty impressive, I must say,  I haven't actually timed it but it did seem to take at least half as long to boot smile

Offline

#14 2005-03-13 01:31:12

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: prefix a daemon with a @

now we need a boot-speed-limit and a boot-speed-police to control that we are not starting too fast ;-)

a workaround would be to have throttling, and random "wait 1" calls in the boot process :twisted:


The impossible missions are the only ones which succeed.

Offline

#15 2005-03-13 11:43:36

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,432
Website

Re: prefix a daemon with a @

penguin - and not hal - as ivman has to have hal up before it starts (?)

Offline

#16 2005-03-17 08:15:30

judfilm
Member
Registered: 2004-02-12
Posts: 229

Re: prefix a daemon with a @

Here's a start to the list - Background Daemons at BootUp

The non @ list
-------------------------
hotplug
dbus
network
hal


Could this be checked then added to the wiki?

Thanks

Offline

#17 2005-03-17 10:37:25

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: prefix a daemon with a @

A more elegant solution might be to use Make to start daemons, if speed is what you desire. Since make does dependency duty, all you have to do is figure out what depends on what, put it in make format, and let make go to town. Make should build (start in this case) non-dependent elements simultaneously (make -j isnt it?)...


heh..I can just see it..
make -j -f my_system_run

make my system run..lol..
*bows*


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#18 2005-03-17 14:52:40

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: prefix a daemon with a @

nice, why even bother using initscripts, just provide some fancy make file wink

Offline

#19 2005-03-17 16:01:18

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: prefix a daemon with a @

judfilm wrote:

Here's a start to the list - Background Daemons at BootUp

The non @ list
-------------------------
hotplug
dbus
network
hal


Could this be checked then added to the wiki?

Thanks

that's not true... for instance, if I have no other network dependant daemons, I can background "network" just fine...

hotplug can likewise be backgrounded is each daemon afterwards depends on modules *not* loaded by hotplug (for instance, if the only daemon using a module is "network" and you've specified that in the MODULES array, hotplug can be backgrounded).

Whoever said "backgrounding is not for newbies" was correct... a wiki could be written, but it's not too difficult to understand

Offline

#20 2005-03-17 16:36:29

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: prefix a daemon with a @

I backgrounded everything and haven't had any problems... If I had had, I'd have figured out what needed to be unbackgrounded. That's the most fun, IMHO. wink

Dusty

Offline

#21 2005-03-17 16:38:13

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: prefix a daemon with a @

Dusty wrote:

I backgrounded everything and haven't had any problems... If I had had, I'd have figured out what needed to be unbackgrounded. That's the most fun, IMHO. wink

I debated that... I think, technically, you can run sshd and samba without having a valid network connection at the time, correct?
that's the only reason I didn't background network...

Offline

#22 2005-04-12 13:32:28

andrej.podzimek
Member
From: Zlín, Czech Republic
Registered: 2005-04-10
Posts: 81
Website

Re: prefix a daemon with a @

Hi, nobody mentioned a serious problem. The init scripts do a strange thing when starting hotplug, <b>causing the computer to freeze for more than 20 seconds</b> when loading the <b>hotplug</b> daemon. This applies to virtually all Asus laptops, but some desktops are affected as well, which could be related to hardware/motherboard type.

<b>This problem occurs on multiple computers, but I haven't found any reasonable explanation so far</b>. Despite the numerous postings dealing with this matter, there hasn't been any reaction. The prolem is successfully ignored by everyone.

The problem occurs on every boot, <b>no matter if d-bus and hal are started before hotplug or not, no matter if one uses UDev or devfs.</b> All the pieces of advice dealing with the presence or order of daemons proved to be useless.

The line <b>...hal.hotplug DEVPATH is not set...</b> occurs many times in the error log, each time causing a 2 seconds' delay. Further information about this can be found in <b>man udevsend</b>. However, no solution arises from there.

<b>It is therefore impossible to load hotplug in the background, as there would be no network card driver, no mouse driver and no soundcard driver ready for the daemons to follow (network-related, alsa, gpm...). All of them try to start during the time when hotplug is frozen, so they cannot find the appropriate hardware.</b>

Loading the modules in the modules array wouldn't solve the problem at all. For example, the soundcard drivers like snd-intel8x0 must be loaded via hotplug. Loading the module before hotplug is run provokes a serious error, which might be caused by initializing the soundcard multiple times.  (The soundcard volume settings are messed up so terribly that ALSA stores nonsenses to /etc/asound.state on shutdown and the whole sound system crashes on next boot, requiring reboot to work again.)

<b>It's high time to address this problem appropriately. If you have any experience with a similar serious issue, please post it here. Asus users should think more than twice before @ing their daemons! Everyone should skim their error log for "DEVPATH is not set" lines and delays before experimenting with @.</b>

Offline

#23 2005-04-12 14:58:50

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: prefix a daemon with a @

Better to keep it in your thread:
http://bbs.archlinux.org/viewtopic.php? … ght=#80975

Offline

#24 2005-04-12 15:04:27

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: prefix a daemon with a @

andrej.podzimek wrote:

Loading the modules in the modules array wouldn't solve the problem at all. For example, the soundcard drivers like snd-intel8x0 must be loaded via hotplug. Loading the module before hotplug is run provokes a serious error, which might be caused by initializing the soundcard multiple times.  (The soundcard volume settings are messed up so terribly that ALSA stores nonsenses to /etc/asound.state on shutdown and the whole sound system crashes on next boot, requiring reboot to work again.)

<b>It's high time to address this problem appropriately. If you have any experience with a similar serious issue, please post it here. Asus users should think more than twice before @ing their daemons! Everyone should skim their error log for "DEVPATH is not set" lines and delays before experimenting with @.</b>

First off, that's alot of bold text  :?
Secondly, if you know your modules, there's no reason you should need the hotplug daemon, as it's only for coldplugging (odd, huh hotplug <=> coldplug).  The hotplug daemon detects modules for the devices your machine needs at boot time.  Figure out what modules you need, and add them to the module array, then you can remove hotplug from startup.
That's what I do... just because the daemon isn't running, doesn't mean hotplug doesn't do anything - hotplug is used by udev when a new device is found, but once again the hotplug daemon is only used for cold-plugged devices

Offline

#25 2005-04-12 16:27:49

andrej.podzimek
Member
From: Zlín, Czech Republic
Registered: 2005-04-10
Posts: 81
Website

Re: prefix a daemon with a @

This is exactly what I tried to do on several occassions. I know that the "daemon" doesn't run all the time and it only detects devices at bootup. Unfortunately, turning the daemon off had a devastating effect on my system. For example, USB ports did not work, soundcard was not found at all and the system was completely unaware of peripherals like an LPT printer or a USB-connected MP3 player.

Anyway - the reason could be that the hotplug script didn't load the basic USB and LPT drivers, so the devices couldn't really be detected and connected by the hotplug event handler. But why is it called hotplug then? Lsmod didn't show any USB or LPT modules... In such a situation, there was no evidence that hotplug was working... Disabling the hotplug daemon does decrease bootup time, but on the other hand, the result seemed weird to me. What does hotplug do? Does it only care about peripherals, ignoring the main system controllers (which are expected to be user-configured)?

Is hotplug really independent of the hotplug scripts? After all, disabling hotplug scripts doesn't solve the original issue with the "DEVPATH not found" error.

Offline

Board footer

Powered by FluxBB