揮発性のメモ2

知識をメモ書きしておく

busyboxのntpd で即座に時刻を合わせる

busyboxのntpd を ntpdate みたいに使う方法

ntpd -q -p 192.168.0.1


# ntpd --help
BusyBox v1.35.0 () multi-call binary.

Usage: ntpd [-dnqNw] [-S PROG] [-k KEYFILE] [-p [keyno:N:]PEER]...

NTP client/server

        -d[d]   Verbose
        -n      Run in foreground
        -q      Quit after clock is set
        -N      Run at high priority
        -w      Do not set time (only query peers), implies -n
        -S PROG Run PROG after stepping time, stratum change, and every 11 min
        -k FILE Key file (ntp.keys compatible)
        -p [keyno:NUM:]PEER
                Obtain time from PEER (may be repeated)
                Use key NUM for authentication
                If -p is not given, 'server HOST' lines
                from /etc/ntp.conf are used