1UPSCMD(8)                         NUT Manual                         UPSCMD(8)
2
3
4

NAME

6       upscmd - UPS administration program for instant commands
7

SYNOPSIS

9       upscmd -h
10
11       upscmd -l ups
12
13       upscmd [-u username] [-p password] ups command
14

DESCRIPTION

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

OPTIONS

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

UNATTENDED MODE

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
54       Moreover, if you run this program inside a shell script or similar, you
55       should only consider using output from stdout, not stderr.
56

DANGEROUS COMMANDS

58       Some drivers like apcsmart(8) have built-in paranoia for the dangerous
59       commands like load.off. To make them actually turn off the load, you
60       will have to send the command twice within a short window. That is, you
61       will have to send it once, then send it again after 3 seconds elapse
62       but before 15 seconds pass.
63
64       This paranoia is entirely defined within the driver. upsd and upscmd
65       have no control over the timing.
66

DIAGNOSTICS

68       upscmd won’t work unless you provide a valid username and password. If
69       you get "access denied" errors, make sure that your upsd.users(5) has
70       an entry for you, and that the username you are using has permissions
71       to SET variables.
72

BUGS

74       There is currently no way to tell the user when the driver requires
75       confirmation to invoke a command such as load.off. Similarly, there is
76       not yet a way to tell the user if a command succeeds or fails.
77
78       This is on the list of things to fix in the future, so don’t despair.
79       It involves magic cookies.
80

SEE ALSO

82       upsd(8), upsrw(8)
83

INTERNET RESOURCES

85       The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
86
87
88
89Network UPS Tools 2.7.3.          12/29/2015                         UPSCMD(8)
Impressum