version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
UPSCMD |
|
|
2 |
!!!UPSCMD |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
UNATTENDED MODE |
|
|
8 |
DANGEROUS COMMANDS |
|
|
9 |
DIAGNOSTICS |
|
|
10 |
BUGS |
|
|
11 |
SEE ALSO |
|
|
12 |
---- |
|
|
13 |
!!NAME |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
upscmd - UPS administration program for instant commands |
|
|
17 |
!!SYNOPSIS |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__upscmd -h__ |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
__upscmd -l__ ''ups'' |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
__upscmd [[-u__ ''username''__] [[-p__ |
|
|
27 |
''password''__]__ ''ups command'' |
|
|
28 |
!!DESCRIPTION |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
__upscmd__ allows you to invoke |
|
|
32 |
__ |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
On hardware that supports it, you can use this program to |
|
|
36 |
start and stop battery tests, invoke a front panel test |
|
|
37 |
(beep!), turn the load on or off, and more. |
|
|
38 |
!!OPTIONS |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
-h |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
Display the help message. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
-l ''ups'' |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
Show the list of supported instant commands on that UPS. |
|
|
51 |
Some hardware may not support any of them. |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
-u ''username'' |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
Set the username for the connection to the server. This is |
|
|
58 |
optional, and you will be prompted for this when invoking a |
|
|
59 |
command if -u is not used. |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
-p ''password'' |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
Set the password to authenticate to the server. This is also |
|
|
66 |
optional like -u, and you will be prompted for it if |
|
|
67 |
necessary. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
''ups'' |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
Connect to that UPS. The format for this option is |
|
|
74 |
[[upsname@]hostname[[:port]. |
|
|
75 |
!!UNATTENDED MODE |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
If you run this program inside a shell script or similar to |
|
|
79 |
invoke a command, you will need to specify all of the |
|
|
80 |
information on the command line. This means using -u and -p. |
|
|
81 |
Otherwise it will put up a prompt and your program will |
|
|
82 |
hang. |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
This is not necessary when displaying the list, as the |
|
|
86 |
username and password are not required for read-only |
|
|
87 |
mode. |
|
|
88 |
!!DANGEROUS COMMANDS |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
Some drivers like apcsmart(8) have built-in paranoia |
|
|
92 |
for the dangerous commands like OFF. To make them actually |
|
|
93 |
turn off the load, you will have to send the command twice |
|
|
94 |
within a short window. That is, you will have to send it |
|
|
95 |
once, then send it again after 3 seconds elapse but before |
|
|
96 |
15 seconds pass. |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
This paranoia is entirely defined within the driver. upsd |
|
|
100 |
and upscmd have no control over the timing. |
|
|
101 |
!!DIAGNOSTICS |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
upscmd won't work unless you provide a valid username and |
|
|
105 |
password. If you get |
|
|
106 |
upsd.users__(5) has an entry for you, |
|
|
107 |
and that the username you are using has permissions to SET |
|
|
108 |
variables. |
|
|
109 |
!!BUGS |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
There is currently no way to tell the user when the driver |
|
|
113 |
requires confirmation to invoke a command such as OFF. |
|
|
114 |
Similarly, there is not yet a way to tell the user if a |
|
|
115 |
command succeeds or fails. |
|
|
116 |
!!SEE ALSO |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
upsd(8), upsct2(8) |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
__Internet resources:__ |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
The NUT (Network UPS Tools) home page: |
|
|
126 |
http://www.exploits.org/nut/ |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
NUT mailing list archives and information: |
|
|
130 |
http://lists.exploits.org/ |
|
|
131 |
---- |