我正在寻找方法,以加快启动时间的单一核心嵌入式Linux系统。在一些自定义守护进程的启动过程中会出现明显的滞后。一旦他们起来了,他们确实在后台运行,但是让他们运行的过程太长了。
##This takes long during startup
##In file /etc/init.d/run_custom_daemon
...
/opt/bin/custom_daemon -d
...
如果我将守护进程的启动放在后台,那么引导时间就会减少。
##This takes much less but is it a real gain?
##In file /etc/init.d/run_cust
我有一个rake任务,它解析一个流API并将数据输入到数据库中。流API是实时提要,为了让实时数据进入数据库,rake任务应该持续运行。一旦调用rake任务,它就会连续运行并解析数据。现在我已经启动了rake任务,它正在运行。问题是,如果我关闭终端或重启服务器,rake任务将停止。因此,我需要linux中的一个脚本(类似于用于启动或停止apache服务器的脚本),它执行以下操作:
1. start the rake task by calling rake command (rake parse:stream) from the RAILS-ROOT (application director