Autoshutdown loadaverage doesn't work

  • Hi there,


    I am trying to set up omv autoshutdown to shut down the system when the load average is under 0.4
    So I set under service->autoshutdown->Load Average-> the value to 40


    Unfortunally this doesn't work. The system is still shutting down although the average load is over 1.0


    In the debug log file I think I can see that there is a problem with getting the load average value because CURRENT_LOADAVERAGE and CURRENT_LOADAVERAGE_TEMP2: is empty?!



    logfile:


    local6 autoshutdown[29443]: DEBUG: ' _check_loadaverage(): Output of: 'top -b -n 1 | grep 'load average''
    autoshutdown[29443]: DEBUG: ' _check_loadaverage(): Output of: 'top -b -n 1 | grep 'load average''
    local6 autoshutdown[29443]: DEBUG: ' _check_loadaverage(): 'top - 21:32:06 up 4:00, 0 users, load average: 0,96, 1,08, 1,13''
    DEBUG: ' _check_loadaverage(): 'top - 21:32:06 up 4:00, 0 users, load average: 0,96, 1,08, 1,13''
    DEBUG: ' _check_loadaverage(): CURRENT_LOADAVERAGE_TEMP2: '
    DEBUG: ' _check_loadaverage(): CURRENT_LOADAVERAGE_TEMP2: '
    DEBUG: ' _check_loadaverage(): CURRENT_LOADAVERAGE: '
    DEBUG: ' _check_loadaverage(): CURRENT_LOADAVERAGE: '
    local6 autoshutdown[29443]: INFO: ' Loadaverage ( -> ) is lower than target (4)'
    INFO: ' Loadaverage ( -> ) is lower than target (4)'
    DEBUG: ' _check_loadaverage(): RVALUE: 0'
    DEBUG: ' _check_loadaverage(): RVALUE: 0'
    local6 autoshutdown[29443]: DEBUG: ' _check_system_active(): call _check_loadaverage -> CNT: 0 '
    DEBUG: ' _check_system_active(): call _check_loadaverage -> CNT: 0


    Somebody has a solution or knows the problem?


    Cheers

    • Offizieller Beitrag

    Why do you use 40 instead of 4?

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    So anyone can tell us how the autoshutdown-script get's its "CURRENT_LOADAVERAGE"?

    https://github.com/OpenMediaVa…sbin/autoshutdown.sh#L433

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hmmmm...


    Code
    LC_ALL=C top -b -n 1 | head -1 | sed -E 's/.*load average: ([0-9.]+).*/\1/'

    returns the correct loadaverage....
    so, that shouldn't be the problem...
    anyway, ty ryecoaaron

    • Offizieller Beitrag

    so, that shouldn't be the problem...

    That is only for OMV 4.x only though.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I'm on 4.x, but (for me) the problem persists.
    I'm just trying to get a debug-log with a valid load-check. I don't have another idea how to test the "bug" (or whatever that is).
    I'll let you know if i find something interesting.

  • Soooo, the script that i found in my '/usr/sbin' directory differs from the script on github...


    and i'm on the latest version of OMV (4.1.22-1 (Arrakis) )


    in detail the function in my script gets the value for the load as follows:



    ...i already tried to "quick-and-dirty" fix it by commenting out line 436 and skipping the last stream editing pipe (as for me, that produces a nil value). I have no clue what i did there, and i don't really understand what the autor tries to edit (and why) there, but for now that works for me. I'll give it another look if i have more time (and feel like i want to understand it :) )


    EDIT: to clearify, thats what i edited in line 435 to 437 (in the original file there was only line 436 without the #)

    • Offizieller Beitrag

    I may not have pushed that update to the repos. I will look.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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