[ale] Linux swap space vs hibernate, power shutdown settings
Mike Harrison
cluon at geeklabs.com
Mon Nov 7 14:38:12 EST 2011
> 5) You can get really cheap or free UPSes if you ask around - people
> don't understand about battery replacement and throw them out instead
> of replacing the batteries. Electronics recycling places have these in
I've got FIVE spare NCR branded Eaton 5125 Powerware rack mount UPS's
with SNMP cards, that about $150 worth of batteries turn into "almost new"
UPS's. These all work with existing batteries now, but the batteries
are a few years old.
The look like:
http://accessories.dell.com/sna/productdetail.aspx?c=us&l=en&s=bsd&cs=04&sku=a0716292
or:
http://www.ebay.com/itm/NCR-2700VA-2700W-Powerware-Rackmount-PW5125-3ki-RM-2IN-/380381117000?pt=LH_DefaultDomain_0&hash=item58907b3a48
Dual power in, 208 volt in, 208 volt out.
They make an APC look like the cheap junk they are,
these things are tanks and work well.
Must be picked up in downtown Chattanooga TN. Heavy, shipping is a pain.
Price Options:
$200 each
Might also trade for:
- Cool office furniture (we need a couple of kewl couches and/or comfy lounging chairs)
- Asterisk compatible VOIP phones
- Kewl (pseudo-useful) toys.
- 24" or larger screens or TV (with inputs for computer)
-----
An example of using these via SNMP from Linux (gotta be on topic):
http://www.geeklabs.com/index.php?mode=articles&submode=comments&uniq=26
#!/usr/bin/perl
#iso.3.6.1.2.1.33.1.2.4.0 = #Battery percentage
#iso.3.6.1.2.1.33.1.2.1.0 = INTEGER: 2 #status
#iso.3.6.1.2.1.33.1.2.2.0 = INTEGER: 0 #seconds on battery
$ip1 = '192.168.1.18' ;
chatter() ;
$ip1 = '192.168.1.19' ;
chatter() ;
sub chatter() {
print "
IP: $ip1
" ;
open(IN,"/usr/bin/snmpget -v1 -c public $ip1 iso.3.6.1.2.1.33.1.2.4.0 |")
;
while() {
print $_ ;
@d = split(/ /) ;
$capacity = $d[3] * 1 ;
print "Capacity: $capacity Percent
" ;
} ;
open(IN,"/usr/bin/snmpget -v1 -c public $ip1 iso.3.6.1.2.1.33.1.2.2.0 |")
;
while() {
print $_ ;
@d = split(/ /) ;
$seconds = $d[3] * 1 ;
print "Seconds on Battery: $seconds
" ;
} ;
if($seconds > 10 and $capacity < 50) {
# Do something here to shut things down.
}
More information about the Ale
mailing list