<インストールログ> -- Smart-UPS(R)を使ってLINUXサーバの電源OFFを行うための環境整備手順 -- Server: IBM xSeries 200 -41x http://www.pc.ibm.com/us/eserver/xseries/x200.html UPS: Smart-UPS(R)700 (SU700J) http://www.apc.co.jp/products/ups/su700j.html Software: PowerChute Plus for Linux v4.5.3 (PowerChutePlus-4.5.3-1.i386.rpm) http://ss.apc.co.jp/Download/Detail_Sw.cfm?ProductNumber=AP9004J-PCP453LINUX-I386-GLIBC-RPM http://www.google.com/search?q=PowerChutePlus-4.5.3-1.i386.rpm&hl=ja&btnG=Google+%8C%9F%8D%F5&lr= OS: Official RedHat Linux 7.1(日本版) # rpm -ivh PowerChutePlus-4.5.3-1.i386.rpm # cd /usr/lib/powerchute # ./Config.sh ----------------------------------------------------------------------- PowerChute Plus for Linux v4.5.3 Configuration Script Copyright American Power Conversion 2001 ----------------------------------------------------------------------- Stop PowerChutePlus and continue? [y/n] y 1) Matrix-UPS 2) Smart-UPS ←これを選択 3) Back-UPS 4) Back-UPS Pro 5) Symmetra Power Array 6) Smart-UPS DP Which APC Hardware will PowerChute Plus for UNIX be running with [?] 2 ---------------------------------------------------------------------------- The Measure-UPS is a device which is designed to perform environmental monitoring in conjunction with PowerChute Plus for UNIX ---------------------------------------------------------------------------- Do you currently have a Measure-UPS attached to the UPS? [y/n] n (温度感知モジュールを取り付けていますか?) ---------------------------------------------------------------------------- PowerChute Plus for UNIX is able to monitor other hosts. However, in order to monitor other hosts TCP/IP must be installed. If you do not have TCP/IP installed, answer 'n' to the following question. (他のサーバの状態を監視するための設定で、TCP/IPを備えているかどうかの質問。今回は必要なし。) ---------------------------------------------------------------------------- Do you currently have TCP/IP Installed? [y/n] n ---------------------------------------------------------------------------- If you will be using the Motif version of the User Interface on a monochrome monitor, using the Monochrome Coloring scheme is recommended. ---------------------------------------------------------------------------- 1) Use Default Color scheme ←デフォルトでいいでしょう 2) Use Monochrome Color scheme Which color scheme do you wish to use [1]? 1 ---------------------------------------------------------------------------- PowerChute Plus for UNIX requires complete control of the serial port. No processes, including gettys, are allowed to be accessing the port. Therefore, the serial port you select must NOT be enabled for logins. To ensure that PowerChute Plus for UNIX has control of the serial port, make sure that it is not enabled for logins. To disable the port for logins consult the PowerChute Plus for UNIX manual. (UPSからのコードをどこに接続するか。シリアルポート用のコードが付いていたので、 これを利用。サーバには2ポートあって、番号が低い方が/dev/ttyS0となる。) ---------------------------------------------------------------------------- 1) /dev/ttyS0 2) /dev/ttyS1 3) Other Which serial device will be dedicated to PowerChute Plus for UNIX [?] 1 ---------------------------------------------------------------------------- You should have the black cable, #940-0024C attached to /dev/ttyS0 Please verify. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Command files may be executed with root privileges or with the privileges you assign to the pwrchute account (allowing you to customize command file execution according to your system requirements). (root権限で実行したいですか? よく分からないのと、参考文献をいろいろ見て、 とりあえずnoにしてみました。) ---------------------------------------------------------------------------- Do you want to execute command files as root? [y/n] n ---------------------------------------------------------------------------- E-mail may be sent with root privileges or with the privileges you assign to the pwrchute account. ---------------------------------------------------------------------------- Do you want to send e-mail as root? [y/n] y (サーバルート宛にメールを送りますか?) ---------------------------------------------------------------------------- PRODUCT : PowerChute Plus for UNIX DEDICATED TTY : /dev/ttyS0 UPS TYPE : Smart-UPS Measure-UPS INSTALLED : FALSE INSTALLING AS ROOT : TRUE TCP/IP Installed : FALSE RUN COMMAND FILES AS ROOT : FALSE SEND EMAIL AS ROOT : TRUE ---------------------------------------------------------------------------- Are the above selections correct? [y/n] y (以上の設定で合っていますか?) これでインストールが始まります・・・ 安全のために権限を変更 # chmod 100 /usr/lib/powerchute/xpowerchute xpowerchuteはコンソールからXシステムを使ってGUIで各種設定やモニタをするプログラムです。 powerchuteはキャラクタベースの同様のコマンドですが、なぜか入っていませんでした。 再起動すれば動作開始されているはずです。 # shutdown -r now 動作のON/OFFはこちら。 /etc/rc.d/init.d/upsd 動作テストは、擬似停電状態を作ってやることです。すなわち、UPSの電源コードを抜きます。 デフォルトで5分後に自動シャットダウンすればOKです。シェル画面を見ていれば、 30秒毎に、まもなくシャットダウンする旨の表示が出ます。正常に終了すれば成功です。 この文章の無断転載を禁止します。また、ここに書かれている内容以上のご質問には回答できません。 参考文献 http://www.apc.co.jp/ http://www.ecip.shikoku-u.ac.jp/~togawa/Memo/Solaris/PowerChute.4.2.2.html http://www.openlinux.ne.jp/eserver/hardlist/apc.html http://www.ampere.co.jp/ups/powerchu.html http://www.atmarkit.co.jp/fnetwork/tanpatsu/03ups/ups03.html http://www.nativesoft.co.jp/sale/apc/info_faq_pcp.html 参照元 http://www.rescue.ne.jp/study/powerchute/