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.

    Bash
    cd /etc/cron.daily
    ./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 !

  • 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


    Code
    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.

  • Code
    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 ;)

  • Code
    $ sudo echo 'exit 0' >> /etc/cron.daily/monitor-raspi-health                                                                                
    -dash: 44: cannot create /etc/cron.daily/monitor-raspi-health: Permission denied                                                            
    $ ls -l /etc/cron.daily/monitor-raspi-health                                                                                                
    -rwxr-xr-x 1 root staff 273 Jul 14 04:32 /etc/cron.daily/monitor-raspi-health
    Code
    $ cat /etc/cron.daily/monitor-raspi-health                                                                                                  
    #!/bin/bash                                                                                                                                 
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin                                                                    
    sleep 10                                                                                                                                    
    Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")                                                              
    grep -q 1 <<<${Health} && echo -e "$(date)\t$(printf "%019d" ${Health})" >>/var/log/raspihealth.log

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!