Fan Scripts for Supermicro Boards Using PID Logic

Fan Scripts for Supermicro Boards Using PID Logic 2020-08-20, previous one was missing a file

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Just a heads up... this controller can only be used in PD mode because the implementation isn't quite right. The code has Ki set to 0, and I'm guessing no one has it set to non-zero since it wouldn't work right. The code is essentially doing this:
Code:
curr_dc = curr_dc + Kp * err + Ki * integ + Kd * deriv

And since Ki is always 0, it's really only doing this:
Code:
curr_dc = curr_dc + Kp * err + Kd * deriv

What it should be doing is this:
Code:
curr_dc = bias_dc + Kp * err + Ki * integ + Kd * deriv

Where bias_dc is your "default" fan duty cycle, i.e. the duty cycle at idle that keeps your disks close to your desired set point. In other words, the current duty cycle should not be part of the computation. The integral is what ends up offsetting you to the correct place. An extreme example would be if you set your bias to 50, but it should really be 20. After running for a while, the integral will end up around -30 to get you to 20.
This discussion slipped by me (major stuff going on) but it is interesting and I would like to learn more about how it might be implemented. I'm not sure bias or 'default' duty cycle at idle can be fixed since for many of us ambient temperature may vary widely. Even if it didn't, wouldn't you essentially have to run a script like this to determine what the ideal duty cycle is for steady-state at idle? Or is its actual value not really that important? Maybe just set it to the minimum duty cycle setting?

Secondly, I guess I'm having difficulty figuring how the system can work if you don't apply the PID output to the previous duty cycle. It's an adjustment right? Often a fine one. I can't imagine the system coming up with an accurate, absolute duty cycle out of thin air without knowing what it's set at now. Honestly I'm not enough of a mathematician to see how that prevents using I, but if it does, I'm OK with calling it a PD controller. It works great as is.

That said, it would be fun to try this approach some time and see if it works.
 

Grinchy

Explorer
Joined
Aug 5, 2017
Messages
78
The script is running fine, but is there a way to run it as a postinit script without it occupying the shell on the actual NAS? For example, this is what I see on the iKVM display. I'd like it if the script runs behind the scenes and it sits at the "main menu," if I ever needed to access it for some reason.

View attachment 30687


Just did it like this:

Code:
#!/bin/bash
echo "Starte Lüftersteuerung ..."
/root/scripts/spinpid2.sh &>> /root/scripts/spinpid2PostInit.log &
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211

Sharethevibe

Dabbler
Joined
Aug 21, 2019
Messages
21
Setting up my first FreeNAS and after establishing interfaces, pool etc I now wanted to conquer the frantically blowing fans on the dual-cpu SuperMicro motherboard... (this is a pulled board and in the large serverhalls apparantly loudness of the fans is not first priority... 2 fans of 70mm screaming at 6000rpm...). Also when controlling the cpu-fans in the mobo on lowest possible setting ('quiet/low perform') they still are on some 3500 rpm.

So the dual-zone script is I think a very practical tool. Also considering that my NAS will have many hours a day of no use, where I want the thing to shut down as much as possible. Including spinning down the disks (where the pool/datasets resides).

My question is: where to place the scripts?
I have read many posts on this subject (spent some 2 evenings on it) but (like for most of the FreeNAS topics) it seems to be that there are as many opinions on best practices as there are FreeNAS-users...

Key thing: so I intend to have the disks spin down when idle; so is it then a problem when the script is located on the /mnt directory so in the pool/on the disks? (the FreeNAS GUI > section 'Tasks > PostInit-scripts' gives us that path).

Thanks in advance for your advice,

Gerard

SuperMicro X8DTL-iF
Dual Intel Xeon 5600
4x 8GB ECC-RAM
Pool of 2x 4x 8TB WD hard-disks (2X Z1-VDev, striped)
(IT-flashed Dell H310 controller)
L2ARC: Transcend 220s 500GB NVME-SSD
10Gb NIC
 

charlie89

Explorer
Joined
Dec 26, 2013
Messages
55
Usually i put those fan scripts into /root, because this directory resides on the boot disk and i can't use a postinit script located on a pool because all my pools are encrypted. I think this may also help you with spinning down the disks (i'm personally not a fan of spin down because i think it puts more mechanical stress on the HDD).
 

Sharethevibe

Dabbler
Joined
Aug 21, 2019
Messages
21
Hey Charley,

