ups command [! repeat_count]
ups sends diagnostic commands to the UPS and waits for a reply, if any. The type of command sent to the UPS depends on the UPS type. The ups function does not check the format or correctness of the command sent. Invalid commands may produce undefined results. The command can optionally be repeated by using the ! repeat_count value. The reply from the controller depends on the command and the controller type.
The cycle command can only be run by the superuser because it calls the script "$TSCANROOT/bin/power_mon" which halts the system. The cycle command puts the UPS in a battery backup state (simulates a power failure) and then issues a UPS shutdown command. The system will be shut down and the power turned off after "p" seconds. Then when "r" seconds have passed and the battery has reached "e" percent capacity, the UPS will start the system.
command
Specifies the command to be sent to the controller. Commands are controller dependent. See below for a list of commands. The ? character lists all available commands. The ? must be enclosed in quotes (as in ups "?") if it is typed on the command line.
repeat_count
Specifies the number of times the command is to be sent to the UPS. If the repeat count is not supplied, the command will be sent one time. The repeat count must be preceded by " ! ". The bit meanings will not follow the reply if the repeat count is defined.
- - - - - APC Smart UPS AP or SU series - - - - - -
[1]%ups "?" { list available commands }
A = all leds on for 2 seconds. S = Shutdown UPS
U = Simulate power failure. X = Battery test result
G = Transfer cause. V = Firmware version.
g = UPS battery type(VDC). f = Battery capacity(% left).
9 = Acceptable line quality. Q = Query (status).
8 = Trip register. 7 = Dip switch position
j = Run time remaining. y = Copyright.
B = Battery voltage(VDC). C = Internal temperature(C).
F = Output frequency(Hz). L = Line voltage (VAC).
M = Maximum line voltage(VAC). N = Minimum line voltage(VAC).
Y = Smart mode. O = Output voltage(VAC).
P = Load power (% of avail.). W = Test battery.
Display SET
k = audible alarm(0,T,L,N) -k = Set audible alarm.
l = transfer voltage (VAC) -l = Set transfer voltage.
p = shutdown delay(sec). -p = Set shutdown delay.
q = low battery warn (Min) -q = Set low battery warn.
r = startup delay(sec). -r = Set startup delay.
e = battery startup %. -e = Set battery startup %.
s = line sensitivity(HML) -s = Set line sensitivity.
Status Replies from UPS:
! = on battery $ = return from line fail.
% = low battery + = return from low battery.
? = abnormal condition(or ups on)= = return from abnormal.
* = UPS about to turn load off. # = replace battery.
cycle = cycle power on ups; system is shutdown and restarted.
[2]%ups Q { check UPS status }
Reply: 10 { UPS is on battery in this example. }
Bit Bit
7 1 = replace battery 3 1 = UPS is on line
6 1 = low battery 2 1 = Smartboost mode on
5 1 = UPS overloaded 1 1 = UPS shutdown (overload,sleep,low battery)
4 1 = UPS is on battery 0 1 = Runtime calibration
[3]%ups 7 { DIP switch state }
Reply:0F { all switches DOWN in this example.}
Bit (lower bits only - switch is UP = 0)
3 = 0 Switch 1: UPS desensitized and input voltage range widened.
2 = 0 Switch 2: Output/transfer voltage range set lower.
1 = 0 Switch 3: Audible alarm delayed until 30 sec outage.
0 = 0 Switch 4: Low battery interval set at 5 minutes.
[5]%ups O { Output voltage }
Reply: 119.0
[5]%ups 8 { trigger register }
Reply: 10 { S command was issued in this example.}
Bit Bit
4 = 1 Shutdown mode set(S) 1 = 1 Overload: can't transfer.
3 = 1 Sleep mode (@cmd) 0 = 1 No output power: low battery.
2 = 1 UPS main relay fail.
[6]%ups G { Cause of last shutdown }
Reply:T
O = no transfers. S = Self test T = line notch or spike.
L = low line. H = high line R = line rate change.
$PASSDIR/ups_lock_dev_term_X is the UPS lock file. The actual lock file name is defined in system.config under the setting [system]ups.device.
ups_monitor
USE OF THIS COMMAND MAY SLOW DOWN THE SYSTEM'S PERIODIC REQUEST TO THE UPS. THIS
FUNCTION AND THE FUNCTION ups_monitor CAN RUN AT THE
SAME TIME. The ups functions are controlled by the lock file $PASSDIR/ups_lock._dev_term_X.
Last Update: $Date: 2000/07/21 21:31:32 $