run-parts: /etc/cron.daily/monitor-raspi-health exited with return code 1

    • Resolved
    • OMV 3.x
    • run-parts: /etc/cron.daily/monitor-raspi-health exited with return code 1

      Hey,

      I got everyday on my mailbox, from OMV 3 set up on a RPi 1 :
      title is :
      [SERVER.localdomain.lan] Anacron job 'cron.daily' on SERVER
      with inside :
      run-parts: /etc/cron.daily/monitor-raspi-health exited with return code 1

      If this can help to improve ;)
      Thx!
    • Hey,
      Thx your messages, I know now it's not my set up or hardware problem !
      Since my 1st post, OMV is not yet on RPi v1, but in a v2 now.
      Working fine everyday. (thx to people who working on it !!)

      Got everyday this message in my mailbox.
      Today I've tried to execute this command by hand from SSH on the server.

      Shell-Script

      1. cd /etc/cron.daily
      2. ./monitor-raspi-health
      no problem shown, no mail, no message in console.

      I'm not a dev, but when I check the file /etc/cron.daily/monitor-raspi-health , I think it has to write the result code from Tkaiser script in the file /var/log/raspihealth.log
      -> but if I check this .log, the last line has been written from the last reboot only. (1 week ago)

      May be I'm on a wrong way !
    • petrus wrote:

      no problem shown, no mail, no message in console.
      There's a logic error in the script which leads to anaron reporting a problem where none is. Please try to do a

      Source Code

      1. echo 'exit 0' >> /etc/cron.daily/monitor-raspi-health
      and report back tomorrow (the '>>' are important, please do a copy&paste)

      Sorry, I ignored this post back in August since you reported running on a RPi 1 which should be impossible with the new image since using packages for ARMv7 while the first gen Raspberries feature an ARMv6 CPU.
    • tkaiser wrote:

      Source Code

      1. echo 'exit 0' >> /etc/cron.daily/monitor-raspi-health
      and report back tomorrow (the '>>' are important, please do a copy&paste)

      Sorry, I ignored this post back in August since you reported running on a RPi 1 which should be impossible with the new image since using packages for ARMv7 while the first gen Raspberries feature an ARMv6 CPU.
      Thx Tkaiser for this quick fix :)
      Yes, I haven't noticed there was missing the "exit 0" at the end of this script ! Sry for being noob on this :p

      No problem if you haven't noticed this RPi bug, you are already making a really hard work to make us happy with this little board !!
      Thx for your work, and see you soon to report back about this fix ;)
    • Source Code

      1. $ sudo echo 'exit 0' >> /etc/cron.daily/monitor-raspi-health
      2. -dash: 44: cannot create /etc/cron.daily/monitor-raspi-health: Permission denied
      3. $ ls -l /etc/cron.daily/monitor-raspi-health
      4. -rwxr-xr-x 1 root staff 273 Jul 14 04:32 /etc/cron.daily/monitor-raspi-health

      Source Code

      1. $ cat /etc/cron.daily/monitor-raspi-health
      2. #!/bin/bash
      3. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      4. sleep 10
      5. Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")
      6. grep -q 1 <<<${Health} && echo -e "$(date)\t$(printf "%019d" ${Health})" >>/var/log/raspihealth.log