Tx for the reply. Busy-busy here but bumped into the weekend now.. so trying to get ahead with the new build.
This is my first FreeNAS so I'm plowing through all the matter in order to set the thing up in a neat way (later on, I'll be into the modus of 'use and forget' and there'll be masses of data on it so difficult to change-around pools etc).

Putting the fancontrol-script not on the pool-disks but on the boot-disk I think is handy to do.
But how do I do that?
In the FreeNAS GUI, section Tasks, part PostInit-scripts, we are giving the /mnt directory as location to put the script or command.
(so thats the pool/disks).
How to put the fancontrol-script on the boot-disk?

Next to that: what is mentioned in the forums on this is that when doing an update on the FreeNAS, you will loose the script.
I use a 120GB SSD as a boot-disk.
Is it an idea to first make 2 partitions on the SSD. Placing the script in 1 partition and FreeNAS on the other?
If so:
How to create 2 partitions first? (do that with the SSD under Windows first?) (I dont think there's a 'make partition-option' in the installation software of FreeNAS (like there is with Windows).

Tx in advance!

Gerard

PS:

On disk spin-down: yes, I've seen that 'mechanical stress and life-time of disk' is mentioned sometimes (also by guys having had systems more years), but hard-disks are mostly used in desktops and these are shut down all the time. My intention would be to set it on say 'if 2 hours idle, then stop' (avoiding frequent start-stop).
And the reason for spin-down obviously is the cost of the power: we allways take care about the costs when buying stuff but in my current set-up the disks' annual power costs are about 125 dollars, when running 24/7. When only running when needed the disks will probably be down for 2/3 of the time, so thats say 80 bucks every year. In 5 years time (lifetime of the set-up) thats 400 dollars. For that you can be neat few hard-disks (for extension or back-up unit) (or neat nvme-ssd's ) (or...... ;-)
I also intend to have the total NAS shut-down as much as possible when idle, so also the fans (this in the script). And cpu's on low (can be set in the BIOS I think). Leaving low-cpu's + RAM as powercost when idle. (dont know about the nvme-ssd, nor about the 10Gb-NIC, both on pcie)(these can shut down but dont know if they draw power when NAS is idle).
 

charlie89

Explorer
Joined
Dec 26, 2013
Messages
55
In the FreeNAS GUI, section Tasks, part PostInit-scripts, we are giving the /mnt directory as location
Just change the Type to 'Command', than you can enter whatever you like, i.e. /usr/local/bin/bash /root/fancontrol/spinpid2.sh &>> /root/fancontrol/spinpid2_output.log &

when doing an update on the FreeNAS, you will loose the script
Hmm i can't remember losing this script via an update. Of course i keep a backup of the script on my data pool.
 

Sharethevibe

