追加読書

追加読書

watchdog(Raspbian Jessieで)サービスを有効にしようとしています。

私はwatchdogそれをインストールし(希望的に)整理しました。 sudo systemctl start watchdog始動をかければ大丈夫そうです

systemctl status watchdog.service実行中であることを示してください:-

● watchdog.service - watchdog daemon
   Loaded: loaded (/lib/systemd/system/watchdog.service; static)
   Active: active (running) since Mon 2017-02-20 15:52:46 AEDT; 22s ago
  Process: 1828 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
  Process: 1824 ExecStartPre=/bin/sh -c [ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
 Main PID: 1831 (watchdog)
   CGroup: /system.slice/watchdog.service
           └─1831 /usr/sbin/watchdog

有効にしようとすると、sudo systemctl enable watchdog奇妙な結果が表示されます。

Synchronizing state for watchdog.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d watchdog defaults
Executing /usr/sbin/update-rc.d watchdog enable
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

systemctl list-units | sudo update-rc.d watchdog enablegrep watchdogを試しましたが、成功しませんでした。

cat /lib/systemd/system/watchdog.service実際、[Install]セクションはありません。

[Unit]
Description=watchdog daemon
Conflicts=wd_keepalive.service
After=multi-user.target
OnFailure=wd_keepalive.service

[Service]
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module
ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'

[Install]

これをデバッグして起動時にウォッチドッグを実行するにはどうすればよいですか?


以下を追加しました。/lib/systemd/system/watchdog.service

[Install]
WantedBy=multi-user.target

watchdog今始めましょう。正しく動作するかどうかをテストする必要があります!

ベストアンサー1

これは Debian の既知のバグです。 Debian 監視パッケージのシステム統合は数回にわたって大きく変わりました。発見したとおり、Debian 8 でリリースされた監視パッケージは実際には動作しません。リリース前のテストではこれが見つかりませんでした。

このバグはパッケージバージョン5.15-1で修正されており、サービス単位で不正なサービス単位構文(サービス単位でも参照)が修正されました。このバージョンはDebian 8バックポートでは利用できませんが、2つの要求がありました(明らかに無視されます)。

追加読書

おすすめ記事