Commit graph

72 commits

Author SHA1 Message Date
Tim Connors
8614648388 add raid_controller_battery_temp, and ensure MegaCli doesn't continuously log 2025-11-18 00:49:50 +11:00
Tim Connors
8ea6df0eb3 fix some parsing of smart-intercept-spindown broken by new version
New smart-intercept-spindown didn't accept all formats of input coming
to it - the status line we were trying to detect broken status of
doesn't appear on most devices
2025-09-20 06:23:00 +10:00
Tim Connors
f8e4bf0dc8 smart-intercept-spindown was discarding SAS data not parsed
Data we don't use was being dropped on the floor rather than passed
through, potentially stopping it being a drop-in-replacement for
vanilla smartctl
2025-09-20 01:41:56 +10:00
Tim Connors
7dbfa2755c Update documentation, comments, logging, and centralise some management
Management of ambient/exhaust temperature management delegated to
daemon number 0.

Hopefully all aspects of the code should be documented now.

Logging is a lot nicer
2025-09-13 16:05:32 +10:00
Tim Connors
4c3dd04eaf parse the config file dynamically to enable quicker tuning 2025-09-13 05:08:35 +10:00
Tim Connors
b65d94a112 overhauled to allow each fan to be individually controlled
Huge change to source a config file, with a dynamic definition of fan
curves for each individual fan.  I have mine set to have the drives
nearest a fan be what determines its speed demand, along with adjacent
CPU, GPU, raid controlled card in my specific box.

Fixes github issues #1 (use `sensors --json`), #8 (allow each fan
speed to be controlled individually)
2025-09-13 04:25:40 +10:00
Tim Connors
00413326be hddtemp, smart-intercept-spindown: handle idle, add --numeric, --no-device
Filter out temperature=255 at this stage rather than in clients who
use us

Allow hddtemp to output a simpler format if --no-device --numeric is
requested

Ignore idle disks as well in order not to bring them out of idle mode
and thus reset timer
2025-09-13 04:20:15 +10:00
Tim Connors
7c831f1f52 Make use of smart-intercept-spindown and smartctlnvme
Migrate smart-intercept-spindown and smartctlnvme into this repo from
my ansible-initial-server-setup playbooks, so they can be published in
a self-contained repo.  Ansible then distributes these files anyway
via including this repo.

This enables us to get rid of the spindown test code we duplicated
here, plus ensure we're actually distributing smartctlnvme
2025-09-13 04:20:15 +10:00
Tim Connors
2b6c1590f1
Merge pull request #10 from AnthonyMichaelTDM/patch-1
fix: be quiet when the $quiet flag is set
2025-09-11 06:19:01 +10:00
Tim Connors
d3b182b575 what FIXME: comment?
Fixes question posed after #9 was closed.
2025-08-05 14:03:18 +10:00
Tim Connors
7e4a2338d3 code unified with ansible-initial-server-setup/.../hddtemp
Synced with https://github.com/spacelama/ansible-initial-server-setup
-> hddtemp

purpose comment taken from
ansible-initial-server-setup/.../smart-intercept-spindown
2025-08-05 13:58:47 +10:00
Anthony Rubick
d643c2a0b3
fix: improve quiet mode handling for dynamic fan control message 2025-07-28 01:46:14 -07:00
Anthony Rubick
a536821c02
fix: be quiet when the $quiet flag is set
My syslogs are basically flooded with that "--> disable dynamic fan control" message.
Despite passing the -q flag in the systemd unit file, the logs from this program (and more specifically, that single message) make up at least 60% of my log entries.

This fixes that issue by only printing the message when quiet is false.
2025-07-28 00:33:26 -07:00
Tim Connors
74b8adc61c
Create LICENSE 2025-07-07 03:00:10 +10:00
Tim Connors
c99bd7aa25 fan-speed-control renamed to the mode descriptive poweredge-fand 2025-03-21 16:36:55 +11:00
Tim Connors
3476e7212a reference other codebases and debugging info 2025-02-18 16:45:46 +11:00
Tim Connors
e6ee99874a fixed broken logic introduced in e29a05f
Sorry people, when I rearranged the logic in e29a05f for:

$desired_temp1 < $weighted_temp < $desired_temp2

