Unraid-SlackPack/plugins/ipmi.plg

332 lines
9.5 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-05-15 09:08:41 +00:00
<!ENTITY version "2016.05.15">
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-05-15 09:08:41 +00:00
###2016.05.15
- fix: condense code, remove excess files
2016-05-15 09:55:19 +00:00
- fix: allow negative sensor readings in the footer
2016-05-15 09:08:41 +00:00
- fix: readings page buttons alignment
- fix: sensors refresh rate first time dash or readings page is loaded
- add: update ipmi check method and network checks
- 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-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.
-->
<FILE Name="/boot/config/plugins/tablesorter/tablesorter-2016.02.12-x86_64-1.txz" Run="/sbin/upgradepkg --install-new">
<URL>&gitURL;/archive/tablesorter-2016.02.12-x86_64-1.txz</URL>
<MD5>d25fb1235efaa5f71c790b8d71ed7337</MD5>
</FILE>
<!--
This plugin uses freeipmi to display sensor readings
-->
2016-03-25 04:53:32 +00:00
<FILE Name="&plgPATH;/freeipmi-1.4.11-x86_64-3.txz">
2016-03-14 04:47:01 +00:00
<URL>&pkgURL;/freeipmi-1.4.11-x86_64-3.txz</URL>
2016-03-14 04:45:34 +00:00
<MD5>6c7839886f7c7b0cc4947aaf6199d60e</MD5>
2016-03-08 22:32:04 +00:00
</FILE>
2016-03-25 04:53:32 +00:00
<FILE Name="&plgPATH;/freeipmi-1.5.1-x86_64-1.txz">
<URL>&pkgURL;/freeipmi-1.5.1-x86_64-1.txz</URL>
<MD5>f9df6ccd8c231e937ac4a8459ae91330</MD5>
2016-03-12 05:59:49 +00:00
</FILE>
2016-03-08 22:32:04 +00:00
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"
]]>
</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>
2016-05-10 17:05:28 +00:00
<!--
The 'boards' json file.
-->
<FILE Name="&plgPATH;/boards.json">
<URL>&gitURL;/plugins/boards.json</URL>
</FILE>
2016-03-08 22:32:04 +00:00
<!--
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
if [[ $VER == 6.1 ]]; then
echo "\nInstalling dependencies for unRAID 6.1"
2016-05-10 17:05:28 +00:00
rm &plgPATH;/freeipmi-1.5.1-x86_64-1.txz
2016-03-25 05:17:57 +00:00
upgradepkg --install-new &plgPATH;/freeipmi-1.4.11-x86_64-3.txz
2016-03-25 04:53:32 +00:00
fi
if [[ $VER == 6.2 ]]; then
echo "\nInstalling dependencies for unRAID 6.2"
2016-05-10 17:05:28 +00:00
rm &plgPATH;/freeipmi-1.4.11-x86_64-3.txz
2016-03-25 05:17:57 +00:00
upgradepkg --install-new &plgPATH;/freeipmi-1.5.1-x86_64-1.txz
2016-03-25 04:53:32 +00:00
fi
2016-03-12 06:28:23 +00:00
upgradepkg --install-new &plgPATH;/&plgNAME;.txz
2016-03-08 22:32:04 +00:00
2016-03-12 05:59:49 +00:00
# Load impi drivers
2016-05-10 17:05:28 +00:00
echo "checking ipmi drivers..."
for module in ipmi_msghandler ipmi_devintf ipmi_si; do
modprobe $module
done
2016-03-12 05:59:49 +00:00
# Start scripts if enabled
<![CDATA[
2016-05-10 17:05:28 +00:00
echo "checking ipmi event monitor..."
2016-03-12 05:59:49 +00:00
/etc/rc.d/rc.ipmiseld start >/dev/null 2>&1 < /dev/null &
sleep 1
2016-05-10 17:05:28 +00:00
echo "checking ipmi system log tail..."
2016-03-12 05:59:49 +00:00
setsid /etc/rc.d/rc.ipmitail start >/dev/null 2>&1 < /dev/null &
sleep 1
2016-05-10 17:05:28 +00:00
echo "checking ipmi fan control..."
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
]]>
# 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
echo "unloading ipmi drivers..."
2016-05-10 17:05:28 +00:00
for module in ipmi_msghandler ipmi_devintf ipmi_si; do
modprobe -r $module
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>