better UPS interface

Status
Not open for further replies.

human

Dabbler
Joined
May 25, 2014
Messages
10
Hi,

This is the rationale for my suggestion... (the actual suggestion is in the paragraph that follows this complaining... feel free to skip ahead at any time : - )

... The UPS interface is not good. I'm an experienced support technician, I'm literate, although not experienced with what's going on in the background here... not really competent in linux/unix/BSD, but you know, eager to learn, but in the mean time just want my NAS to work, right... So this interface is not self-explanatory. I'm guessing which USB port to specify, I'm guessing which driver to specify, and meanwhile, I have no idea what to put in the username and password fields. The password is currently set to "fixmepass". LOL. Even the interface is begging to be fixed. Yes I would fix the pass, but I have no idea what to fix it to. I look at stuff in the window-with-no-name that pops up when I click in that area on the bottom of the screen (I suggest giving it a more concise name if it doesn't already have one, and then putting that name in the title bar of the window... UI elements should have names, it helps users to be less confused in their communications) and well I can't really figure out a lot from that stuff, other than it is obviously not working... it says stuff like... okay... I want to copy and paste a snippit but the click and drag selection doesn't seem to quite work in that window in firefox... okay let me try IE... nope, same... Safari... okay... there we go... I can highlight stuff now. okay let's recurse back to where I was... which was... oh yeah... the terminal log file window with no name thingy says stuff like:


freenas notifier: nut not running? (check /var/db/nut/upsd.pid).

and

freenas notifier: Fatal error: unusable configuration


and

freenas notifier: Unable to open /dev/ugen0.4: No such file or directory



so anyway, something's going on there, and yeah I know I can go ask in the forums and research and all that and eventually get this figured out... maybe... or it could be that my UPS just doesn't work with NUT.

The suggestion:

Have an option in your interface to ping a given IP every X seconds, and when the ping fails for Y minutes in a row, shut down. The IP that I would specify for this would be the IP of my router. My router would not be plugged into my UPS. You see where this is going... The power goes off, the router stops responding to pings, FreeNAS shuts down, all my files are safe, and knowing this, I have a warm fuzzy feeling and really you can't put a price on people having warm fuzzy feelings. And this works with ANY UPS, no matter how old it is, or how new it is, no matter how strange the USB protocol is, and that's pretty cool. If FreeNAS did this, then FreeNAS would rock, and I would never say another negative thing about the UI, ever. Because really the UI is pretty decent. And the UI in this forum is pretty nice too.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's a REALLY bad idea for a number of reasons. You could easily write a script to run that would do this automatically for you. ;)

Regarding your complaints about the UPS not being to friendly, you are correct. The problem is NUT(the service that FreeBSD uses for UPSes) requires those settings. There is no "auto detect" or anything like that. Does it suck? Absolutely. Doesn't change the reality of it one bit. The unfriendliness of NUT is a problem for FreeBSD. The good news is if you know what you are doing you can find out the answers for any server and any supported UPS in about 10 minutes. I've gotten the settings right for all of the setups I have done the first time and in less than 10 minutes. All that FreeNAS is doing is presenting the most important settings of NUT for you to configure. As for what stuff does the answers are generally in our manual or NUT documentation. The manual needs some work since 9.2.1 has been a relative nightmare to write the manual for. The naming of the devices matches the NUT table exactly. So if something is labeled apc_v20_231 and your APC USP is found in the compatibility matrix it will say "apc_v20_231". If we said "APC-XYRHD" or something easy you'd have to go through the 30+ options. So us using the same names as NUT is doing you a major favor. It's also doing us a favor as we don't have to maintain some weird list of what is and isn't supported and have some conversion matrix for future device that are later supported.

IE has been broken for a very long time. Microsoft's answer was to put in a ticket with us to have us redo how we handle the webpage so that it would be compatible with IE. Sorry, f*** you Microsoft. You conform to the specs and stuff will work. As for other browsers I know firefox has always worked for me. Addons, custom browser settings, and domain controls can make or break browsing. That's about all the advice I can give.

As for your pinging IP addresses, that's really really hacky. Will it work for some specific situations? Yes. But I don't want to be the sucker that chooses to reboot his router and his server go down. Sorry, but that's not very professional. Also, since FreeNAS/TrueNAS is sold as an enterprise-class OS and you don't do things like pinging an IP to decide when to shutdown a server. That's not just unreliable, it's just amateur-hour. Also, most of us put our router(which is not some POS Asus/Dlink/Netgear/etc device) on the UPS because it's a computer running something like pfsense. Just like you *should* be doing with computers. So your request is just not particularly well thought out for the intended audience of FreeNAS users.

If you want to know if your UPS is compatible, NUT keeps a list of UPSes and how well they are/aren't supported. If I'm not mistaken the manual even includes a link to the webpage with the supported list.


But, like I said. If *you* want to do this it's something 20 lines of code(or less) could easily solve.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I have to agree with Cyberjock here, pinging an IP address in order to shutdown your FreeNAS machine is a hit and miss solution. One main reason I can come up with is, say you are having multiple power interruptions, you would have to build your script to keep track of how long power has been out over a period of time and here is why... Lets say you want your UPS to power your computer for 5 minutes before powering down, now you setup a routing to check for a ping every 30 seconds, and you have a power outage and the ping fails. You need to keep track of the time the ping fails, once you get to 5 minutes over say a 30 minute span then shut down your NAS. And the 5 minute timer must be a rolling 5 minutes to roll with the most recent 30 minute sample period. Now yo may need to make it a 60 minute sample period vice 30 minute, it depends on how fast your UPS can recharge. One other thing, you would need to ensure your UPS is fully functional frequently by performing a selftest.

2 weeks ago I purchased new UPS batteries for my main compute system because mine had failed with a supportable runtime of ~1 minute. I noticed this when I had a power outage which lasted only a few seconds but my UPS knew it didn't have time to wait, it shut down my computer while I was using it. If I didn't have the data cable and software running on my computer to talk to the UPS, I could have lost information or corrupted my hard drives with the power just dropping. A few days later I had replaced the batteries and now I'm back up to a 41 minute estimated runtime (at current load of 181 watts). And I did test the runtime with the old batteries, it was barely over 1 minute before the UPS died.

And I personally have all my network equipment on a few different UPS units, this would be a bad idea for me but it could be done and you might like this solution. I will always prefer having the UPS interface with the NAS to ensure my NAS is shutdown safely.

Oh, and I agree 100%, the UPS interface in the GUI sucks! I'm certain it could be done better, it just hasn't yet. If I recall correctly, FreeBSD 9 autoconfigures the UPS if it's connected with a USB cable. It's been a while since I ran FreeBSD on a standalone computer though.
 
Status
Not open for further replies.
Top