1UPSCMD(8) NUT Manual UPSCMD(8)
2
3
4
6 upscmd - UPS administration program for instant commands
7
9 upscmd -h
10
11 upscmd -l ups
12
13 upscmd [-u username] [-p password] ups command
14
16 upscmd allows you to invoke "instant commands" in your UPS hardware.
17 Not all hardware supports this, so check the list with -l to see if
18 anything will work on your equipment.
19
20 On hardware that supports it, you can use this program to start and
21 stop battery tests, invoke a front panel test (beep!), turn the load on
22 or off, and more.
23
25 -h
26 Display the help message.
27
28 -l ups
29 Show the list of supported instant commands on that UPS. Some
30 hardware may not support any of them.
31
32 -u username
33 Set the username for the connection to the server. This is
34 optional, and you will be prompted for this when invoking a command
35 if -u is not used.
36
37 -p password
38 Set the password to authenticate to the server. This is also
39 optional like -u, and you will be prompted for it if necessary.
40
41 ups
42 Connect to this UPS. The format is upsname[@hostname[:port]]. The
43 default hostname is "localhost".
44
46 If you run this program inside a shell script or similar to invoke a
47 command, you will need to specify all of the information on the command
48 line. This means using -u and -p. Otherwise it will put up a prompt and
49 your program will hang.
50
51 This is not necessary when displaying the list, as the username and
52 password are not required for read-only mode.
53
55 Some drivers like apcsmart(8) have built-in paranoia for the dangerous
56 commands like load.off. To make them actually turn off the load, you
57 will have to send the command twice within a short window. That is, you
58 will have to send it once, then send it again after 3 seconds elapse
59 but before 15 seconds pass.
60
61 This paranoia is entirely defined within the driver. upsd and upscmd
62 have no control over the timing.
63
65 upscmd won’t work unless you provide a valid username and password. If
66 you get "access denied" errors, make sure that your upsd.users(5) has
67 an entry for you, and that the username you are using has permissions
68 to SET variables.
69
71 There is currently no way to tell the user when the driver requires
72 confirmation to invoke a command such as load.off. Similarly, there is
73 not yet a way to tell the user if a command succeeds or fails.
74
75 This is on the list of things to fix in the future, so don’t despair.
76 It involves magic cookies.
77
79 upsd(8), upsrw(8)
80
82 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
83
84
85
86Network UPS Tools 09/15/2011 UPSCMD(8)