append ipmi top variables, add rc scripts
This commit is contained in:
@ -5,248 +5,248 @@ Title="Fan Control"
|
||||
<input type="hidden" name="#file" value="ipmitool-plugin/ipmitool-plugin.cfg" />
|
||||
<input type="hidden" id="FANCMD" name="#command" value="" />
|
||||
|
||||
IPMI Fan Control:
|
||||
IPMI Fan Control:
|
||||
: <select name="IPMIFAN" size="1">
|
||||
<?=mk_option($ipmifan, "disable", "No")?>
|
||||
<?=mk_option($ipmifan, "enable", "Yes")?>
|
||||
</select>
|
||||
</select><label><font class="red"><b>NOT FUNTIONAL YET</b></font></label>
|
||||
|
||||
|
||||
|
||||
<?php if ($fans[0]): ?>
|
||||
<?php if ($ipmi_fans[0]): ?>
|
||||
|
||||
<?=$fans[0];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[0];?>">
|
||||
<?=$ipmi_fans[0];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[0];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[0]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[0]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[0];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[0];?>">
|
||||
<?=$ipmi_fans[0];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[0];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[0]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[0]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[0];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[0];?>">
|
||||
<?=$ipmi_fans[0];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[0];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[0]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[0]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[1]): ?>
|
||||
<?php if ($ipmi_fans[1]): ?>
|
||||
|
||||
<?=$fans[1];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[1];?>">
|
||||
<?=$ipmi_fans[1];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[1];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[1]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[1]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[1];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[1];?>">
|
||||
<?=$ipmi_fans[1];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[1];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[1]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[1]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[1];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[1];?>">
|
||||
<?=$ipmi_fans[1];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[1];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[1]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[1]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[2]): ?>
|
||||
<?php if ($ipmi_fans[2]): ?>
|
||||
|
||||
<?=$fans[2];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[2];?>">
|
||||
<?=$ipmi_fans[2];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[2];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[2]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[2]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[2];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[2];?>">
|
||||
<?=$ipmi_fans[2];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[2];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[2]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[2]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[2];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[2];?>">
|
||||
<?=$ipmi_fans[2];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[2];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[2]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[2]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[3]): ?>
|
||||
<?php if ($ipmi_fans[3]): ?>
|
||||
|
||||
<?=$fans[3];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[3];?>">
|
||||
<?=$ipmi_fans[3];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[3];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[3]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[3]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[3];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[3];?>">
|
||||
<?=$ipmi_fans[3];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[3];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[3]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[3]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[3];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[3];?>">
|
||||
<?=$ipmi_fans[3];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[3];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[3]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[3]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[4]): ?>
|
||||
<?php if ($ipmi_fans[4]): ?>
|
||||
|
||||
<?=$fans[4];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[4];?>">
|
||||
<?=$ipmi_fans[4];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[4];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[4]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[4]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[4];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[4];?>">
|
||||
<?=$ipmi_fans[4];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[4];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[4]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[4]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[4];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[4];?>">
|
||||
<?=$ipmi_fans[4];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[4];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[4]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[4]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[5]): ?>
|
||||
<?php if ($ipmi_fans[5]): ?>
|
||||
|
||||
<?=$fans[5];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[5];?>">
|
||||
<?=$ipmi_fans[5];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[5];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[5]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[5]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[5];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[5];?>">
|
||||
<?=$ipmi_fans[5];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[5];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[5]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[5]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[5];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[5];?>">
|
||||
<?=$ipmi_fans[5];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[5];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[5]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[5]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[6]): ?>
|
||||
<?php if ($ipmi_fans[6]): ?>
|
||||
|
||||
<?=$fans[6];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[6];?>">
|
||||
<?=$ipmi_fans[6];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[6];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[6]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[6]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[6];?> Low temperature threshold:
|
||||
: <select name="<FAN_LOW_<?=$fans[6];?>">
|
||||
<?=$ipmi_fans[6];?> Low temperature threshold:
|
||||
: <select name="<FAN_LOW_<?=$ipmi_fans[6];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[6]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[6]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[6];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[6];?>">
|
||||
<?=$ipmi_fans[6];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[6];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[6]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[6]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[7]): ?>
|
||||
<?php if ($ipmi_fans[7]): ?>
|
||||
|
||||
<?=$fans[7];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[7];?>">
|
||||
<?=$ipmi_fans[7];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[7];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[7]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[7]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[7];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[7];?>">
|
||||
<?=$ipmi_fans[7];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[7];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[7]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[7]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[7];?> High temperature threshold:
|
||||
: <select name="<FAN_HIGH_<?=$fans[7];?>">
|
||||
<?=$ipmi_fans[7];?> High temperature threshold:
|
||||
: <select name="<FAN_HIGH_<?=$ipmi_fans[7];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[7]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[7]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[8]): ?>
|
||||
<?php if ($ipmi_fans[8]): ?>
|
||||
|
||||
<?=$fans[8];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[8];?>">
|
||||
<?=$ipmi_fans[8];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[8];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[8]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[8]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[8];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$fans[8];?>">
|
||||
<?=$ipmi_fans[8];?> Low temperature threshold:
|
||||
: <select name="FAN_LOW_<?=$ipmi_fans[8];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[8]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[8]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[8];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[8];?>">
|
||||
<?=$ipmi_fans[8];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[8];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[8]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[8]]);?>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($fans[9]): ?>
|
||||
<?php if ($ipmi_fans[9]): ?>
|
||||
|
||||
<?=$fans[9];?> temperature sensor:
|
||||
: <select name="FAN_<?=$fans[9];?>">
|
||||
<?=$ipmi_fans[9];?> temperature sensor:
|
||||
: <select name="FAN_<?=$ipmi_fans[9];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cfg['FAN_'.$fans[9]], true);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cfg['FAN_'.$ipmi_fans[9]], true);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[9];?> Low temperature threshold:
|
||||
: <select name="<FAN_LOW_<?=$fans[9];?>">
|
||||
<?=$ipmi_fans[9];?> Low temperature threshold:
|
||||
: <select name="<FAN_LOW_<?=$ipmi_fans[9];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('LOW', $cfg['FAN_LOW_'.$fans[9]]);?>
|
||||
<?=temp_get_options('LOW', $ipmi_cfg['FAN_LOW_'.$ipmi_fans[9]]);?>
|
||||
</select>
|
||||
|
||||
<?=$fans[9];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$fans[9];?>">
|
||||
<?=$ipmi_fans[9];?> High temperature threshold:
|
||||
: <select name="FAN_HIGH_<?=$ipmi_fans[9];?>">
|
||||
<option value='0'>Auto</option>
|
||||
<?=temp_get_options('HIGH', $cfg['FAN_HIGH_'.$fans[9]]);?>
|
||||
<?=temp_get_options('HIGH', $ipmi_cfg['FAN_HIGH_'.$ipmi_fans[9]]);?>
|
||||
</select>
|
||||
|
||||
<?php endif; ?>
|
||||
|
@ -32,5 +32,5 @@ Icon="sensorspage.png"
|
||||
|
||||
<script type="text/javascript" src="/plugins/ipmitool-plugin/js/jquery.ipmitool-plugin.js"></script>
|
||||
<script type="text/javascript" src="/plugins/tablesorter/js/jquery.tablesorter.combined.min.js"></script>
|
||||
<script type="text/javascript" src="/plugins/tablesorter/js/pager/jquery.tablesorter.pager.js"></script>
|
||||
<script type="text/javascript" src="/plugins/tablesorter/js/extras/jquery.tablesorter.pager.min.js"></script>
|
||||
<script type="text/javascript" src="/webGui/javascript/jquery.switchbutton.js"></script>
|
||||
|
@ -16,35 +16,35 @@ Enable Event Notifications:
|
||||
|
||||
Enable Remote Connection:
|
||||
: <select id="REMOTE" class="ipmievd-run" name="REMOTE" title="" size="1" onChange="checkREMOTE(this.form);">
|
||||
<?=mk_option($remote, "disable", "No");?>
|
||||
<?=mk_option($remote, "enable", "Yes");?>
|
||||
<?=mk_option($ipmi_remote, "disable", "No");?>
|
||||
<?=mk_option($ipmi_remote, "enable", "Yes");?>
|
||||
</select>
|
||||
|
||||
<label class="ipmitool-lan">IPMI IP Address:</label>
|
||||
: <input id="IPADDR" type="text" class="ipmitool-lan ipmitool-ipaddr" name="IPADDR" maxlength="40" value="<?=$ipaddr;?>" title="IPMI IP address" placeholder="" ><label class='ipmitool-lan'><?=$conn_check;?></label>
|
||||
: <input id="IPADDR" type="text" class="ipmitool-lan ipmitool-ipaddr" name="IPADDR" maxlength="40" value="<?=$ipmi_ipaddr;?>" title="IPMI IP address" placeholder="" ><label class='ipmitool-lan'><?=$ipmi_conn_check;?></label>
|
||||
|
||||
<label class="ipmitool-lan">IPMI User Name:</label>
|
||||
: <input id="USER" type="text" class="ipmitool-lan" name="USER" maxlength="40" value="<?=$user;?>" title="username for remote access IPMI" placeholder="username for remote access" >
|
||||
: <input id="USER" type="text" class="ipmitool-lan" name="USER" maxlength="40" value="<?=$ipmi_user;?>" title="username for remote access IPMI" placeholder="username for remote access" >
|
||||
|
||||
<label class="ipmitool-lan">IPMI Password:</label>
|
||||
: <input id="PASSWORD" type="password" class="ipmitool-lan" name="PASSWORD" maxlength="40" value="<?=$password;?>" title="password for remote access IPMI" placeholder="password for remote access" >
|
||||
: <input id="PASSWORD" type="password" class="ipmitool-lan" name="PASSWORD" maxlength="40" value="<?=$ipmi_password;?>" title="password for remote access IPMI" placeholder="password for remote access" >
|
||||
|
||||
Display CPU temperature:
|
||||
: <select name="CPU_TEMP">
|
||||
<option value='false'>None</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $cpu_temp);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_cpu_temp);?>
|
||||
</select>
|
||||
|
||||
Display Motherboard temperature:
|
||||
: <select name="MB_TEMP">
|
||||
<option value='false'>None</option>
|
||||
<?=ipmi_get_options($sensors, 'Temperature', $mb_temp);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Temperature', $ipmi_mb_temp);?>
|
||||
</select>
|
||||
|
||||
Display Fan speed:
|
||||
: <select name="FAN_DISP">
|
||||
<option value='false'>None</option>
|
||||
<?=ipmi_get_options($sensors, 'Fan', $fan_disp);?>
|
||||
<?=ipmi_get_options($ipmi_sensors, 'Fan', $ipmi_fan_disp);?>
|
||||
</select>
|
||||
|
||||
<input id="DEFAULT" class="ipmievd-run" type="button" value="Default" onClick="resetDATA(this.form);">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once '/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php';
|
||||
$cmd = "/usr/bin/ipmitool sel ".$_GET["options"].$options;
|
||||
exec($cmd);
|
||||
|
||||
shell_exec("/usr/bin/ipmitool sel ".$_GET["options"].$ipmi_options);
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
require_once '/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php';
|
||||
echo json_encode(ipmi_events($options));
|
||||
echo json_encode(ipmi_events($ipmi_options));
|
||||
?>
|
@ -1,41 +1,41 @@
|
||||
<?php
|
||||
/* ipmi tool variables*/
|
||||
$plugin = 'ipmitool-plugin';
|
||||
$cfg = parse_ini_file("/boot/config/plugins/$plugin/$plugin.cfg");
|
||||
$ipmievd = isset($cfg['IPMIEVD']) ? $cfg['IPMIEVD'] : "disable";
|
||||
$ipmifan = isset($cfg['IPMIFAN']) ? $cfg['IPMIFAN'] : "disable";
|
||||
$remote = isset($cfg['REMOTE']) ? $cfg['REMOTE'] : "disable";
|
||||
$ipmi_cfg = parse_ini_file("/boot/config/plugins/$plugin/$plugin.cfg");
|
||||
$ipmievd = isset($ipmi_cfg['IPMIEVD']) ? $ipmi_cfg['IPMIEVD'] : "disable";
|
||||
$ipmifan = isset($ipmi_cfg['IPMIFAN']) ? $ipmi_cfg['IPMIFAN'] : "disable";
|
||||
$ipmi_remote = isset($ipmi_cfg['REMOTE']) ? $ipmi_cfg['REMOTE'] : "disable";
|
||||
|
||||
//check running status
|
||||
$ipmievd_running = trim(shell_exec( "[ -f /proc/`cat /var/run/ipmievd.pid0 2> /dev/null`/exe ] && echo 1 || echo 0 2> /dev/null" ));
|
||||
$ipmifan_running = trim(shell_exec( "[ -f /proc/`cat /var/run/ipmifan.pid 2> /dev/null`/exe ] && echo 1 || echo 0 2> /dev/null" ));
|
||||
$running = "<span class='green'>Running</span>";
|
||||
$stopped = "<span class='orange'>Stopped</span>";
|
||||
$ipmievd_status = ($ipmievd_running) ? $running : $stopped;
|
||||
$ipmifan_status = ($ipmifan_running) ? $running : $stopped;
|
||||
$ipmi_running = "<span class='green'>Running</span>";
|
||||
$ipmi_stopped = "<span class='orange'>Stopped</span>";
|
||||
$ipmievd_status = ($ipmievd_running) ? $ipmi_running : $ipmi_stopped;
|
||||
$ipmifan_status = ($ipmifan_running) ? $ipmi_running : $ipmi_stopped;
|
||||
|
||||
// use save ip address or use local ipmi address
|
||||
$ipaddr = preg_match('/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/', $cfg['IPADDR']) ?
|
||||
$cfg['IPADDR'] :
|
||||
$ipmi_ipaddr = preg_match('/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/', $ipmi_cfg['IPADDR']) ?
|
||||
$ipmi_cfg['IPADDR'] :
|
||||
trim(shell_exec("/usr/bin/ipmitool lan print | grep 'IP Address ' | sed -n -e 's/^.*: //p'"));
|
||||
|
||||
$cpu_temp = isset($cfg['CPU_TEMP']) ? $cfg['CPU_TEMP'] : ""; // cpu temp display name
|
||||
$mb_temp = isset($cfg['MB_TEMP']) ? $cfg['MB_TEMP'] : ""; // mb temp display name
|
||||
$fan_disp = isset($cfg['FAN_DISP']) ? $cfg['FAN_DISP'] : ""; // fan speed display name
|
||||
$user = isset($cfg['USER']) ? $cfg['USER'] : ""; // user for remote access
|
||||
$password = isset($cfg['PASSWORD']) ? $cfg['PASSWORD'] : ""; // password for remote access
|
||||
$ipmi_cpu_temp = isset($ipmi_cfg['CPU_TEMP']) ? $ipmi_cfg['CPU_TEMP'] : ""; // cpu temp display name
|
||||
$ipmi_mb_temp = isset($ipmi_cfg['MB_TEMP']) ? $ipmi_cfg['MB_TEMP'] : ""; // mb temp display name
|
||||
$ipmi_fan_disp = isset($ipmi_cfg['FAN_DISP']) ? $ipmi_cfg['FAN_DISP'] : ""; // fan speed display name
|
||||
$ipmi_user = isset($ipmi_cfg['USER']) ? $ipmi_cfg['USER'] : ""; // user for remote access
|
||||
$ipmi_password = isset($ipmi_cfg['PASSWORD']) ? $ipmi_cfg['PASSWORD'] : ""; // password for remote access
|
||||
|
||||
// options for remote access or not
|
||||
$options = ($remote == "enable") ? "-I lanplus -H '$ipaddr' -U '$user' -P '".
|
||||
base64_decode($password)."'" : "";
|
||||
$ipmi_options = ($ipmi_remote == "enable") ? "-I lanplus -H '$ipmi_ipaddr' -U '$ipmi_user' -P '".
|
||||
base64_decode($ipmi_password)."'" : "";
|
||||
|
||||
// Get sensor info and check connection if remote enabled
|
||||
$sensors = ipmi_sensors($options);
|
||||
$fans = ipmi_get_fans($sensors);
|
||||
$ipmi_sensors = ipmi_sensors($ipmi_options);
|
||||
$ipmi_fans = ipmi_get_fans($ipmi_sensors);
|
||||
|
||||
if($remote == "enable"){
|
||||
$conn = ($sensors) ? true : false;
|
||||
$conn_check = ($conn) ? "Connection successful" : "Connection failed";
|
||||
if($ipmi_remote == "enable"){
|
||||
$ipmi_conn = ($ipmi_sensors) ? true : false;
|
||||
$ipmi_conn_check = ($ipmi_conn) ? "Connection successful" : "Connection failed";
|
||||
}
|
||||
|
||||
/* get an array of all sensors and their values */
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
require_once '/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php';
|
||||
echo json_encode(ipmi_sensors($options));
|
||||
echo json_encode(ipmi_sensors($ipmi_options));
|
||||
?>
|
@ -1,23 +1,23 @@
|
||||
<?
|
||||
require_once '/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php';
|
||||
|
||||
function ipmi_temp($reading, $unit, $dot) {
|
||||
function format_ipmi_temp($reading, $unit, $dot) {
|
||||
return ($reading>0 ? ($unit=='F' ? round(9/5*$reading+32) : str_replace('.',$dot,$reading)) : '##')." $unit";
|
||||
}
|
||||
|
||||
if ($cpu_temp || $mb_temp || $fan_disp){
|
||||
$readings = ipmi_get_reading([$cpu_temp, $mb_temp, $fan_disp], $options);
|
||||
$temps = [];
|
||||
if ($ipmi_cpu_temp || $ipmi_mb_temp || $ipmi_fan_disp){
|
||||
$ipmi_readings = ipmi_get_reading([$ipmi_cpu_temp, $ipmi_mb_temp, $ipmi_fan_disp], $ipmi_options);
|
||||
$ipmi_temps = [];
|
||||
|
||||
if ($readings[$cpu_temp])
|
||||
$temps[] = "<img src='/plugins/$plugin/icons/cpu.png' title='$cpu_temp' class='icon'>".ipmi_temp($readings[$cpu_temp], $_GET['unit'], $_GET['dot']);
|
||||
if ($ipmi_readings[$ipmi_cpu_temp])
|
||||
$ipmi_temps[] = "<img src='/plugins/$plugin/icons/cpu.png' title='$ipmi_cpu_temp' class='icon'>".format_ipmi_temp($ipmi_readings[$ipmi_cpu_temp], $_GET['unit'], $_GET['dot']);
|
||||
|
||||
if ($readings[$mb_temp])
|
||||
$temps[] = "<img src='/plugins/$plugin/icons/mb.png' title='$mb_temp' class='icon'>".ipmi_temp($readings[$mb_temp], $_GET['unit'], $_GET['dot']);
|
||||
if ($ipmi_readings[$ipmi_mb_temp])
|
||||
$ipmi_temps[] = "<img src='/plugins/$plugin/icons/mb.png' title='$ipmi_mb_temp' class='icon'>".format_ipmi_temp($ipmi_readings[$ipmi_mb_temp], $_GET['unit'], $_GET['dot']);
|
||||
|
||||
if ($readings[$fan_disp])
|
||||
$temps[] = "<img src='/plugins/$plugin/icons/fan.png' title='$fan_disp' class='icon'>".$readings[$fan_disp]." rpm";
|
||||
if ($ipmi_readings[$ipmi_fan_disp])
|
||||
$ipmi_temps[] = "<img src='/plugins/$plugin/icons/fan.png' title='$ipmi_fan_disp' class='icon'>".$ipmi_readings[$ipmi_fan_disp]." rpm";
|
||||
}
|
||||
if ($temps)
|
||||
echo "<span id='temps' style='margin-right:16px'>".implode(' ', $temps)."</span>";
|
||||
if ($ipmi_temps)
|
||||
echo "<span id='temps' style='margin-right:16px'>".implode(' ', $ipmi_temps)."</span>";
|
||||
?>
|
@ -1,36 +1,4 @@
|
||||
#!/bin/sh
|
||||
# read our configuration
|
||||
DAEMON="/usr/sbin/ipmievd"
|
||||
IPMITAIL="/usr/local/emhttp/plugins/ipmitool-plugin/scripts/ipmitail"
|
||||
LOCKFILE="/var/lock/ipmievd"
|
||||
PIDFILE="/var/run/ipmievd.pid0"
|
||||
CONFIG="/boot/config/plugins/ipmitool-plugin/ipmitool-plugin.cfg"
|
||||
OPTIONS=""
|
||||
|
||||
if [ -e $CONFIG ]; then
|
||||
source $CONFIG
|
||||
if [ $IPMIEVD == "enable" ]; then
|
||||
# no-op if already running
|
||||
if [ ! -r $PIDFILE ]; then
|
||||
if [ $REMOTE == "enable" ]; then
|
||||
OPTIONS="-I lanplus -H $IPADDR -U $USER -P $(echo $PASSWORD | base64 --decode)"
|
||||
fi
|
||||
sleep 1
|
||||
|
||||
nohup $DAEMON sel $OPTIONS > /dev/null 2>&1 | logger -tipmitool &
|
||||
touch $LOCKFILE
|
||||
TIMER=0
|
||||
while [ ! -e $PIDFILE ]; do
|
||||
sleep 1
|
||||
let TIMER=$TIMER+1
|
||||
if [ $TIMER -gt 5 ]; then
|
||||
echo -n "$PIDFILE not created"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -r $PIDFILE ]; then
|
||||
nohup $IPMITAIL >/dev/null 2>&1 < /dev/null &
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
/etc/rc.d/rc.ipmievd start
|
||||
sleep 1
|
||||
/etc/rc.d/rc.ipmitail start
|
||||
|
@ -1,30 +1,4 @@
|
||||
#!/bin/sh
|
||||
DAEMON="ipmievd"
|
||||
TAIL="ipmitail"
|
||||
LOCKFILE="/var/lock/$DAEMON"
|
||||
PIDFILE="/var/run/$DAEMON.pid0"
|
||||
|
||||
# no-op if not running
|
||||
if [ -r $PIDFILE ]; then
|
||||
TIMER=0
|
||||
while `killall $DAEMON 2>/dev/null`; do
|
||||
sleep 1
|
||||
TIMER=$((TIMER+1))
|
||||
if [ $TIMER -ge 30 ]; then
|
||||
killall -9 $DAEMON
|
||||
sleep 1
|
||||
break
|
||||
fi
|
||||
done
|
||||
TIMER=0
|
||||
while `killall $TAIL 2>/dev/null`; do
|
||||
sleep 1
|
||||
TIMER=$((TIMER+1))
|
||||
if [ $TIMER -ge 30 ]; then
|
||||
killall -9 $TAIL
|
||||
sleep 1
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm -f $LOCKFILE && rm -f $PIDFILE
|
||||
fi
|
||||
/etc/rc.d/rc.ipmievd stop
|
||||
sleep 1
|
||||
/etc/rc.d/rc.ipmitail stop
|
||||
|
Reference in New Issue
Block a user