Unraid-SlackPack/plugins/ipmi.plg

390 lines
12 KiB
Plaintext
Raw Normal View History

2016-03-08 22:32:04 +00:00
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "ipmi">
<!ENTITY author "dmacias72">
2016-10-24 07:14:39 +00:00
<!ENTITY version "2016.10.24">
2016-03-08 22:32:04 +00:00
<!ENTITY launch "Settings/IPMI">
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
<!ENTITY pkgURL "&gitURL;/source/packages">
<!ENTITY plgPATH "/boot/config/plugins/&name;">
<!ENTITY plgNAME "&name;-&version;-x86_64-1">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;">
<CHANGES>
2016-10-23 02:04:40 +00:00
##&name;
###&version;
2016-10-24 07:14:39 +00:00
- update codemirror for sensor and config editor
- add: search and replace functions for config editor
###2016.10.22
2016-10-22 14:11:23 +00:00
- fix: min/max version in plugin
2016-10-20 04:28:36 +00:00
###2016.10.19
- fix: min/max version in plugin
- fix: cached board status set add unknown
2016-10-18 03:39:23 +00:00
###2016.10.17
- fix: board not recognized and fancontrol disbaled
2016-10-12 08:12:07 +00:00
###2016.10.12
- fix: load kernel driver
2016-10-10 12:00:30 +00:00
###2016.10.10
- fix: plugin file
2016-10-10 04:24:58 +00:00
###2016.10.09
2016-10-10 12:00:30 +00:00
- fix: quiet modprobe
2016-10-10 04:24:58 +00:00
- update for min/max and 6.3
2016-10-08 00:28:48 +00:00
###2016.10.07a
- fix: add padding to single digit percentage for fan log
2016-10-08 00:15:43 +00:00
###2016.10.07
- fix: fan page showing config missing for fan when it's not
2016-10-06 05:07:23 +00:00
###2016.10.06a
- fix: array_key_error on fans page
2016-10-06 04:48:30 +00:00
###2016.10.06
2016-10-06 04:19:25 +00:00
- add: update to freeipmi-1.5.3
- add: automatic system specific configuration of ipmi fans for ASRock boards
- fix: move boards.json to board.json
- fix: cache board type to speed up settings page
- fix: minor fixes, cleanup and remove depreciated code
- fix: css affecting dashboard
- fix: unRaid 6.3 compatibility
2016-09-29 05:56:13 +00:00
###2016.09.29
- fix: remove quotes from OEM Reserved readings
2016-09-28 16:28:25 +00:00
###2016.09.28a
- add: show readings for OEM Reserved in dashboard
- add: ability to select OEM Reserved to display in footer
2016-09-28 07:27:13 +00:00
###2016.09.28
2016-09-28 16:28:25 +00:00
- add: show readings for OEM Reserved e.g. Supermicro temp readings
2016-09-28 07:38:28 +00:00
- fix: hard drives reading showing 0 when spun down
2016-09-20 18:02:03 +00:00
###2016.09.20
- fix: inaccurate error when running fancontrol while disabled
2016-09-16 16:34:03 +00:00
###2016.09.16
- update tablesorter to 2.27.6
2016-07-22 19:36:51 +00:00
###2016.07.22
- fix: fan control not setting fans to auto when stopped
- fix: fan control not setting fan min (only setting a value of 1)
- fix: fan log percentage 0% when fan min is used
- thanks to piotrasd for the testing
2016-05-17 20:23:52 +00:00
###2016.05.17
2016-05-17 20:29:11 +00:00
- notice: with the latest update you will need to reconfigure your fan control settings
- fix: convert fan control settings to name based instead of number based (you'll need to setup fancontrol again)
2016-05-17 20:23:52 +00:00
- fix: workaround for dynamix plugin update api not refreshing after update (remove update message)
- fix: workaround for dynamix drop down checklists bug (F5 on other tab breaks ddcl)
- fix: refresh Settings tab on tab1 click for ddcl bug
2016-09-16 20:39:44 +00:00
- fix: check for board manufacturer
- add: remove auto board.json update and add manual Check for Updates button
2016-05-17 20:23:52 +00:00
- add: update fan logging: add start/stop messages and fan speed changes are in the form Fan Name(%):Temp Sensor(°C)
- add: ignored sensors to fan control page
- add: ignored sensors and command line arguments to CL helper scripts: ipmisensors, ipmisel and ipmifru
- add: Dashboard settings for all sensors, deselect all to disable Dashboard
- remove: Dashboard switch and types
2016-05-16 07:23:44 +00:00
###2016.05.16
- add: Dashboard will show any sensor if state is not nominal
- fix: Dashboard summary switch default to On
- fix: no sensors if localhost and network enabled
- fix: no sensors displayed if ignore is empty Thanks to ljm42
- fix: remove depreciated network check in footer display Thanks ljm42
2016-05-15 09:08:41 +00:00
###2016.05.15
- fix: condense code, remove excess files
- fix: readings page buttons alignment
- fix: sensors refresh rate first time dash or readings page is loaded
2016-05-16 07:23:44 +00:00
- add: update ipmi check method and network checks (move into fuctions)
2016-05-15 09:08:41 +00:00
- add: color to sensor readings in footer based on sensor state
- add: tablesorter reset for all tables (1st click is ascending, 2nd is descending and third 3rd is unsorted)
- add: settings drop down check list for sensor select and ignore
- add: settings drop down check list for Dashboard sensor type (uncheck all: hides IPMI Dashboard Summary)
- add: Dashboard summary page and hide switch
- fix: motherboard logos not showing
2016-05-11 00:54:45 +00:00
###2016.05.10a
- fix: local ipmi check Thanks to ljm42
2016-05-10 17:05:28 +00:00
###2016.05.10
2016-05-17 20:23:52 +00:00
- add: CL helper scripts ipmisensors and ipmisel that use network settings if network is enabled
2016-05-15 09:08:41 +00:00
- add: motherboard logos
2016-05-10 17:05:28 +00:00
- add: ability to use any fan or temp sensor in footer
- add: settings and readings tabs to Settings and Tools menu
- add: ipmi sensors configuration to readings page
- add: ipmi system configuration editor to settings page
- add: ability to edit, save and load on boot ipmi sensor configuration e.g. sensor thresholds
- add: help button text
- add: Dynamix plugin update API
- add: ipmi fan control for ASRock boards only
- (based on fans being named: CPU_FAN1, CPU_FAN2, REAR_FAN1, REAR_FAN2, FRNT_FAN1, FRNT_FAN2)
- add: select fan control ip address
- add: advanced view for fan control options
- fix: show separate status on each settings page
- add: highest array hard drive temp as a sensor
- add: abbreviated units to readings, change units column to type column
- fix: reduce footer footprint
- fix: network options
###2016.04.27
2016-04-28 13:47:45 +00:00
- fix: network timeout
2016-03-27 06:23:29 +00:00
###2016.03.27
- fix: add check for valid date
2016-03-27 05:18:32 +00:00
###2016.03.26
- fix: change date format function
2016-03-25 05:55:10 +00:00
###2016.03.25
- fix: archived events page update on event delete
- fix: archived events with same timestamp
2016-03-25 06:10:52 +00:00
- fix: archived events tablesorter pager
2016-03-25 04:53:32 +00:00
###2016.03.24
- update for 6.2 to freeipmi 1.5.1
- new installs on 6.2 will work fine
- 6.2 users with previous install will need to reboot or install libgcrypt-1.6.5 (temporarily) to use freipmi 1.5.1
- libgcrypt-1.6.5 is included with unRAID 6.2 and previous versions downgraded it to 1.5.5 to use freeipmi 1.4.11
2016-03-25 05:17:57 +00:00
- http://ftp.slackware.com/pub/slackware/slackware64-current/slackware64/n/libgcrypt-1.6.5-x86_64-1.txz
2016-03-25 04:53:32 +00:00
- fix: bug local ipmi timeout webgui to wait for ipmi (only affected systems without local ipmi)
2016-03-25 05:55:10 +00:00
- changed backup events to archived events
- add archived event page and switch
2016-03-14 04:34:43 +00:00
###2016.03.14
2016-03-25 04:53:32 +00:00
- update freeipmi 1.4.11 package remove init.d
2016-03-14 04:34:43 +00:00
- fix virtual machines not auto starting due to /etc/init.d directory created by freeipmi package
2016-03-13 04:51:45 +00:00
###2016.03.13
- add test button for sending sample notification events
- move ID column to advanced
- fix temp units not showing in footer
- add backup switch to backup events when clearing them
2016-03-12 07:46:47 +00:00
###2016.03.12
- converted to using freeipmi instead of ipmitool
- add support for multiple ipmi hosts local, network or both together
- add an extra fan display so you have 2 temp and 2 fan in footer
2016-03-13 04:51:45 +00:00
- add different warning levels based on event state
- fix race condition on reading of sensors and events
2016-03-12 07:46:47 +00:00
- add highlights and filters to tables
- add settings button to readings page and reading button to settings page
- add polling time to event monitoring
- code optimizations
2016-03-08 22:32:04 +00:00
###2016.02.22
- fix: advanced changed to fixed instead of toggle
###2016.02.15a
- fix: array combine error for sensors with non uniform data
###2016.02.15
- update tablesorter
- add: fan control page and status
- fan control Not functional yet
- add: settings for temps and fan display
- add: temp and fans readings to footer
- move event daemon start and stop functions to rc scripts
- remove daemon start and stop with array
- move daemon start process to plugin install
- move daemon stop process to rc.local_shutdown
###2016.01.17
- add tablesorter as a separate package
- fix values outside of critical showing green
- add icons instead of switches
- minor code changes
###2015.12.30
- remove old plugin directory on install
###2015.12.20
- fixed "Waiting for events" triggering notification on system start
- reorganize events page
- add switchbuttons
- move from UnRAID OS to System Information under Tools menu
- add unRAID version check
###2015.12.14
- make sure and remove old plugin
###2015.12.11
- change repo
- change install and remove method
###2015.11.17
- fix permissions for events
###2015.11.10b
- deleted wrong page file
###2015.11.10
- stop event monitoring on plugin removal
###2015.11.09
- minor bug fixes
###2015.11.08
- add settings page
- add event notifications
- add remote IPMI access
###2015.08.15
- update for unRAID 6.1-rc+ only
###2015.05.07a
- fix bug
###2015.05.07
- initial unRAID 6 release.
</CHANGES>
<!--
The 'tablesorter' package file.
-->
2016-09-16 16:34:03 +00:00
<FILE Name="/boot/config/plugins/tablesorter/tablesorter-2.27.6-x86_64-1.txz" Run="/sbin/upgradepkg --install-new">
<URL>&gitURL;/archive/tablesorter-2.27.6-x86_64-1.txz</URL>
<MD5>ead9fb4c4a317e7d6426b3521f0e0c0b</MD5>
2016-03-08 22:32:04 +00:00
</FILE>
<!--
This plugin uses freeipmi to display sensor readings
-->
2016-10-10 04:24:58 +00:00
<FILE Name="&plgPATH;/freeipmi-1.5.3-x86_64-1.txz" Min="6.2" Run="/sbin/upgradepkg --install-new">
2016-10-06 04:19:25 +00:00
<URL>&pkgURL;/freeipmi-1.5.3-x86_64-1.txz</URL>
<MD5>1aa566b9a1c0561b82f27118ee3d8f14</MD5>
2016-03-12 05:59:49 +00:00
</FILE>
2016-03-08 22:32:04 +00:00
2016-10-22 14:11:23 +00:00
<FILE Name="&plgPATH;/freeipmi-1.4.11-x86_64-3.txz" Min="6.1" Max="6.1.99" Run="/sbin/upgradepkg --install-new">
2016-10-10 04:24:58 +00:00
<URL>&pkgURL;/freeipmi-1.4.11-x86_64-3.txz</URL>
<MD5>6c7839886f7c7b0cc4947aaf6199d60e</MD5>
</FILE>
2016-05-10 17:05:28 +00:00
<!--
The 'plugin' config file.
-->
2016-03-08 22:32:04 +00:00
<FILE Name="&plgPATH;/&name;.cfg">
<INLINE>
<![CDATA[
2016-05-10 17:05:28 +00:00
IPMISELD="disable"
IPMIPOLL="60"
2016-03-08 22:32:04 +00:00
NETWORK="disable"
LOCAL="disable"
IPADDR=""
USER=""
2016-05-10 17:05:28 +00:00
PASSWORD=""
DISP_SENSOR1="0"
DISP_SENSOR2="0"
DISP_SENSOR1="0"
DISP_SENSOR2="0"
LOADCFG="disable"
2016-05-16 07:23:44 +00:00
DASHTYPES=""
IGNORE=""
2016-05-10 17:05:28 +00:00
]]>
</INLINE>
</FILE>
<!--
The 'plugin' fan config file.
-->
<FILE Name="&plgPATH;/fan.cfg">
<INLINE>
<![CDATA[
FANCONTROL="disable"
FANPOLL="3"
FANIP=""
2016-03-12 05:59:49 +00:00
IPMIBOARD=""
2016-03-08 22:32:04 +00:00
]]>
</INLINE>
</FILE>
<!--
The 'plugin' package file.
-->
<FILE Name="&plgPATH;/&plgNAME;.txz">
<URL>&gitURL;/archive/&plgNAME;.txz</URL>
</FILE>
<!--
The 'plugin' package MD5 hash.
-->
<FILE Name="&plgPATH;/&plgNAME;.md5">
<URL>&gitURL;/archive/&plgNAME;.md5</URL>
</FILE>
<!--
The 'install' script.
-->
<FILE Run="/bin/bash" Method="install">
<INLINE>
#Verify unRAID Version
source /etc/unraid-version
2016-03-25 04:53:32 +00:00
VER=${version:0:3}
if [[ $VER == 6.0 ]]; then
2016-03-08 22:32:04 +00:00
echo "unRAID version 6.1 or higher is required"
exit 1
fi
# Verify and install plugin package
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "Wrong 'plugin' package md5 hash."
rm &plgPATH;/&plgNAME;.txz \
&plgPATH;/&plgNAME;.md5
exit 1
else
2016-03-25 04:53:32 +00:00
2016-09-16 20:39:44 +00:00
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
2016-03-08 22:32:04 +00:00
2016-10-06 04:40:42 +00:00
if [ -e "/boot/config/plugins/ipmi/boards.json" ]; then
2016-10-06 04:45:55 +00:00
mv &plgPATH;/boards.json &plgPATH;/board.json
2016-10-12 08:12:07 +00:00
fi
2016-10-10 04:24:58 +00:00
# Load impi drivers
echo "loading ipmi drivers..."
for module in ipmi_msghandler ipmi_devintf ipmi_si; do
2016-10-10 12:00:30 +00:00
modprobe -q $module
2016-10-10 04:24:58 +00:00
done
2016-10-12 08:12:07 +00:00
2016-10-10 12:00:30 +00:00
<![CDATA[
2016-10-10 04:24:58 +00:00
# Start scripts if enabled
2016-09-16 20:39:44 +00:00
echo "checking ipmi event monitor..."
/etc/rc.d/rc.ipmiseld start >/dev/null 2>&1 < /dev/null &
sleep 1
echo "checking ipmi system log tail..."
setsid /etc/rc.d/rc.ipmitail start >/dev/null 2>&1 < /dev/null &
sleep 1
echo "checking ipmi fan control..."
2016-09-20 18:02:03 +00:00
setsid /usr/sbin/ipmifan --quit > /dev/null 2>&1 &
2016-09-16 20:39:44 +00:00
sleep 1
setsid /usr/sbin/ipmifan --daemon &
sleep 1
echo "checking ipmi sensors configuration..."
setsid /etc/rc.d/rc.ipmicfg commit &
sleep 1
]]>
2016-03-12 05:59:49 +00:00
2016-09-16 20:39:44 +00:00
# Cleaning old source files
find &plgPATH;/ -type f -iname "&name;*.txz" ! -iname "*&version;*" -delete
find &plgPATH;/ -type f -iname "&name;*.md5" ! -iname "*&version;*" -delete
2016-03-08 22:32:04 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo " This plugin requires Dynamix webGui to operate"
2016-03-25 04:53:32 +00:00
echo " Copyright 2016, &author;"
2016-03-08 22:32:04 +00:00
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
fi
</INLINE>
</FILE>
<!--
The 'remove' script.
-->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
#stop daemon
/etc/rc.d/rc.ipmiseld stop
sleep 1
/etc/rc.d/rc.ipmitail stop
sleep 1
2016-05-10 17:05:28 +00:00
echo "stopping ipmi fan control..."
sleep 1
/usr/sbin/ipmifan --quit
sleep 1
2016-03-08 22:32:04 +00:00
2016-03-25 10:50:16 +00:00
rm -rf &plgPATH;/libgcrypt*.txz
2016-03-08 22:32:04 +00:00
removepkg &plgPATH;/*.txz
rm -rf &emhttp;
rm -f &plgPATH;/*.txz \
&plgPATH;/*.md5
2016-09-16 20:39:44 +00:00
2016-03-08 22:32:04 +00:00
echo "unloading ipmi drivers..."
2016-05-10 17:05:28 +00:00
for module in ipmi_msghandler ipmi_devintf ipmi_si; do
2016-09-16 20:39:44 +00:00
modprobe -r $module
2016-05-10 17:05:28 +00:00
done
2016-03-08 22:32:04 +00:00
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been removed."
echo " Copyright 2016, &author;"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>
2016-03-25 10:50:16 +00:00
</PLUGIN>