概要
フリーのAPC製UPS監視ソフト
source-rpm もあったけど Vine は対応してない、/etc/redhat-release を作ってなんか書けば大丈夫なような気が…。でもめんどくさかったので tar玉で。。
入手先
コンパイル
# tar xzvf apcupsd-3.12.1.tar.gz
# mv apcupsd-3.12.1 /usr/local/src/
# cd /usr/local/src/apcupsd-3.12.1
# ./configure –enable-usb –enable-cgi –with-cgi-bin=/home/httpd/cgi-bin –enable-pthreads # おすすめオプション
# make
# make install
設定
# cp platforms/unknown/apcupsd /etc/init.d/ # 起動スクリプトをコピー
# chmod +x /etc/init.d/apcupsd
# vi /etc/apcupsd/apcupsd.conf
…
# UPSNAME xxx
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM. It should be 8 characters or less.
#UPSNAME
UPSNAME Smart700 # UPSの名前
# UPSCABLE
# Defines the type of cable connecting the UPS to your computer.
#
# Possible generic choices for
# simple, smart, ether, usb
#
# Or a specific cable model number may be used:
# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, M-04-02-2000
#
#UPSCABLE smart
UPSCABLE 940-0024C # ケーブルの種類
#UPSCABLE usb # ケーブルの種類 usb ならこう。
…
#UPSTYPE apcsmart # シリアルならこっち
#DEVICE /dev/ttyS0 #
UPSTYPE usb # usb はこんな感じで…。
DEVICE /dev/usb/hiddev0 # /var/log/message を見て合わせる。
…
# /etc/init.d/apcupsd start # 起動
Starting apcupsd power management Done.
# chkconfig apcupsd on # 起動時有効
# /etc/init.d/apcupsd status # で状況確認
cgi のアドレス
http://localhost/cgi-bin/multimon.cgi