Windows > Use > Advanced features > Utilities and tools > SendUPS  

SendUPS is a tool for reading and writing UPS information using a batch script or any other application.

The program is located in the PSP installation directory (by default <Windows program group directory>\EATON\Personnal Solution Pac).

If the SendUPS.exe command is sent without a parameter, the system returns the information below:

Using SendUPS

SendUPS -get objectName [-var varName | -file fileName]
> Retrieve data from UPS.

SendUPS -set objectName value [-var varName | -file fileName]
> Set data on UPS.

SendUPS -list
> List of object names available on connected UPS.

objectName - The name of the object to be retrieved or set. (See SendUPS -list)
value - The value to be set.
varName - The name of the environment variable for storage of the
result value.
After each 'SendUPS' call, the program creates the
"SetVar.bat" file. This batch file should be called each
time to assign the result value to the environment variable.
e.g. SendUPS.exe -get 'PowerSummary.RunTimeToEmpty' -var 'RTTE'
CALL SetVar.bat
fileName - The name of the file where the result value is stored.


The -get command is used to read UPS information:

Using the standard output

SendUPS -get PowerSummary.PresentStatus.ACPresent

This command returns 0 or 1 on the standard output.

Using an environment variable

SendUPS -get PowerSummary.PresentStatus.ACPresent -var ACPresent
CALL SetVar.bat

This command creates the SetVar.bat file containing the SET ACPresent=1 command if AC power is present.
Once the SetVar.bat file has been run, the value read on the UPS can be accessed in the %ACPresent% environment variable.

Using a file

SendUPS -get PowerSummary.PresentStatus.ACPresent -file ACPresent.txt

This command creates the ACPresent.txt file in which the read value is saved.


The -set command is used to write information to the UPS. Only certain objects may be accessed in write mode.

After writing, the -set command reads the value on the UPS. It returns the result in the same manner as the -get command (standard output, environment variable or file).

Using the standard output

SendUPS -set PowerSummary.DelayBeforeShutdown 120

This command orders UPS shutoff following a time delay of 120 seconds.
The value 120 is returned on the standard output.


The -list command returns a list of all the accessible objects on the UPS.
Below is a list of the main objects and their meaning.





Product name


PowerSummary.iModel Model name R
PowerSummary.PercentLoad Percent load at output R
PowerSummary.RemainingCapacity Remaining battery power R
PowerSummary.RestartLevel Battery charge level before restart R/W
PowerSummary.DelayBeforeShutdown Delay before shutdown R/W
PowerSummary.DelayBeforeStartup Delay before restart


PowerSummary.PresentStatus.ACPresent AC-power status R
PowerSummary.PresentStatus. BelowRemainingCapacityLimit Low battery warning R
PowerSummary.PresentStatus.Charging Battery charging R
PowerSummary.PresentStatus.Discharging Battery discharging R
PowerSummary.PresentStatus.CommunicationLost Communication failure R
PowerSummary.PresentStatus.Good UPS output OK R
PowerSummary.PresentStatus.InternalFailure Internal fault R
PowerSummary.PresentStatus.NeedReplacement Battery must be replaced R
PowerSummary.PresentStatus.OverLoad Overload R
PowerSummary.PresentStatus.ShutdownImminent Shutdown imminent R



REM --------------------------------------------------------------

SendUPS.exe -get PowerSummary.iProduct -var iProduct
CALL SetVar.bat
SendUPS.exe -get PowerSummary.iModel -var iModel
CALL SetVar.bat
ECHO %iProduct% %iModel%

REM Get Utility power status
REM --------------------------------------------------------------
SendUPS.exe -get PowerSummary.PresentStatus.ACPresent -var UtilityStatus
CALL SetVar.bat
IF '%UtilityStatus%'=='1' GOTO utilityOK
GOTO utilityFailure

ECHO Utility OK
GOTO utilityEnd

ECHO Power failure
GOTO utilityEnd


REM Get Battery Remaining Capacity
REM --------------------------------------------------------------
SendUPS.exe -get PowerSummary.RemainingCapacity -var RemainingCapacity
CALL SetVar.bat
ECHO Battery percent load = %RemainingCapacity% %%

REM Save run time to empty in "rt.txt" file
REM --------------------------------------------------------------
SendUPS.exe -get PowerSummary.RunTimeToEmpty -file rt.txt
ECHO Run time to empty
TYPE rt.txt

REM Send shutdown order
REM --------------------------------------------------------------
SendUPS.exe -set PowerSummary.DelayBeforeStartup 120 -var dbStartup

CALL SetVar.bat
ECHO Startup UPS in = %dbStartup%
GOTO end

GOTO end

REM End of script
REM --------------------------------------------------------------


  See also :

Using the Trace tool
mgeRunAs (only NT, 2K and XP)