張貼日期:May 06, 2015 9:3:25 AM
學校有兩部NS-A122 UPS我把它與 ESXi server 以com1連線,
不過要先設定才能使用
1.準備UPS for linux 管理程式 linux.tar.gz
2. cd /usr/local/src/
tar zxvf linux.tar.gz
cd linux
./install
安裝完成後, 程式的部分會放在 /etc/rups中
3. 設定
執行 /etc/rups/rupsc config
RUPS Configuration Night-Off Function
================== ==================
[A]. Delay of Server Shutdown [C]. Night-OFF Delay Time : 3 min
when AC Power Failed : 3 min [D]. Night-OFF Begin Time : 0 :00
[B]. Delay of Server Shutdown Night-OFF End Time : 6 :00
when Battery Low : 1 min
[E]. Local UPS Monitoring : YES
[F]. Communication Serial Port: /dev/ttyS0
[K]. RUPS StartUp Delay Time : 0 min
[L]. CountDown Function : OFF
RUPS Process Control
====================
[M]. Restart RUPS to update new configuration.
[N]. Stop the RUPS.
[S]. Save Configuration.
[Q]. Quit.
因只有一顆電池, 掛一部主機大約10分鐘就沒電了. 保守一點設3分鐘就好了.
4. start/stop rups
/etc/rups/rupsc start
/etc/rups/rupsc stop
5. 關機批次處理 /etc/rups/preshut.bat
將關機前要執行的命令置於此. 例如讓另一部主機也關機則可借用expect
6. 本機關機指令 /etc/rups/shutdown.ini
要修改為符合的命令.
/usr/bin/poweroff