树莓派UPS自定义关机脚本(NUT)

NUT 树莓派自定义关机逻辑,上一篇文章太长了,拉出来一些:

默认关机逻辑貌似是:nut服务会在UPS发送LOWBATT时通知机器关机,触发时机默认为ups电量剩余20%

如果要自定义关机设置需要进行如下设置(因为群辉提供的ups服务器在ups断电之前就关闭了,不清楚服务器在关机之前是不是会发送lowbatt消息)

1.编辑upsmon.conf,添加以下内容:

vim /etc/nut/upsmon.conf
NOTIFYCMD /sbin/upssched
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC

Continue Reading

是UPS吖(三)–-树莓派

装ups的另外一个目的就是为了保证树莓派的存储卡不会因为意外断电而出现问题。其实要解决这个问题个人觉得也简单,毕竟也是个linux啊。可以基于nut实现。

The primary goal of the Network UPS Tools (NUT) project is to provide support for Power Devices, such as Uninterruptible Power Supplies, Power Distribution Units, Automatic Transfer Switches, Power Supply Units and Solar Controllers. NUT provides a common protocol and set of tools to monitor and manage such devices, and to consistently name equivalent features and data points, across a vast range of vendor-specific protocols and connection media types.

NUT provides many control and monitoring features, with a uniform control and management interface. If you are just getting acquainted with NUT, that page also explains the technical design and some possible set-ups.

More than 170 different manufacturers, and several thousands of models are compatible.

https://networkupstools.org/index.html
Continue Reading

是UPS吖(二)–-群晖

开篇当然还是最喜欢的小姐姐啊。其实ups的安装还是非常简单的,不过后面的插孔都是3插,机柜上就安装了一排机柜插座,导致出现一个问题就是机柜内很多双口插头没地方插,本来想把边上的插排撤掉的,但是明显不行啊,两个光纤转换器插头+路由器+交换机的插头都没地方插,于是就把插排又给按上了。安装之后的效果就是下面这个样子啦。

Continue Reading

是UPS吖(一)–开箱

UPS即不间断电源(Uninterruptible Power Supply),是一种含有储能装置的不间断电源。主要用于给部分对电源稳定性要求较高的设备,提供不间断的电源。 [1] 
市电输入正常时,UPS 将市电稳压后供应给负载使用,此时的UPS就是一台交流式电稳压器,同时它还向机内电池充电;当市电中断(事故停电)时, UPS 立即将电池的直流电能,通过逆变器切换转换的方法向负载继续供应220V交流电,使负载维持正常工作并保护负载软、硬件不受损坏。UPS 设备通常对电压过高或电压过低都能提供保护。 
Continue Reading