山特ups520电源网

您的位置: 山特ups电源网 - APC UPS电源 - APC PCNS不支持的Unix网络关机解决方案

APC PCNS不支持的Unix网络关机解决方案

编辑:admin     时间:2010-1-17    11:46:29  来自:UPS电源网

很多Unix用户希望能提供通过网络正常关闭UPS保护的服务器的解决方案,但是他们使用的是PowerChute Business Edition或PowerChute Network Shutdown无法支持的操作系统。 

为了支持这样的操作系统,我们提供了一个脚本范例,可以通过网络远程关闭这类Unix服务器。如果在PowerChute Network Shutdown 或PowerChute Plus(配合Interface Expander或Share-UPS使用)都无法支持该操作系统的情况下,可以使用该方法。

Solution:这个例子可以在Solaris服务器上正常运行。如果用户使用其他版本的Unix,请根据其版本做相应的修改。 

具体内容参考操作系统用户手册与rsh(remote shell)相关的内容。

1. 在支持PowerChute Network Shutdown 或PowerChute Plus的Server1上安装这个脚本,安全关闭其他服务器的工作由Server1完成。 

2.  Server2是希望受Server1控制完成安全关机功能的服务器。 

3.  我们的脚本范例的文件名称是shut.sh。文件内容如下: 

#!/bin/sh

#Script remotely executes shutdown command

rsh -n -l root server2 /usr/sbin/shutdown -y -g 60 -i 0

#root is the logon user account this machine is using to log onto the remote server 

#called server2

#the remote command executed is "shutdown" with the appropriate switches for 

#Solaris.

#The root account must be trusted on the remote servers in order for "rsh" to work. 

#To trust a remote system using the root account, the .rhosts file must include the 

#server Name/IP of the trusted system and the trusted user account.

#The format for .rhosts is as follows:

# server name/ip address     root 

#  159.216.77.215             root

#Review the MAN (manual pages for rsh) to get more information 

4.  用户必须创建.rhosts以使我们的范例脚本可以执行。.rhosts文件必须放在root用户目录下。

注意:对系统安全性要求性比较高的用户不宜采用该方法。

 

浏览过此文章的人还浏览过:

·UPS电源发展趋势我们如何应对作出调整

·精准定位金融行业需求 伊顿“绿色”产品值得信赖

·APC公司有关救生及生命保障设备的应用指南

·如何区别电容器和蓄电池?

·海外UPS巨头逐鹿中国地铁电源市场竞争非常激烈

标签:APC  Unix  UPS电源  ups  
分类:APC UPS电源 | 评论:0 | 引用:0 | 浏览:332  | 引用本文
所有评论
  • * 名称
  • * 邮箱
  • 网站链接
  • 正文(*)(留言最长字数:1000)

    ◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。