Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 3: Line 3:     
==Uninterruptable Power Supply==
 
==Uninterruptable Power Supply==
 +
 
{{Level|Advanced}}
 
{{Level|Advanced}}
   Line 581: Line 582:  
  man upsd
 
  man upsd
 
  man nutupsdrv
 
  man nutupsdrv
 +
 +
==Timeout Issues==
 +
 +
If you have comms problems like this you can add a custom timeout:
 +
 +
"USBDEVFS_CONTROL failed cmd blazer_usb rqt 33 rq 9 len 8 ret -110"
 +
 +
Add a new config item. The default is 2
 +
 +
config setprop nut pollInterval 4
 +
 +
Modify the template
 +
 +
mkdir -p /etc/e-smith/templates-custom/etc/ups/ups.conf
 +
cp /etc/e-smith/templates/etc/ups/ups.conf/UPS /etc/e-smith/templates-custom/etc/ups/ups.conf/UPS
 +
nano /etc/e-smith/templates-custom/etc/ups/ups.conf/UPS
 +
 +
Add the bits between the # comments
 +
 +
{
 +
    my $model = $nut{Model} || "usbhid-ups";
 +
    my $device = $nut{Device} || "/var/lib/ups/hiddev0";
 +
    my $type = $nut{Type};
 +
    my $mfr = $nut{mfr};
 +
    my $mdl = $nut{mdl};
 +
 +
    # Add this
 +
    my $poll = $nut{pollInterval} || '2';
 +
    if ($poll ne '2') {
 +
      $OUT .= "pollinterval = $poll\n";
 +
    }
 +
    # ends here
 +
 +
    $OUT .= "[UPS]\n";
 +
    $OUT .= "\tdriver = $model\n";
 +
 +
expand-template /etc/ups/ups.conf
 +
cat /etc/ups/ups.conf
 +
 +
You should see something like this:
 +
 +
# Copyright (C) 1999-2006 Mitel Networks Corporation
 +
#------------------------------------------------------------
 +
pollinterval = 4
 +
[UPS]
 +
 +
Restart nut
 +
 +
service nut restart
 +
 +
Now check to see the correct timeout:
 +
 +
upsc UPS | grep driver.parameter.pollinterval
 +
 +
driver.parameter.pollinterval: 4
 +
 +
To reset either delete the key, or set it to the default of 2
 +
 +
==Further reading==
    
The NUT website is here: [http://www.networkupstools.org/ NUT]
 
The NUT website is here: [http://www.networkupstools.org/ NUT]

Navigation menu