秋天还是不期而至了,原来暖暖的阳光,现在也都暗淡了。对于一个旅游城市来说已经过了旅游旺季,时隔许久在此来到石老人的沙滩,已经看不到太多的游客。每次来到海边,心情总是能放松那么一些,坐在沙滩上,哪怕什么都不干,就这么静静的呆坐着,都感觉时间安静了许多。
树莓派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
是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
是UPS吖(二)–-群晖
开篇当然还是最喜欢的小姐姐啊。其实ups的安装还是非常简单的,不过后面的插孔都是3插,机柜上就安装了一排机柜插座,导致出现一个问题就是机柜内很多双口插头没地方插,本来想把边上的插排撤掉的,但是明显不行啊,两个光纤转换器插头+路由器+交换机的插头都没地方插,于是就把插排又给按上了。安装之后的效果就是下面这个样子啦。
是UPS吖(一)–开箱
UPS即不间断电源(Uninterruptible Power Supply),是一种含有储能装置的不间断电源。主要用于给部分对电源稳定性要求较高的设备,提供不间断的电源。 [1]