Line 141: |
Line 141: |
| }} | | }} |
| | | |
| + | ==Setting UPS Variables== |
| + | In order to set UPS variables it is necessary to have enabled a user with administrative privileges as above first. |
| + | |
| + | In the examples below, it is assumed your UPS name is '''UPS''', that it is local, that the administrative user is '''admin''' and password '''admin'''. You can verify your UPS name via: |
| + | upsc -l |
| + | |
| + | To view a complete list of the UPS variables, both informational and modifiable |
| + | upsc UPS |
| + | |
| + | To determine the modifiable variables for your UPS, their current settings and their available setting values execute the command: |
| + | upsrw UPS |
| + | |
| + | You can now modify the variables you wish using a command similar to the following (Note the order of the arguments is important, and you may need quotes around the value being set, "20"): |
| + | upsrw -s battery.charge.low=20 -u admin -p admin UPS |
| + | |
| + | Where the value after '''-s''' should be one of the parameters identified by the '''upsrw ups''' command. You can of course verify your changes using |
| + | upsrw UPS |
| + | or |
| + | upsc UPS |
| + | |
| + | After you are done, clean up by disabling the '''upsd''' administrative user '''admin''': |
| + | {{Warning box|Make sure you understand the meaning or the UPS variables and their available setting options. Verify that your changes meet your intended behaviour!}} |
| + | |
| + | More information on upsrw can be found at: |
| + | |
| + | - Manual page: man upsrw |
| + | |
| + | ====Issuing UPS Commands==== |
| + | In order to issue UPS commands it is necessary to have enabled a user with administrative privileges as above first. |
| + | |
| + | In the examples below, it is assumed your UPS name is '''UPS''', that it is local, that the administrative user is '''admin''' and password '''admin'''. You can verify your UPS name via: |
| + | upsc -l |
| + | |
| + | To view a complete list of available commands for your UPS: |
| + | upscmd -l UPS |
| + | |
| + | You can now issue a command to the UPS with similar to the following: |
| + | upscmd -u admin -p admin UPS test.battery.start |
| + | |
| + | Where the command '''test.battery.start''' is a valid command for your UPS as previously determined by '''upscmd -l UPS'''. Depending upon the command issued you may get broadcast messages and emails relating to and confirming what the UPS is doing. |
| + | |
| + | After you are done, clean up by disabling the '''upsd''' administrative user '''admin''': |
| + | {{Warning box|Before issuing any commands verify what they do for your particular UPS via the relevant documentation and ensure that the command meets your intended behavioural requirement! |
| + | |
| + | Issuing commands could shutdown your server unexpectedly!}} |
| = SME 9 = | | = SME 9 = |
| | | |