[OpenWrt-Devel] Any interest in adding runit to OpenWRT?

Denys Vlasenko vda.linux at googlemail.com
Sat Dec 3 10:09:05 EST 2016


On Sat, Dec 3, 2016 at 2:25 PM, Jo-Philipp Wich <jo at mein.io> wrote:
> Hi Denys,
>
>> Well, we certainly can fix the ntpd start scritps,
>> but this is a generic problem, right? We'd want ANY
>> daemons to be run "properly", with their output logged.
>> With log size and location controlled. With log rotation.
>> Etc. etc etc.
>
> Controlling log rotation, sizes etc. is the task of the syslog
> implementation, not of the service supervisor imho.

That works only if you decide to log messages from all daemons
together (be it syslog or something else).

In many cases, I would rather have each daemon log to a separate
store. This way, a flood of messages from one daemon can never
cause system to lose important log output of another daemon:
logs are rotated *independently*.

I want to run ntpd -ddd so that it prints more info
(I run it this way on my desktop machines).
This will make it spam syslog quite a bit: even just one -d
produces this:

Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: resolved peer
3.openwrt.pool.ntp.org to 77.78.107.252
Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: resolved peer
2.openwrt.pool.ntp.org to 93.99.5.137
Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: sending query to
93.99.5.137
Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: resolved peer
1.openwrt.pool.ntp.org to 147.231.100.5
Sat Dec  3 15:06:11 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: resolved peer
0.openwrt.pool.ntp.org to 212.51.144.44
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: sending query to
212.51.144.44
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:+59.921535 delay:0.845561 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x01
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: reply from
93.99.5.137: offset:+59.961973 delay:0.770002 status:0x24 strat:2
refid:0x93e70206 rootdelay:0.002930 reach:0x01
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+59.971758 delay:0.744569 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x01
Sat Dec  3 15:06:12 2016 daemon.err ntpd[931]: ntpd: reply from
212.51.144.44: offset:+60.337722 delay:0.026133 status:0x24 strat:1
refid:0x50505300 rootdelay:0.000000 reach:0x01
Sat Dec  3 15:06:13 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:06:13 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:+60.339171 delay:0.010628 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x03
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: sending query to
93.99.5.137
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: sending query to
212.51.144.44
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+60.341524 delay:0.005137 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x03
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:+60.338435 delay:0.012266 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x07
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: reply from
93.99.5.137: offset:+60.340468 delay:0.012714 status:0x24 strat:2
refid:0x93e70206 rootdelay:0.002930 reach:0x03
Sat Dec  3 15:06:14 2016 daemon.err ntpd[931]: ntpd: reply from
212.51.144.44: offset:+60.337652 delay:0.026330 status:0x24 strat:1
refid:0x50505300 rootdelay:0.000000 reach:0x03
Sat Dec  3 15:06:15 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:06:15 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:06:15 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+60.341589 delay:0.004886 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x07
Sat Dec  3 15:06:15 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:+60.337898 delay:0.012905 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x0f
Sat Dec  3 15:06:16 2016 daemon.err ntpd[931]: ntpd: sending query to
93.99.5.137
Sat Dec  3 15:06:16 2016 daemon.err ntpd[931]: ntpd: reply from
93.99.5.137: offset:+60.339877 delay:0.014046 status:0x24 strat:2
refid:0x93e70206 rootdelay:0.002930 reach:0x07
Sat Dec  3 15:06:17 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:06:17 2016 daemon.err ntpd[931]: ntpd: sending query to
212.51.144.44
Sat Dec  3 15:06:17 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+60.341706 delay:0.004765 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x0f
Sat Dec  3 15:06:17 2016 daemon.err ntpd[931]: ntpd: reply from
212.51.144.44: offset:+60.341508 delay:0.018580 status:0x24 strat:1
refid:0x50505300 rootdelay:0.000000 reach:0x07
Sat Dec  3 15:06:18 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:06:18 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:+60.338174 delay:0.012388 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x1f
Sat Dec  3 15:06:19 2016 daemon.err ntpd[931]: ntpd: sending query to
93.99.5.137
Sat Dec  3 15:07:19 2016 daemon.err ntpd[931]: ntpd: reply from
93.99.5.137: offset:+60.339458 delay:0.015007 status:0x24 strat:2
refid:0x93e70206 rootdelay:0.002930 reach:0x0f
Sat Dec  3 15:07:19 2016 daemon.err ntpd[931]: ntpd: setting time to
2016-12-03 15:07:19.778089 (offset +60.341508s)
Sat Dec  3 15:07:19 2016 daemon.err ntpd[931]: ntpd: executing
'/usr/sbin/ntpd-hotplug step'
Sat Dec  3 15:07:20 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:07:20 2016 daemon.err ntpd[931]: ntpd: sending query to
212.51.144.44
Sat Dec  3 15:07:20 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+0.000159 delay:0.004907 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x1f
Sat Dec  3 15:07:20 2016 daemon.err ntpd[931]: ntpd: executing
'/usr/sbin/ntpd-hotplug stratum'
Sat Dec  3 15:07:20 2016 daemon.err ntpd[931]: ntpd: reply from
212.51.144.44: offset:-0.000089 delay:0.018865 status:0x24 strat:1
refid:0x50505300 rootdelay:0.000000 reach:0x0f
Sat Dec  3 15:07:21 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:07:21 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:-0.003341 delay:0.012413 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x3f
Sat Dec  3 15:07:33 2016 authpriv.info dropbear[1242]: Child
connection from 192.168.1.171:55348
Sat Dec  3 15:07:38 2016 authpriv.notice dropbear[1242]: Password auth
succeeded for 'root' from 192.168.1.171:55348
Sat Dec  3 15:07:52 2016 daemon.err ntpd[931]: ntpd: sending query to
93.99.5.137
Sat Dec  3 15:07:52 2016 daemon.err ntpd[931]: ntpd: sending query to
147.231.100.5
Sat Dec  3 15:07:52 2016 daemon.err ntpd[931]: ntpd: reply from
147.231.100.5: offset:+0.000040 delay:0.005531 status:0x24 strat:2
refid:0x93e7640b rootdelay:0.000168 reach:0x3f
Sat Dec  3 15:07:52 2016 daemon.err ntpd[931]: ntpd: reply from
93.99.5.137: offset:-0.001741 delay:0.014796 status:0x24 strat:2
refid:0x93e70206 rootdelay:0.002930 reach:0x1f
Sat Dec  3 15:07:53 2016 daemon.err ntpd[931]: ntpd: sending query to
212.51.144.44
Sat Dec  3 15:07:53 2016 daemon.err ntpd[931]: ntpd: reply from
212.51.144.44: offset:+0.000363 delay:0.018783 status:0x24 strat:1
refid:0x50505300 rootdelay:0.000000 reach:0x1f
Sat Dec  3 15:07:54 2016 daemon.err ntpd[931]: ntpd: sending query to
77.78.107.252
Sat Dec  3 15:07:54 2016 daemon.err ntpd[931]: ntpd: reply from
77.78.107.252: offset:-0.003192 delay:0.012609 status:0x24 strat:2
refid:0xc14fed0e rootdelay:0.023163 reach:0x7f



> The following init script parameters will cause the stdio messages to
> get redirected to syslog:
>
> procd_set_param stdout 1
> procd_set_param stderr 1

This works, thanks. I see the log in web interface.
BTW, how to cat syslog from openwrt command line?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list