个人工具
登录
查看“UbuntuHelp:Apcupsd”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:Apcupsd”的源代码
来自Ubuntu中文
←
UbuntuHelp:Apcupsd
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/apcupsd}} {{Languages|UbuntuHelp:apcupsd}} Apcupsd is the daemon which will monitor your UPS to shutdown the system when the UPS' power is going to fail. The homepage for apcupsd, http://www.apcupsd.com/, has very helpful documentation for doing complicated setups. === Prerequsites === * An APC UPS. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. === Installation === First of all, we have to install apcupsd package. Install the <code><nowiki>apcupsd</nowiki></code> package in the Synaptic Package Manager. See [[SynapticHowto]]. If you want to see the stat of the UPS through the browser, you can also install <code><nowiki>apcupsd-cgi</nowiki></code> package. Edit the file <code><nowiki>/etc/apcupsd/apcupsd.conf</nowiki></code> which by default includes good comments on usage: * For <code><nowiki>UPSCABLE</nowiki></code> you have to specify the type of cable connecting the UPS to your computer. Read the comments in the file to see which possibilities you have. For example, if the UPS used is the APC Back-UPS ES 700V, you have to write <code><nowiki>usb</nowiki></code>. * You must also look for and modify the <code><nowiki>UPSTYPE</nowiki></code>. The comments in the file describes the different possibilities available. You may choose the appropriate one. Again, from our example of an APC Back-UPS ES 700V, you would write <code><nowiki>usb</nowiki></code>. * The final setting you must fix is <code><nowiki>DEVICE</nowiki></code>. As the comments note, with a <code><nowiki>usb</nowiki></code> type UPS apcupsd can autodetect the device, so you should comment out the <code><nowiki>DEVICE</nowiki></code> setting (by putting a '#' in front of it). Otherwise, you will need to know which <code><nowiki>/dev</nowiki></code> node your device is connected to. If your UPS cable is a serial type then your device may be something like <code><nowiki>/dev/ttyS0</nowiki></code>. Then you must edit the file <code><nowiki>/etc/default/apcupsd</nowiki></code> and change the <code><nowiki>no</nowiki></code> of the <code><nowiki>ISCONFIGURED</nowiki></code> with a <code><nowiki>yes</nowiki></code>. Once you have apcupsd configured, running and the device connected to your computer you will be able to check on the status of the device using the <code><nowiki>apcaccess</nowiki></code> command. Output from the command will vary based on the type of UPS you have. Most likely, the better the UPS the more detailed the information you will get. Optionally, if you want your computer to reboot after a power fail, you must edit the <code><nowiki>/etc/init.d/halt</nowiki></code> due a bug that it has. You must change the <code><nowiki>poweroff="-p"</nowiki></code> with <code><nowiki>poweroff=""</nowiki></code> The following applies to Drapper Drake (LTS 6.06), but does not apply to most Ubuntu default setups, where /usr is simply part of the root filesystem. You only need to do this if the /usr filesystem has a separate entry in /etc/fstab: * You need to uncomment the line 10 in file "/etc/apcupsd/killpower" which means changing "mount -n -o ro /usr" to "mount -n -o ro /usr" * This will ensure that the shared libraries libcrypto.so.0.9.8, libnetsnmp.so.9, libstdc++.so.6 and libz.so.1 are visible to apcupsd after shutdown when it runs "/etc/apcupsd/apccontrol killpower" to shut off the ups power otherwise the UPS will stay on and your system will not automatically reboot when utility power returns. ---- [[category:CategoryDocumentation]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:Apcupsd
。