I know this may be one of the goofiest posts in a while, but I just had an experience that left me wide-eyed.
I use Webmin as my server management tool. It's often the most resource-hungry program running on my computer (xrdp runs a close second) but since I have 2 x Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 24 cores I don't usually see much CPU utilization. Until today.
I recently decided (on the recommendation of some posters here) to migrate my media server from Plex to Jellyfin. At the time, I decided my directory and file structure could stand a little better organization, so I started moving scads of folders around, moving files from one place to another, disabled journaling on an HFS+ disk, and all the while kept Plex running while I set up Jellyfin.
Holy tachometer, Batman! I saw the CPU usage in Webmin running in the 75%-85% range, and at one time it spiked into the 90s, even touching 99% at one time! Rather than be alarmed (well, I was mildly astounded) I thought to myself, "Finally! All that CPU power is finally being put to use!" I even heard the server's fans kick in--now that's some CPU workload going on there!
It didn't last long (and I think it speaks well of Jellyfin to update its metadata as things change!). But it was fun while it lasted!
Early on after I built my server, I had an issue with temperature and fan control. I installed a utility, [ipmitool](How to Install IPMItool on Ubuntu & Rocky Linux) and built a few scripts trying to get the monitoring and fan activation I wanted. I now have a cron job that runs a check every five minutes, and activates the fans if the temperature threshold is reached
#!/bin/bash
# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed too high send the raw IPMI command to enable dynamic fan control.
#
# Requires:
# ipmitool – apt-get install ipmitool
# slacktee.sh – https://github.com/course-hero/slacktee
# ----------------------------------------------------------------------------------
# IPMI SETTINGS:
# Modify to suit your needs.
# DEFAULT IP: 192.168.0.120
IPMIHOST=192.168.1.199
IPMIUSER=root
IPMIPW=xxxxxx
IPMIEK=0000000000000000000000000000000000000000
# TEMPERATURE
# Change this to the temperature in celcius you are comfortable with.
# If the temperature goes above the set degrees it will send raw IPMI command to enable dynamic fan control
# MAXTEMP=27
MAXTEMP=31
# This variable sends a IPMI command to get the temperature, and outputs it as two digits.
# Do not edit unless you know what you do.
# TEMP=$(ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK sdr type temperature |grep Ambient |grep degrees |grep -Po '\d{2}' | tail -1)
TEMP=$(ipmitool sdr type temperature | grep Ambient | grep degrees | grep -Po '\d{2}' | tail -1)
if [[ $TEMP > $MAXTEMP ]];
then
printf "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
# echo "Warning: Temperature is too high! Activating dynamic fan control! ($TEMP C)" | /usr/bin/slacktee.sh -t "R710-IPMI-TEMP [$(hostname)]"
# ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x01
ipmitool raw 0x30 0x30 0x01 0x01
touch /tmp/temptoken
else
# healthchecks.io
# curl -fsS --retry 3 https://hchk.io/XXX >/dev/null 2>&1
printf "Temperature is OK ($TEMP C)" | systemd-cat -t R710-IPMI-TEMP
# echo "Temperature is OK ($TEMP C)"
if [ -f /tmp/temptoken ]; then
/usr/local/bin/R710-IPMIStatic.sh
rm /tmp/temptoken
fi
fi