User Tools

Site Tools


doc:techref:procd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:techref:procd [2013/07/11 20:15]
lorema
doc:techref:procd [2014/07/08 15:00] (current)
theoradicus add link to init script howto
Line 1: Line 1:
-====== procd (process management daemon) – Technical Reference ====== 
-  * [[http://​nbd.name/​gitweb.cgi?​p=luci2/​procd.git;​a=summary|Project'​s git]] 
-  * procd is available in OpenWrt since [[https://​dev.openwrt.org/​changeset/​34865|r34865 (trunk)]]. It consists of files under GPLv2, LGPLv2.1 and ISC licenses. 
-  * [[https://​dev.openwrt.org/​search?​q=procd&​noquickjump=1&​changeset=on|commits to OpenWrt trunk regarding procd]] 
- 
-==== History ==== 
-  * [[https://​dev.openwrt.org/​changeset/​34865|r34865:​ procd: add initial implementation]] 
-  * [[https://​dev.openwrt.org/​changeset/​34866|r34866:​ base-files: add basic procd integration,​ let procd start (and restart) ubus instead of having an ubus init script]] 
-  * [[https://​dev.openwrt.org/​changeset/​34867|r34867:​ dropbear: convert init script to procd]] 
-  * [[https://​dev.openwrt.org/​changeset/​36003|r36003:​ base-files: make basefiles aware of procd]] 
-  * [[https://​dev.openwrt.org/​changeset/​36005|r36005:​ busybox: make init and logread depend on !PROCD_INIT]] 
-  * [[https://​dev.openwrt.org/​changeset/​36446|r36446:​ hotplug2: make it depend on !PROCD_INIT]] 
-  * [[https://​dev.openwrt.org/​changeset/​36896|r36896:​ procd: make the preinit rules wildcard all buttons for failsafe]] 
-  * [[https://​dev.openwrt.org/​changeset/​36987|r36987:​ hotplug2: procd does the hotplugging now]] 
-  * [[https://​dev.openwrt.org/​changeset/​36998|r36998:​ base-files: procd is now the init process]] 
-  * [[https://​dev.openwrt.org/​changeset/​36999|r36999:​ base-files: diag does not need to insmod any drivers, procd already did it for us]] 
-  * [[https://​dev.openwrt.org/​changeset/​37000|r37000:​ base-files: input/​button drivers get loaded before preinit by procd]] 
-  * [[https://​dev.openwrt.org/​changeset/​37002|r37002:​ base-files: /​etc/​init.d/​rcS is no longer needed, procd handles this for us now]] 
-  * [[https://​dev.openwrt.org/​changeset/​37039|r37039:​ busybox: disable syslogd/​klogd by default, procd replaces them]] 
-  * [[https://​dev.openwrt.org/​changeset/​37106|r37106:​ busybox: disable the watchdog utility by default (procd handles watchdog devices)]] 
-  * [[https://​dev.openwrt.org/​changeset/​37242|r37242,​ 37243, 37244: busybox: convert telnet, crond and sysntpd init scripts to procd]] 
-  * [[https://​dev.openwrt.org/​changeset/​37245|r37245:​ dropbear: register a config.change trigger: procd_add_config_trigger "​dropbear"​ "/​etc/​init.d/​dropbear"​ "​restart"​]] 
-  * [[https://​dev.openwrt.org/​changeset/​37249|r37429:​ procd: add proto and trigger support to the /​etc/​init.d/​log]] 
- 
- 
 ==== What is procd? ==== ==== What is procd? ====
 ''​procd''​ is the new OpenWrt [[wp>​Process (computing)|process]] management daemon written in [[wp>C (programming language)|C]]. It keeps track of processes started from init scripts (via ubus calls), and can suppress redundant service start/​restart requests when the config/​environment has not changed. ''​procd''​ is the new OpenWrt [[wp>​Process (computing)|process]] management daemon written in [[wp>C (programming language)|C]]. It keeps track of processes started from init scripts (via ubus calls), and can suppress redundant service start/​restart requests when the config/​environment has not changed.
Line 39: Line 14:
   - test what has been ported   - test what has been ported
   - review of the code   - review of the code
 +
 +==== Buttons with procd ====
 +
 +:!: see commit in https://​dev.openwrt.org/​log/​trunk/​package/​base-files/​files/​etc/​rc.button
 +
 +==== Init scripts with procd ====
 +
 +see [[inbox:​procd-init-scripts]]
  
 ==== Why do we want procd? ==== ==== Why do we want procd? ====
Line 51: Line 34:
  - and of course all that without adding unnecessary bloat. AFAIK there are no alternatives to procd.  - and of course all that without adding unnecessary bloat. AFAIK there are no alternatives to procd.
  
-==== Dependencies of procd ==== +{{page>​meta:​infobox:​construction&​noheader&​nofooter&​noeditbtn}} 
-  * ''​[[http://​nbd.name/​gitweb.cgi?​p=luci2/​libubox.git;​a=summary|libubox]]''​ (~ 12KiB) ​is a general purpose library which provides things like an event loop, binary blob message formatting and handling, the Linux linked list implementation,​ and some JSON helpers. The functions in ''​libubox''​ are used to write the other software ​in [[http://luci.subsignal.org/trac/browser/​luci2|luci2]], like e.gubus +====== procd (process management daemon) – Technical Reference ====== 
-  * ''​[[http://nbd.name/gitweb.cgi?p=luci2/​ubus.git;​a=summary|ubus]]''​ (~ 13KiB) is an RPC daemon similar to dbus but with a much friendlier C API+  * [[http://​nbd.name/​gitweb.cgi?​p=luci2/​procd.git;​a=summary|Project'​s git]] 
 +  * procd is available ​in OpenWrt since [[https://dev.openwrt.org/changeset/34865|r34865 (trunk)]]. It consists of files under GPLv2LGPLv2.1 and ISC licenses
 +  * [[https://dev.openwrt.org/search?q=procd&​noquickjump=1&​changeset=on|commits to OpenWrt trunk regarding procd]]
  
 +===== OpenWrt – operating system architecture =====
 +{{page>​doc:​techref:​architecture&​noheader&​nofooter}}
  
-Whereas desktop distributions use [[wp>​GLib|glib]] and [[wp>D-Bus|dbus]] (and [[wp>udev]]) OpenWrt uses [[http://nbd.name/gitweb.cgi?p=luci2/libubox.git;​a=summary|libubox]] and [[http://nbd.name/gitweb.cgi?p=luci2/ubus.git;​a=summary|ubus]] (and [[https://​dev.openwrt.org/​browser/trunk/package/hotplug2|hotplug2]])+==== History ==== 
-This provides some pretty awesome functionality without requiring huge libraries with huge dependencies (*coughglib).+ 
 +Package history is available at: 
 +  * current history: ​[[https://​dev.openwrt.org/​log/​trunk/​package/​system/​procd]] 
 +  * old history pre r37007 ​[[https://​dev.openwrt.org/​log/​trunk/​package/​procd/​Makefile?​rev=36995]] 
 + 
 +  * [[https://​dev.openwrt.org/​changeset/​34865|r34865: procd: add initial implementation]] 
 +  * [[https://​dev.openwrt.org/​changeset/​34866|r34866:​ base-files: add basic procd integration,​ let procd start (and restart) ubus instead of having an ubus init script]] 
 +  * [[https://​dev.openwrt.org/​changeset/​34867|r34867:​ dropbear: convert init script to procd]] 
 +  * [[https://dev.openwrt.org/changeset/​36003|r36003:​ base-files: make basefiles aware of procd]] 
 +  * [[https://​dev.openwrt.org/changeset/​36005|r36005:​ busybox: make init and logread depend on !PROCD_INIT]] 
 +  * [[https://​dev.openwrt.org/​changeset/​36446|r36446: hotplug2: make it depend on !PROCD_INIT]] 
 +  * [[https://dev.openwrt.org/changeset/​36896|r36896:​ procd: make the preinit rules wildcard all buttons for failsafe]] 
 +  * [[https://​dev.openwrt.org/changeset/​36987|r36987:​ hotplug2: procd does the hotplugging now]] 
 +  * [[https://​dev.openwrt.org/​changeset/​36998|r36998: base-files: procd is now the init process]] 
 +  * [[https://​dev.openwrt.org/​changeset/36999|r36999:​ base-files: diag does not need to insmod any drivers, procd already did it for us]] 
 +  * [[https://dev.openwrt.org/​changeset/​37000|r37000: base-files: input/​button drivers get loaded before preinit by procd]] 
 +  * [[https://​dev.openwrt.org/​changeset/​37002|r37002:​ base-files: /​etc/​init.d/​rcS is no longer needed, procd handles this for us now]] 
 +  [[https://​dev.openwrt.org/​changeset/​37039|r37039:​ busybox: disable syslogd/​klogd by default, procd replaces them]] 
 +  ​[[https://​dev.openwrt.org/​changeset/​37106|r37106:​ busybox: disable the watchdog utility by default (procd handles watchdog devices)]] 
 +  * [[https://​dev.openwrt.org/​changeset/​37242|r37242,​ 37243, 37244: busybox: convert telnet, crond and sysntpd init scripts to procd]] 
 +  * [[https://​dev.openwrt.org/​changeset/​37245|r37245:​ dropbear: register a config.change trigger: procd_add_config_trigger "​dropbear"​ "/​etc/​init.d/​dropbear"​ "​restart"​]] 
 +  * [[https://​dev.openwrt.org/​changeset/​37249|r37429:​ procd: add proto and trigger support to the /​etc/​init.d/​log]] 
 +  * [[https://​dev.openwrt.org/​changeset/​37336|r37336:​ procd: make old button hotplug rules work until all packages are migrated]]
doc/techref/procd.1373566530.txt.bz2 · Last modified: 2013/07/11 20:15 by lorema