On 03/19/2018 04:49 AM, Charles Lepple wrote:> The rc-style init systems typically want programs like the drivers to > go into the background on their own (as the driver does without "-D", > or when launched by "upsdrvctl start"). Other init systems like > launchd or systemd will monitor the PID of the program to restart it > if necessary, so they work best when the driver doesn't fork.Ok, around 24hrs ago I retested, but the (same) output is still on the screen without it going into background to release tty/sh...>> Here's output I got within the last few minutes, just wondering how to complete configuration now (if this is working)... >> >> root at darwinheim:~# Network UPS Tools - Best Ferrups/Fortress driver 0.12 (2.7.4) >> >> Warning: This is an experimental driver. >> >> Some features may not function correctly. >> >> 0.000000 debug level is '1' >> >> 8.434336 UPS Time: Saturday, July 18, 2009 - 16:01:08 >> >> 26.245736 Best Power Ferrups FE700 detected >> >> 26.245755 Battery voltages: 13.58 nominal, 14.90 full, 11.00 low, 10.50 empty > This driver doesn't have any additional configuration options (or many debug log messages, for that matter), so the next step is to be sure that upsd has started, and run "upsc ups" to see all of the values. > > The rest of the configuration is split between upsd (defining roles for monitoring) and upsmon (defining how to shut down or notify you of other events).root at darwinheim:~# upsc ups Error: Connection failure: Connection refused Some things (one might use for an organization) I won't need to set up (as maybe said, it's just my server at home)... maybe would be nice to monitor from my PC. --D
On Mar 20, 2018, at 6:06 PM, David Melik wrote:> > On 03/19/2018 04:49 AM, Charles Lepple wrote: >> The rc-style init systems typically want programs like the drivers to go into the background on their own (as the driver does without "-D", or when launched by "upsdrvctl start"). Other init systems like launchd or systemd will monitor the PID of the program to restart it if necessary, so they work best when the driver doesn't fork. > > Ok, around 24hrs ago I retested, but the (same) output is still on the screen without it going into background to release tty/sh...My mistake - I misinterpreted the log you posted. Without the "-D" flag, the driver should go into the background in a matter of seconds, usually. Can you run the driver under strace, and see where it gets stuck? Or did you only run it with the "-D" flag? In that case, if you are getting "Connection refused" from "upsc", you might need to start "upsd" by hand.
On 03/21/2018 07:07 PM, Charles Lepple wrote:> On Mar 20, 2018, at 6:06 PM, David Melik wrote: >> Ok, around 24hrs ago I retested, but the (same) output is still on >> the screen without it going into background to release tty/sh... > My mistake - I misinterpreted the log you posted. Without the "-D" flag, the driver should go into the background in a matter of seconds, usually. > > Can you run the driver under strace, and see where it gets stuck? > > Or did you only run it with the "-D" flag? In that case, if you are getting "Connection refused" from "upsc", you might need to start "upsd" by hand.Of course I did (-D) so (without,) works now.? I assume if I just go through the setup instructions on the NUT website, that'll make the server automatically load this driver on boot.? I did that before, even with some differences between default and Slackware's unofficial versions, even when having to note/change a few different things.? That was with USB UPSes, so maybe it'll be different with this serial port one... forgot most the details, but it's not that hard after setting up a few USB ones.