{"id":211,"date":"2012-10-05T11:14:00","date_gmt":"2012-10-05T11:14:00","guid":{"rendered":"http:\/\/blog.successionua.com\/?p=211"},"modified":"2012-10-05T11:14:00","modified_gmt":"2012-10-05T11:14:00","slug":"%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-%d0%b0%d0%b2%d1%82%d0%be%d0%bc%d0%b0%d1%82%d0%b8%d1%87%d0%b5%d1%81%d0%ba%d0%be%d0%b3%d0%be-%d0%b2%d1%8b%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8","status":"publish","type":"post","link":"https:\/\/geckich.space\/?p=211","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 low battery \u043e\u0442 UPS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e nut (Network UPS Tools)"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\u0415\u0441\u043b\u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0418\u0411\u041f \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e USB, \u0442\u043e \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0430\u0442\u043e\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u043d\u0430 Oracle Linux 6.3 \u0438 Debian \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043e\u0442 \u0441\u0435\u0442\u0438. \u0418\u0411\u041f &#8211; Mustek PowerAgent 650 \u0441 USB.<\/p>\n<p>1. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c USB-\u043a\u0430\u0431\u0435\u043b\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u041f\u041a \u0438 \u0418\u0411\u041f.<br \/>2. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Nut:<\/p>\n<p><b><span style=\"color: #e69138;\">aptitude install nut<\/span><\/b><br \/><b><span style=\"color: #e69138;\"><br \/><\/span><\/b>\u0438\u043b\u0438<\/p>\n<p><b><span style=\"color: #e69138;\">yum install nut<\/span><\/b><\/p>\n<p>\u041e\u0441\u043e\u0431\u044b\u0435 \u0438\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0446\u044b \u043c\u043e\u0433\u0443\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442\u044c \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \ud83d\ude42<br \/>\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 Debian \u0438 RHEL6 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 1\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \/etc\/nut, \u0430 \u0432\u043e 2\u043c &#8211; \u0432 \/etc\/ups \ud83d\ude42<\/p>\n<p>3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0448\u0438 \u044e\u0441\u0431-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0432\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><b><span style=\"color: #e69138;\">lsusb<\/span><\/b><\/p>\n<p>\u0418\u0449\u0435\u043c \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430:<\/p>\n<p><span style=\"color: #e69138;\">Bus <\/span><span style=\"color: red;\">001<\/span><span style=\"color: #e69138;\"> Device <\/span><span style=\"color: red;\">004<\/span><span style=\"color: #e69138;\">: ID 0665:5161 Cypress Semiconductor USB to Serial<\/span><\/p>\n<p><a name='more'><\/a><br \/>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u0448\u0430\u043c\u0430\u043d\u0438\u0442\u044c \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u044f\u0434\u0440\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u0443\u0436\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u0438 usb, usbhid.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0430, \u0433\u0434\u0435 \u0446\u0438\u0444\u0440\u044b &#8211; \u043d\u043e\u043c\u0435\u0440\u0430 \u0448\u0438\u043d\u044b (Bus) \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (Device) \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><b><span style=\"color: #e69138;\">chown root:nut \/dev\/bus\/usb<\/span><span style=\"color: red;\">\/001\/004<\/span><\/b><\/p>\n<p>4. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438 (cd \/etc\/ups \u0438\u043b\u0438 cd \/etc\/nut) \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c.<br \/>1) nano upsd.users<br \/>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0441\u0442\u0430\u0432\u044f \u0441\u0432\u043e\u0438 \u0438\u043c\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c:<\/p>\n<p><span style=\"color: #e69138;\">[monuser]<\/span><\/p>\n<p><span style=\"color: #e69138;\">password = secret<\/span><br \/><span style=\"color: #e69138;\">upsmon master<\/span><\/p>\n<p>2) nano upsd.conf<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\/\u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c:<br \/>LISTEN 127.0.0.1 3493<\/p>\n<p>3) nano ups.conf<br \/>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0418\u0411\u041f:<br \/><span style=\"color: #e69138;\">[mustek_650]<\/span><\/p>\n<p><span style=\"color: #e69138;\"><span style=\"white-space: pre;\"> <\/span>driver = blazer_usb<\/span><br \/><span style=\"color: #e69138;\">&nbsp; &nbsp; &nbsp; &nbsp; port = auto<\/span><br \/><span style=\"color: #e69138;\">&nbsp; &nbsp; &nbsp; &nbsp; desc = &#8220;some comment&#8221;<\/span><\/p>\n<p>\u0422\u0443\u0442 \u0432 \u043f\u043e\u043b\u0435 driver \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 &#8211; <a href=\"http:\/\/www.networkupstools.org\/stable-hcl.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043e\u0444\u0438\u0446. \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 (\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a), \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e \u043e\u0431 \u0418\u0411\u041f:<\/p>\n<p><b><span style=\"color: #e69138;\">upsdrvctl start<\/span><\/b><\/p>\n<p><span style=\"color: #e69138;\">Network UPS Tools &#8211; UPS driver controller 2.6.4<\/span><br \/><span style=\"color: #e69138;\">Network UPS Tools &#8211; Megatec\/Q1 protocol USB driver 0.08 (2.6.4)<\/span><br \/><span style=\"color: #e69138;\">Supported UPS detected with mustek protocol<\/span><br \/><span style=\"color: #e69138;\">Vendor information unavailable<\/span><br \/><span style=\"color: #e69138;\">No values provided for battery high\/low voltages in ups.conf<\/span><br \/><span style=\"color: #e69138;\">Using &#8216;guestimation&#8217; (low: 10.400000, high: 13.000000)!<\/span><br \/><span style=\"color: #e69138;\">Battery runtime will not be calculated (runtimecal not set)<\/span><\/p>\n<p>4) nano&nbsp;upsmon.conf<br \/>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0418\u0411\u041f (\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0442\u0430\u044c \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u0432&nbsp;upsd.users!):<\/p>\n<p><span style=\"color: #e69138;\">MONITOR mustek_650@localhost 1 monuser secret master<\/span><\/p>\n<p>5. \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u043e\u0441\u0442\u0438:<br \/><b><span style=\"color: #e69138;\"><br \/><\/span><\/b><b><span style=\"color: #e69138;\">chown root:nut upsd.conf upsd.users<\/span><\/b><br \/><b><span style=\"color: #e69138;\">chmod 0640 upsd.conf upsd.users<\/span><\/b><br \/><b><span style=\"color: #e69138;\">chown root:nut upsmon.conf<\/span><\/b><br \/><b><span style=\"color: #e69138;\">chmod 0640 upsmon.conf<\/span><\/b><\/p>\n<div><\/div>\n<div>6. \u0421\u043a\u0440\u0435\u0449\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043b\u044c\u0446\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \ud83d\ude42<\/div>\n<div><\/div>\n<div>RHEL6:&nbsp;<b><span style=\"color: #e69138;\">\/etc\/init.d\/ups start<\/span><\/b><\/div>\n<div>Debian:&nbsp;<b><span style=\"color: #e69138;\">\/etc\/init.d\/ups-monitor start<\/span><\/b><\/div>\n<div><\/div>\n<div>7. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043b\u0438 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0423\u041f\u0421\u0430:<br \/><b><span style=\"color: #e69138;\"><br \/><\/span><\/b><b><span style=\"color: #e69138;\">upsc mustek_650@localhost<\/span><\/b><\/div>\n<p><span style=\"color: #e69138;\"><br \/><\/span><span style=\"color: #e69138;\">ups.status: OL<\/span>&nbsp;&#8211; \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0423\u0421\u041f \u043d\u0430\u0439\u0434\u0435\u043d, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043e\u0442 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c.<\/p>\n<p><b><span style=\"color: #e69138;\">upsdrvctl -t shutdown<br \/>upsmon -c fsd<\/span><\/b><br \/><b><span style=\"color: #e69138;\"><br \/><\/span><\/b>1\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 &#8211; \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0431\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, 2\u044f &#8211; \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0438\u0432\u0435\u043d\u0442\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u041f\u041a.<\/div>\n<div>http:\/\/geckich.blogspot.com\/<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0418\u0411\u041f \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e USB, \u0442\u043e \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0430\u0442\u043e\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u043d\u0430 Oracle Linux 6.3 \u0438 Debian \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043e\u0442 \u0441\u0435\u0442\u0438. \u0418\u0411\u041f &#8211; Mustek PowerAgent 650 \u0441 USB. 1. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0430, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c USB-\u043a\u0430\u0431\u0435\u043b\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u041f\u041a \u0438 \u0418\u0411\u041f.2. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Nut: aptitude install nut\u0438\u043b\u0438 yum install nut \u041e\u0441\u043e\u0431\u044b\u0435 \u0438\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0446\u044b \u043c\u043e\u0433\u0443\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e &hellip; <a href=\"https:\/\/geckich.space\/?p=211\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 low battery \u043e\u0442 UPS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e nut (Network UPS Tools)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211"}],"version-history":[{"count":0,"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions"}],"wp:attachment":[{"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}