1UPSRW(8) NUT Manual UPSRW(8)
2
3
4
6 upsrw - UPS variable administration tool
7
9 upsrw [-l] ups
10
11 upsrw -h
12
13 upsrw -s variable [-u username] [-p password] [-w] [-t <timeout>] ups
14
16 upsrw allows you to view and change the read/write variables inside
17 your UPS. It sends commands via the server upsd(8) to your driver,
18 which configures the hardware for you.
19
20 The list of variables that allow you to change their values is based on
21 the capabilities of your UPS equipment. Not all models support this
22 feature. Typically, cheaper hardware does not support any of them. Run
23 upsrw with a UPS identifier to see what will work for you.
24
26 -h
27 Display the help message.
28
29 -s variable
30 Specify the variable to be changed inside the UPS. For unattended
31 mode such as in shell scripts, use the format VAR=VALUE to specify
32 both the variable and the value, for example:
33
34 -s input.transfer.high=129
35
36 Without this argument, upsrw will just display the list of the
37 variables and their possible values.
38
39 Some variables are strings, and can be set to any value within the
40 length limit. Others are enumerated types and can only be set to
41 one of those values. Others may be within an allowed range of
42 values. Refer to the list to know what’s available in your
43 hardware.
44
45 -l
46 Just display the list of the variables and their possible values.
47
48 Same as default activity without -s argument, provided for CLI
49 similarity with other tools.
50
51 -u username
52 Set the NUT username for the connection to the server. This is
53 optional, and you will be prompted for this when using the -s
54 option if you don’t specify -u on the command line. NUT usernames
55 are defined in upsd.users(5), and are not linked to system
56 usernames.
57
58 -p password
59 Set the password to authenticate to the server. This is also
60 optional like -u, and you will be prompted for it if necessary.
61
62 -w
63 Wait for the completion of setting execution by the driver and
64 return its actual result from the device. Note that this feature
65 requires that both upsd and the driver support TRACKING (NUT
66 version 2.8.0 or higher) or it will otherwise fail. The command
67 will also block until an actual result is provided from the driver,
68 or the timeout is reached (see -t).
69
70 -t seconds
71 Set a timeout when using -w. Defaults to 10 seconds.
72
73 ups
74 View or change the settings on this UPS. The format for this option
75 is upsname[@hostname[:port]]. The default hostname is "localhost".
76
78 If you run this program inside a shell script or similar to set
79 variables, you will need to specify all of the information on the
80 command line. This means using -s VAR=VALUE, -u and -p. Otherwise it
81 will put up a prompt and your program will hang.
82
83 This is not necessary when displaying the list, as the username and
84 password are not required for read-only mode.
85
86 Moreover, if you run this program inside a shell script or similar, you
87 should only consider using output from stdout, not stderr.
88
90 upsrw can’t set variables on your UPS unless you provide a valid
91 username and password. If you get "access denied" errors, make sure
92 that your upsd.users(5) has an entry for you, and that the username you
93 are using has permissions to SET variables.
94
96 When using upsrw to modify a numeric float value, that values must be
97 given using decimal (base 10) english-based representation, so using a
98 dot, in non-scientific notation. So hexadecimal, exponents, and comma
99 for thousands separator are forbidden. For example: "1200.20" is valid,
100 while "1,200.20" and "1200,20" are invalid.
101
103 This program used to be called upsct2, which was ambiguous and
104 confusing.
105
107 upsd(8), upscmd(8)
108
109 Internet resources:
110 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
111
112
113
114Network UPS Tools 2.8.0 04/26/2022 UPSRW(8)