I ORed instead of ANDed, but didn't test it until I just pushed out my
ansible config to that host right now, several months later!
2025-01-22 18:03:38 +11:00
Tim Connors
2314f44268
Update readme.md
Tuning
2025-01-03 03:15:36 +11:00
Tim Connors
ca21632d8f
Update readme.md
Basic tuning info
2025-01-03 02:52:51 +11:00
Tim Connors
0be8072889 small readme.txt changes 2024-11-15 14:15:39 +11:00
Tim Connors
e29a05f4ab Clarify calculations a little for #5
Ordering of ramping cases was a bit over the shop, so cleaned up.
Comment about slope definitions was out of sync.  Comment about
$demand range clarified.  Some mathematical terms bracketed to be
less ambiguous.  Fixes #5.
2024-11-15 14:11:42 +11:00
Tim Connors
be27b2e538
Update readme.md
fixes #2 .
2023-06-20 12:01:01 +10:00
Tim Connors
498629be9c
Update readme.md
Also works on R730xd
2023-06-14 18:53:20 +10:00
Tim Connors
93a1623e5e Added link to ansible module 2023-04-26 14:19:01 +10:00
Tim Connors
5cd92f2b55 Include hddtemp and upadte instructions for using it 2022-12-07 12:52:59 +11:00
Tim Connors
f2fd624c74 also run hddtemp over my nvme drives 2022-12-07 12:43:13 +11:00
Tim Connors
0cff0987e5 Discard "not available" hddtemps, eg spundown disks
For spundown scsi disks, hddtemp can report "/dev/sdg: TOSHIBA
MG04SCA60EE: S.M.A.R.T. not available"
2022-05-16 16:46:06 +10:00
Tim Connors
3c86e4f331 include some background information 2022-01-27 15:24:53 +11:00
Tim Connors
be68911f52 all files moved to top level repo directory 2021-12-13 18:11:21 +11:00
Tim Connors
a714531fdd .gitignore was extraneous 2021-12-13 18:10:56 +11:00
Tim Connors
b2beec06fb preparing to move entire contents one level down - fixed readme.txt to
include all relevant info
2021-12-13 18:10:03 +11:00
Tim Connors
a6324a1008
Update readme.md
Added installation instructions, reformatted
2021-12-13 17:58:11 +11:00
Tim Connors
ddf19529c1 Actually tested the hddtemp and sensors regexp against both debian 10 and 11 now 2021-12-08 10:50:22 +11:00
Tim Connors
506a94a402 sensors and hddtemp changed to proper unicode "°"
sensors and hddtemp changed to proper unicode "°" from ascii symbol,
but that broke the regexp.  Proxmox 7/debian 11 comes with such a fix.

Thanks /u/FreelancerJ for reporting
2021-12-07 22:17:16 +11:00
Tim Connors
0785a260e9 warn about non-numbers even when -q(uiet). 2021-12-06 22:35:25 +11:00
Tim Connors
2fcb2160d3 add "-q" flag to allow script to be quieter and suppress most
diagnostic info to STDOUT
2021-12-06 22:32:14 +11:00
Tim Connors
11bd6fa398 don't try to add non-numbers (particularly since will break the
average calcualtion), but do warn about them.
2021-12-06 22:31:37 +11:00
Tim Connors
a45d13b353 output less frequent statistics - once per minute, or when a command
is changed.  Would ideally refactor so outputs all stats rather than
just the final command when demand is changed
2021-06-20 20:52:57 +10:00
Tim Connors
5e0266ae12 hddtemp sometimes prints one drive as having a temperature as 255!
(rather than just marking it invalid some *sane* way).  Filter those
out
2021-06-19 22:01:18 +10:00
Tim Connors
9a99c112c1 rescale fan velocities after further tuning 2021-06-19 16:27:34 +10:00
Tim Connors
4fd6446e95 Included a bit more info in README.md 2021-02-02 15:55:52 +11:00
Tim Connors
3f7cdab8ff forgot to set tempfile in /tmp 2020-12-09 00:31:03 +11:00
Tim Connors
eb9ed2a82b if no valid temps, fallback to default 2020-12-08 13:40:17 +11:00
Tim Connors
c05926d433 Interpret degreeC slightly better (but not yet failsafe)
Gah! Software update or locale update, and the degree signs all
changed encoding.  Temperature overall got interpreted as 0degreeC,
which I still need to fix.
2020-12-08 13:35:18 +11:00
Tim Connors
cf3a9c347c make more robust against ipmitool failing
in default fallback case (which includes when a fault has occurred or
when the script exits) - keep retrying for a bit, and in servo case,
just allow the next loop to proceed ASAP, without resetting variables
and hysteresis
2020-11-16 12:04:56 +11:00
Tim Connors
e41c1aa38e ipmitool often fails - just keep using the previous result til it succeeds 2020-11-14 23:33:09 +11:00
Tim Connors
50cfcf0bc5 different fan curve to try to weight lower fans at more optimal temperature 2020-09-15 21:31:48 +10:00
Tim Connors
02255cc345 correct how hdd and expensive temperature tests are done 2020-09-15 20:09:18 +10:00
Tim Connors
a8b0f5ed7c be more robust against hddtemp not exiting in time because stuck in D state, and not able to be killed 2020-02-08 15:53:43 +11:00
Tim Connors
6f4ca6bbf9 add systemd service file 2020-02-08 15:47:12 +11:00