Dabbler
Joined
Aug 21, 2019
Messages
21
Was just able to spend another evening/night on the new NAS-build.... (seems it's allways nightwork...).

Above you gave the commands/instructions; I'm not into scripts... can you please clarify:
- the 'usr/local/bin/bash'-part is an instruction I think? (that indicates how to handle the file (being '/root/fancontrol/spinpid2.sh')
- what is this first part? do I need to add that in my folders somewhere?

- you continue with "&>> /root/fancontrol/spinpid2_output.log &"
- not sure what the '&>>' means nor the "&" at the end (maybe that this also needs to be 'bin/bashed'?).

(I put the spincheck.sh in the root-folder and created a pre-init-task; re-booted , yet see nothing happening...)

Help appreciated... ;-)
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Glorious1 updated Fan Scripts for Supermicro Boards Using PID Logic with a new update entry:

It's been a while

In both scripts:
  1. removed Ki and I (integral) term
  2. code tweaks to marginally improve efficiency
  3. added option to output to log only vs. log + console
  4. revised tuning advice at end of scripts to make it easier
In spinpid2.sh (dual-zone script):
  1. because some boards don't report correct fan duty, the script will now try to read it the first time and make needed adjustment, then assume the duty remains as it was set and not read it further
  2. added a setting...

Read the rest of this update entry...
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I just posted an update to the fan control scripts (spincheck and spintest haven't changed). A brief list of changes is in the update section. Here I'll explain a bit more for anyone who cares.
For both scripts:
  1. I removed the integral constant and term, Ki and I. Some that know a lot more about the engineering theory than I suggested that it was essentially duplicated because we were applying a PID correction to the previous fan duty. It doesn't make any difference because Ki was 0 anyway (unless you changed it). I also tried several alternative equations that were suggested. I couldn't get them to work as well as the current one, which I view as pretty perfect. I'm sure that with days or weeks of playing with the equation and tuning constants, I could have gotten it as good as the current one, but I finally said, why bother? It's not going to get any better in terms of performance, and if it ain't broke, don't fix it. I recognize it is not pleasing to engineers and mathematicians, but I'm not planning to publish it in an engineering journal. So is it a PID or PD controller now? I don't know. But it works great.
  2. Some code tweaks to marginally increase efficiency.
  3. Some people were having a problem because the output appeared, not just in the log, but also in the console. This kind of took over the console so they couldn't interact with it. So there is now an option to direct output to the log only, vs. log + console as before. The latter can be useful when you're testing the script - you see the output right there without having to get out of a tmux session or something.
  4. More specific and quantitative tuning advice at the end of the scripts.
For spinpid2.sh (the dual-zone script):
  1. I am told some boards don't report correct fan duties. Earlier I addressed that by not reading fan duty at all. We just started at 50% and then assumed each time that it was what we last set. This is a minor tweak - we now try to read fan duties the first time. If we get a value, we believe it, and then adjust accordingly (if not we still go 50%). This makes startup smoother, the fans won't jump up or down if they're not way off. But afterward, we continue to assume fan duty is what we last set.
  2. New setting to control logging of CPU data. That file can get quite large over time, so CPU should only be logged during testing.
  3. BMC reset. This is a complicated issue. A few people have reported serial resets. For some reason there is a reset, then the script looked at the high fan speeds and said, "Oh, no, need a reset". I'm still not sure how it happens. But it now tests both zones, then does the reset if either was bad. I also removed the test for fans going too fast - that's not really a safety problem and probably accounted for serial resets. It still checks for fans too slow and resets if found.
Dual zone people, I can't really test that script on my machine, so let me know if you find problems.
 
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Glorious1 updated Fan Scripts for Supermicro Boards Using PID Logic with a new update entry:

BMC reset change

Discovered that BMC reset on my machine takes 105 seconds, so lengthened the wait after reset from 60 to 120 sec.
Latest version is 2019-10-04

Just after posting this update, I think I finally figured out how the serial resets happened. Something goes wrong with the BMC. After checking the drives and setting the fans in that zone, the script sees things are not right and resets it. Wait 60 seconds. Then the short CPU loops start.

Eventually the BMC comes back with duty presumably at 100% in both zones. But because some boards report erroneous duty data (I'm told), we're not checking it. The script still thinks it's say, 30%. If the script doesn't need to change the duty cycle in either zone before the next time it compares duty and RPMs to see if a reset is needed, it thinks the duty is 30% when it's really 100% and RPMs are high. Time for another reset.

Things should get back in sync if the script changes the duty in both zones during the first cycle after a reset, but if it's already minimum in one of the zones, it will never change because things are cool.

If this is what was happening, I think v. 2019-10-04 is not the complete answer. It shouldn't reset anymore if the fans are too high. But the best solution is either to let the script actually read duty, which I would prefer, or to set the duty variables at 100% after a reset. I think what I'll do is make a setting for the user to choose which solution to go with.
 
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Can someone with a few minutes to spare confirm for me that fans in both zones of a dual-zone board go to 100% duty within 2 minutes after a BMC reset?
  1. Most commands will need sudo before them if not running as root.
  2. A running fan control script would interfere, especially the CPU zone, so it should be stopped. I know it's a pain. If started from a post-init command:
    • ps -aux | grep spinpid
    • You'll get several pids. Ignore the one for the grep command
    • kill -9 <pid1> <pid2> <pid3> - make sure you get the numbers right
  3. Fan mode must be "FULL". Can set that in IPMI or with:
    • ipmitool raw 0x30 0x45 1 1
  4. Set fan duties for the 2 zones to something reasonable, like 30%
    • ipmitool raw 0x30 0x70 0x66 1 0 30
    • ipmitool raw 0x30 0x70 0x66 1 1 30
  5. The reset command: ipmitool bmc reset cold
  6. Start (sudo) spincheck.sh with a 1-minute interval. See if it goes to 100 in both zones in a minute or two. Or if you know your fans' approximate RPM at 100%, you can monitor in IPMI. Let it go for a few more minutes to be sure it stays there.
  7. Then you can either start spinpid2.sh (reboot if it's post-init task or run in a tmux session) or change the fan mode to what you like in IPMI.
 
Last edited:

zvans18

Dabbler
Joined
Sep 6, 2016
Messages
23
Can someone with a few minutes to spare confirm for me that fans in both zones of a dual-zone board go to 100% duty within 2 minutes after a BMC reset?
They didn't for me, but maybe my method was off. Ctrl+C'd my spinpid2 in tmux, then followed steps 3-5 while watching the sensor readings on the IPMI webpage. Fans stayed at 30%. Waited 10 minutes and then started spinpid2 back up. Fans spun up to appropriate levels.

X11SSM-F
EDIT: BIOS is 2.2a (latest) and firmware is 1.56 (latest)
EDIT2: for clarity, the CLI commands for steps 3-5 worked, the fans just never went back up to 100% after the reset
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
the CLI commands for steps 3-5 worked, the fans just never went back up to 100% after the reset
Thanks for trying that. Assuming you got a little feedback message after the reset command, that it was being sent, I’m really baffled now.
 

zvans18

Dabbler
Joined
Sep 6, 2016
Messages
23
Assuming you got a little feedback message after the reset command, that it was being sent, I’m really baffled now.
Yes, something about cold reset to MC, i closed the tmux window and don't have the history
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
@lmannyr, I've been studying the logs you posted (I was in another world at the time) to try to get better insight into what's happening. As you said, it looks like something other than the script was bumping up the fans so the script reset the BMC. Maybe it was the phantom fan that you mentioned, though I don't know why that would occur intermittently. Another possibility is two instances of the fan control script running, but that seems unlikely.

You've given me some ideas for reworking the bmc reset process to make it more bulletproof. Before I proceed, if you have time, would you mind doing the same test that zvans18 did?
 

zvans18

Dabbler
Joined
Sep 6, 2016
Messages
23
I recently picked up an SC 846 I'm planning on migrating to, and I'm having some issues in my experimentation before actually moving stuff over.

Important hardware:
2x Xeon 2620v2
X9DRi-F
CPUs are passively cooled (empty FANA/B) and FAN1-6 are all populated except for FAN4
Fans are 7000 RPM and low thresholds are all 600 or lower.

It has a fresh FN install on an 850 PRO with a mirror of old 500GB data drives for testing.

Here's my list of issues so far:
  1. spincheck looks like this
    Code:
    Thursday, Oct 10          da1  da2  Tmax Tmean  ERRc CPU  FAN1  FAN2  FAN3  FAN4  FANA Fan%0 Fan%1 MODE 
    18:48:43  *29  *33  Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    ^33  31.00 -3.00  35  3000  2850  2850   ---   ---     0     0 Standard
  2. spintest looks like this
  3. Code:
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    
    Script to determine fan RPMs associated with varying duty cycles.
    Duty will be varied from 100% down in steps of 10.
    After setting duty, we wait 5 seconds for equilibration
    before reading the fans.  Some points:
    
    1. Set the log path in the script before beginning.
    2. There should be no fan control scripts running.
    3. At very high and especially low fan speeds, the BMC may take
       over and change the duty.  You can:
         - ignore it,
         - adjust fan thresholds before testing, or
         - edit the script so it starts and/or ends at different values
           (see comment before while loop for instructions).
    
    Thursday, Oct 10, 19:04:19
                                     ___Duty%___  Curr_RPM____________________
                            MODE     Zone0 Zone1  FANA  FAN1  FAN2  FAN3  FAN4
    Conditions before test  Full         0     0   ---  7200  7125  6975   ---
    
    Are you ready to begin? (y/n)
    
    Thursday, Oct 10, 19:04:24
                                     ___Duty%___  Curr_RPM____________________
                            MODE     Zone0 Zone1  FANA  FAN1  FAN2  FAN3  FAN4
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 100%         Full         0     0   ---  7125  7125  7050   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 90%          Full         0     0   ---  7125  7050  6975   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 80%          Full         0     0   ---  7200  7050  6975   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 70%          Full         0     0   ---  7125  7125  6975   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 60%          Full         0     0   ---  7050  7125  6975   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 50%          Full         0     0   ---  7125  7125  6975   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 40%          Full         0     0   ---  7125  7125  7050   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 30%          Full         0     0   ---  7125  7050  7050   ---
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Duty cycle 20%          Full         0     0   ---  7050  7125  6975   ---
    
  4. spinpid looks like
    Code:
    ****** SETTINGS ******
    Drive temperature setpoint (C): 31.14
    Kp=4, Kd=40
    Drive check interval (main cycle; minutes): 1
    CPU check interval (seconds): 2
    CPU reference temperature (C): 30
    CPU scalar: 3
    Fan minimum duty cycle: 30
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    
    Key to drive status symbols:  * spinning;  _ standby;  ? unknown                                             Version 2019-10-03
    
    Thursday, Oct 10                                              Fan %                  Interim
              da1  da2  Tmax Tmean  ERRc      P      D CPU Driver Prev/New MODE      RPM AdjustmentsSensor data record "CPU Temp" not found!
    
    19:13:40  *30  *34  Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    ^34  32.00  0.86   3.44  34.40   0 Drives  0/38    Standard 3075 Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    
    19:15:02  *30  *34  Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    ^34  32.00  0.86   3.44   0.00   0 Drives 38/41    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Full     7125 Sensor data record "CPU Temp" not found!
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    41 Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
    Sensor data record "CPU Temp" not found!
  5. spinpid2 looks like
    Code:
    ****** SETTINGS ******
    CPU zone 1; Peripheral zone 0
    CPU fans min/max duty cycle: 30/100
    PER fans min/max duty cycle: 25/100
    CPU fans - measured RPMs at 30% and 100% duty cycle: 600/1800
    PER fans - measured RPMs at 30% and 100% duty cycle: 1000/2900
    Drive temperature setpoint (C): 31.14
    Kp=4, Kd=40
    Drive check interval (main cycle; minutes): 1
    CPU check interval (seconds): 2
    CPU reference temperature (C): 30
    CPU scalar: 3
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    
    Key to drive status symbols:  * spinning;  _ standby;  ? unknown                              Version 2019-10-04
    
    Thursday, Oct 10                                     CPU         New_Fan%  New_RPM_____________________
              da1  da2  Tmax Tmean   ERRc      P      D TEMP MODE    CPU PER   FANA  FAN1  FAN2  FAN3  FAN4tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    
    18:33:41  *29  *33  Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    ^33  31.00Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
       -.14  -0.56  -5.60      Full      0   0    ---  7125  7200  6975   ---Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    
    18:35:15  *29  *33  Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    ^33  31.00   -.14  -0.56   0.00   33 Full     39  25    ---  7200  7200  6975   ---tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
    
    18:36:49  *29  *33  ^33  31.00   -.14  -0.56   0.00   34 Full     42  25    ---  7200  7050  6900   ---Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0x70 rsp=0xcc): Invalid data field in request
    tee: LOG=/mnt/tmirror/z/scripts/spinscripts/cpu.log: No such file or directory
  6. Both spinpid and spinpid2 leave the fans at max and show the same RAW error.
  7. No idea what the issue with the cpu log is, it's the same folder as everything else.
  8. This board has FANA/B, and FAN1-6 but I think it's hardcoded to only show A and 1-4?
  9. There doesn't appear to be any consideration for multi socket systems.
Is my board unable to be controlled or is there some sort of bug preventing it?
Could various references to CPU Temp be changed to allow CPU1 Temp/CPU2 Temp/CPUx Temp?
Would it be possible to conditionally show fan columns based on what is present on the board?
EDIT: Could part of the problem be empty FANA/B?

Sorry for only bringing problems, I'm dumb as a rock when it comes to code/script.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Your board doesn't have an Aspeed BMC, I'm not sure anyone has gotten this stuff to work on non-Aspeed models.
 

zvans18

Dabbler
Joined
Sep 6, 2016
Messages
23
Your board doesn't have an Aspeed BMC, I'm not sure anyone has gotten this stuff to work on non-Aspeed models.
Ah, that's embarrassing. Thanks for the info, I thought IPMI stuff was kind of universal/standardized. Guess quickest solution in the meantime is some kind of resistor/volt controller.
 

zvans18

Dabbler
Joined
Sep 6, 2016
Messages
23
https://www.ixsystems.com/community/threads/fan-script-for-x9-motherboards.69550/ i found this, but it's based on an older version. I'm testing manual raw commands and they work. I don't expect Glorious1 to maintain several discrete versions, nor do I think it's the best idea to try and turn it into a sprawling monolith of branch logic, so I might try and run it through a diffchecker and hack the newer changes into the modified version when I have some time.
 
Top