Line 3: |
Line 3: |
| | | |
| ==Uninterruptable Power Supply== | | ==Uninterruptable Power Supply== |
| + | |
| {{Level|Advanced}} | | {{Level|Advanced}} |
| | | |
Line 37: |
Line 38: |
| ====Serial Connection==== | | ====Serial Connection==== |
| | | |
− | <ol></li><li>Find the configuration details for your model of UPS. Refer to: http://www.networkupstools.org/stable-hcl.html and make note of the driver name and upstype number (if any) in the third column. | + | <ol><li>Find the configuration details for your model of UPS. Refer to: http://www.networkupstools.org/stable-hcl.html and make note of the driver name and upstype number (if any) in the third column. |
| | | |
| {{Warning box|Always use the serial cable supplied with the UPS. Standard serial cables won't work with a serial UPS and have been known to cause damage to the UPS. Pay particular attention to any references to cable in in the UPS Model column.}} | | {{Warning box|Always use the serial cable supplied with the UPS. Standard serial cables won't work with a serial UPS and have been known to cause damage to the UPS. Pay particular attention to any references to cable in in the UPS Model column.}} |
| | | |
| </li><li>From the console issue the following commands: | | </li><li>From the console issue the following commands: |
− |
| |
| config setprop nut Model <model> | | config setprop nut Model <model> |
| config setprop nut Device <device> | | config setprop nut Device <device> |
Line 311: |
Line 311: |
| Issuing commands could shutdown your server unexpectedly!}} | | Issuing commands could shutdown your server unexpectedly!}} |
| | | |
− | <headertabs/> | + | <headertabs /> |
| | | |
| =Scheduling Events= | | =Scheduling Events= |
Line 581: |
Line 581: |
| 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] |
Line 596: |
Line 655: |
| | | |
| Nut is a Software well documented, you can find the [http://www.networkupstools.org/docs/user-manual.chunked/index.html TOC here] and with [http://www.networkupstools.org/docs/user-manual.chunked/ar01s02.html an overview] | | Nut is a Software well documented, you can find the [http://www.networkupstools.org/docs/user-manual.chunked/index.html TOC here] and with [http://www.networkupstools.org/docs/user-manual.chunked/ar01s02.html an overview] |
− | <noinclude>[[Category:Howto]]</noinclude> | + | <noinclude> |
− | <noinclude>[[Category:Administration]]</noinclude> | + | [[Category:Howto]] |
| + | </noinclude> |
| + | <noinclude> |
| + | [[Category:Administration]] |
| + | </noinclude> |
| + | __FORCETOC__ |