4

I have a couple APC UPS -

  • Smart-UPS RT 6000 RM XL
  • Smart-UPS RT 5000 RM XL

Unfortunately the power in my office likes to go out (out of my control) and hence the equipment powered by these UPS shuts down. They power a VMware infrastructure environment (VMware Lab Manager) and what I'd like to do is detect when one is on battery (say has been for x amount of time or has x percentage left) and run a script on this event.

What software do I need to detect a on-battery event and have it run a script?

Thanks!

Brent Pabst
  • 6,079
Andy Arismendi
  • 1,248
  • 5
  • 17
  • 27

2 Answers2

2

Why not use the APC PowerChute?

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007036

DanBig
  • 11,445
1

You can use apcupsd, it's in most repositories. It supports both USB and RS232 connections as well as networked communication (where the network server can be both the UPS itself as well as another apcupsd instance).

It has default scripts that should gracefully shutdown your machine. The scripts that do that are defined in apcupsd config file, you should be able to switch them to something different.

Alicja Kario
  • 6,449