That-Guy-Jack / HP-ILO-Fan-Control

Uses a Custom ROM for The Hp ILO adapter
https://thatguyjack.co.uk/custom-hp-ilo-rom-and-fan-speed-script/
104 stars 39 forks source link

autofan.service: Failed with result 'exit-code'. #9

Closed softwareuser99 closed 2 years ago

softwareuser99 commented 2 years ago

Hi and first of all thanks for this little script. It runs quite well but I have a problem with the cronjob/service I think. IP and user/pwd are fine, the script seems to connect without problems and read the CPU temps (as can be seen from the below as well). I have these crontab entries in the sudo'ed crontab -e:

@reboot systemctl start autofan
*/10 * * * * systemctl restart autofan

The reason I have the restart every 10 minutes is because it seems the service crashes and this way the fans are adjusted every 10 minutes which for my use case seems sufficient. Of course it would be better if the service just "ran", but I don't know why it crashes all the time.

My system is:

384GB RAM, 2 x Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz 12 x SATA 3.5" Ubuntu 20.04 Desktop

The syslog shows the following messages:

Jan 8 09:57:51 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Main process exited, code=exited, status=6/NOTCONFIGURED Jan 8 09:57:51 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Failed with result 'exit-code'. Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Scheduled restart job, restart counter is at 794. Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: Stopped Fan Speed Controler using autofan.sh. Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: Started Fan Speed Controler using autofan.sh. Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: =============== Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: CPU 1 Temp 67 C Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: =============== Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: =============== Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: CPU 2 Temp 80 C Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: =============== Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Stopping Fan Speed Controler using autofan.sh... Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Succeeded. Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Stopped Fan Speed Controler using autofan.sh. Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Started Fan Speed Controler using autofan.sh. Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: =============== Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: CPU 1 Temp 67 C Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: =============== Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: =============== Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: CPU 2 Temp 80 C Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: =============== Jan 8 09:58:16 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Main process exited, code=exited, status=6/NOTCONFIGURED Jan 8 09:58:16 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Failed with result 'exit-code'.

Also to add, when I SSH into ILO and manually pass the command, I get:

</>hpiLO-> fan p3 max 115 

status=2
status_tag=COMMAND PROCESSING FAILED
error_tag=COMMAND NOT RECOGNIZED
Sat Jan  8 07:21:40 2022

Thanks for your help, happy to do some troubleshooting if you need additional log info. Cheers!

softwareuser99 commented 2 years ago

Hey, consider this closed, I had an issue with the flash process to 2.73. Redid it, now it recognizes the fan commands, all working like it should!

That-Guy-Jack commented 2 years ago

Hey, consider this closed, I had an issue with the flash process to 2.73. Redid it, now it recognizes the fan commands, all working like it should!

Glad to hear it's working hope it serves you well!