WATCHDOG PROBLEM

Discussion in 'Linux Ubuntu' started by hillcz, Mar 8, 2014.

  1. hillcz

    hillcz Member

    Joined:
    Oct 3, 2013
    Messages:
    72
    Likes Received:
    1
    If a try bomb :(){ :|:& };: udoo is deat but wdog not restart it :-(
     
  2. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    I don't understand. You need to explain better the problem you're having.
     
  3. hillcz

    hillcz Member

    Joined:
    Oct 3, 2013
    Messages:
    72
    Likes Received:
    1
    I have UDOO dual with last ubuntu image. I tested watchdog functionality. I wrote a folk bomb :(){ :|:& };: to the command line.
    Udoo froze but the system itself does not restart.
     
  4. gionji

    gionji Member

    Joined:
    Jun 28, 2013
    Messages:
    38
    Likes Received:
    0
    Hi,

    the watchdog is a physical component that needs to be enabled to perform restart actions.
    When the board is turned on, WDOG is enabled by WDT_EN signal and waits for a trigger signal from uboot (WDT_TRG). If the trigger signal doesn't arrive within a second, the chip resets the board. After that the watchdog is disabled by the kernel.

    So if you need a watchdog function you need to re-enable it and provide a process that "pings” the WDOG chip to prevent the restart. If the system crashes, the WDOG will restart the board.

    We are checking for an issue to export gpios on kernel side. As soon as possible we’ll provide a guide of how to use WDOG.
     
  5. hillcz

    hillcz Member

    Joined:
    Oct 3, 2013
    Messages:
    72
    Likes Received:
    1
    Any update ??
     
  6. hillcz

    hillcz Member

    Joined:
    Oct 3, 2013
    Messages:
    72
    Likes Received:
    1
    How enable WATCH DOG ??
     
  7. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
  8. fetcher

    fetcher Member

    Joined:
    Mar 9, 2014
    Messages:
    166
    Likes Received:
    20
    Using the i.MX6's watchdog feature requires both a kernel driver and a userspace daemon that opens the watchdog device (/dev/watchdog) and periodically resets it, so long as the system is running normally.

    If I remember right, the default udoo kernel (3.0.35) already has the watchdog driver enabled, but check your dmesg and /dev tree to be sure:

    # dmesg | grep watchdog
    [ 2.167160] imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)
    # ls -l /dev/watchdog
    crw------- 1 root root 10, 130 Jul 27 23:09 /dev/watchdog

    As for the daemon, in Debian Linux there is a nice package called simply "watchdog", which can be configured to monitor a lot of different things (system load, RAM use, logfiles, network connectivity...) although you'll probably only want to use a fraction of these. Hopefully Ubuntu has the same package? Try

    # apt-get install watchdog

    If it installs, configure /etc/watchdog.conf as you like, then try manually starting the service (/etc/init.d/watchdog start) ... if it works as expected and doesn't cause any unwanted reboots, add it to your default runlevels (update-rc.d watchdog enable on Debian... Ubuntu might be a little different).
     
  9. ddewaele

    ddewaele Member

    Joined:
    Dec 2, 2014
    Messages:
    48
    Likes Received:
    11
    If you see the IMX2+ Watchdog Timer line in dmesg output, does that mean that HW watchdog is enabled ? Or is it possible that this refers to the SW watchdog ?

    I noticed that on my board when using the /dev/watchdog the board reboots after a fork bomb (good thing), but I didn't do anything with the pins as described in http://elinux.org/UDOO
     
  10. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    As far as I've been told, HW.
     

Share This Page