Re: [CentOS] OT: really dumb question about APC UPS

2008-06-09 Thread Peter Farrell
Agreed:

"If you use the apcupsd software you can create a network (UPS) server
and clients which will automatically shutdown on a signal from the
server. But make sure you connect your network switch to the ups as
well ;) You then only have to connect 1 machine to the ups which will
act as a server for the other three."

You want to use the apcupsd package. Connect the one machine via
serial port / usb to the UPS.
That's your new APC server - running a master apcupd daemon.

Now set up the same daemon on the other host and they will communicate
to the APC master host to get the status of the APC unit itself. At a
user defined threshold, like '10% battery left' you can configure
shutdown events. You can space these out so you bring down your
superfluous machines (dev env) then the webservers, the app servers
and the database servers, with your intranet samba / apache as last on
the list for example. You can configure it to cascade all the machines
how ever you like.

http://www.apcupsd.org/

For example a host:
--
[EMAIL PROTECTED] peter]$ cat /etc/apcupsd/apcupsd.conf
## apcupsd.conf v1.1 ##
#
#  for apcupsd release 3.10.15 (04 August 2004) - redhat
#
# "apcupsd" POSIX config file
#
# = General configuration parameters 
UPSCABLE ether
UPSTYPE  net
DEVICE neptune.example.com:3551
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0


And the master: (connected via serial port to APC)
-
[EMAIL PROTECTED] peter]$ cat /etc/apcupsd/apcupsd.conf | egrep -v '^#'
UPSCABLE smart
UPSTYPE smartups
DEVICE /dev/ttyS0
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

-Peter




2008/6/8 Jamie Lists <[EMAIL PROTECTED]>:
> We have about 4 servers connected to an APC UPS. The UPS only has one
> UPS connection. So my question is, in a power outage how do i get all
> my servers to safely shutdown? Do i run a USB hub? Do i write a script
> on the one machine connected to turn off all the other machines? I'm
> confused.
>
> Jamie
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: really dumb question about APC UPS

2008-06-08 Thread John R Pierce

Jamie Lists wrote:

We have about 4 servers connected to an APC UPS. The UPS only has one
UPS connection. So my question is, in a power outage how do i get all
my servers to safely shutdown? Do i run a USB hub? Do i write a script
on the one machine connected to turn off all the other machines? I'm
confused.
  


what Michel said...

I want to add, a USB hub would not work...  USB is a one master, many 
slave star bus.  a PC is the master,, a device like your UPS is the 
slave.   you can't connect two masters to the same USB*




*there are special USB to USB network cables, these are actually two 
slave ports with some network glue in the middle, this doesn't violate 
the rule above

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: really dumb question about APC UPS

2008-06-08 Thread Michel van Deventer
Hi,

On Sun, 2008-06-08 at 01:45 -0700, Jamie Lists wrote:
> We have about 4 servers connected to an APC UPS. The UPS only has one
> UPS connection. So my question is, in a power outage how do i get all
> my servers to safely shutdown? Do i run a USB hub? Do i write a script
> on the one machine connected to turn off all the other machines? I'm
> confused.
If you use the apcupsd software you can create a network (UPS) server
and clients which will automatically shutdown on a signal from the
server. But make sure you connect your network switch to the ups as
well ;) You then only have to connect 1 machine to the ups which will
act as a server for the other three.

Regards,

Michel


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: really dumb question about APC UPS

2008-06-08 Thread Jamie Lists
We have about 4 servers connected to an APC UPS. The UPS only has one
UPS connection. So my question is, in a power outage how do i get all
my servers to safely shutdown? Do i run a USB hub? Do i write a script
on the one machine connected to turn off all the other machines? I'm
confused.

Jamie
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos