NUT setup help
Been trying to get the NUT package working with no success. I believe it has to do with my "ports" setting.
So essentially my setup for everything is I have 8 UPS. Each is a Powercom with serial port for monitoring. Obviously no computer is going to have 8 serial ports. So to overcome that, I had purchased two 4 port serial to USB hubs made by Startech.
I then have 4 UPS wired to each hub & each has one USB output to pfSense machine. Now I got the package installed & am trying to set the port. If I unplug the hub from the pfSense machine & plug it back in it tells me (short version):
uhub4: 4 ports
under my /dev folder I can see these interfaces, but they are in purple (magenta) font color & the rest of the listed interfaces under the NUT package config screen are yellow foreground with blue or black font. I tried to manually edit "/usr/pbi/nut-amd64/etc/nut/ups.conf" & change "port" to ugen3.3. This resulted in error:
tcgetattr(/dev/ugen3.3): Inappropriate ioctl for device
I'm guessing that error code has to do with the fact that these interfaces are listed in purple/magenta instead of yellow & blue/black like the other interfaces. If I try to start it with any of the other interfaces selected I get:
# /usr/local/etc/rc.d/nut.sh start stopping upsmon stopping upsd stopping powercom Network UPS Tools - UPS driver controller 2.6.5 starting powercom Network UPS Tools - UPS driver controller 2.6.5 Network UPS Tools - PowerCom protocol UPS driver 0.13 (2.6.5) data receiving error (0 instead of 11 bytes) starting upsd Network UPS Tools upsd 2.6.5 fopen /var/db/nut/upsd.pid: No such file or directory listening on ::1 port 3493 listening on 127.0.0.1 port 3493 Connected to UPS [Test]: powercom-Test starting upsmon Network UPS Tools upsmon 2.6.5 kill: No such process UPS: Test@localhost (master) (power value 1) Using power down flag file /etc/killpower Broadcast Message from firstname.lastname@example.org (no tty) at 2:04 UTC... Communications with UPS Test@localhost lost
I'm having a hard time figuring out what the color differences are meaning exactly? I tried to google this & still it didn't make any sense? yellow black background says "block device driver". Guessing this means that item is detected as a device. Magenta says "socket". Don't understand what that means. Can anyone help me out on this.
Alright. I got some of this figured out. The ups.conf file supports a setting called "type". Some UPS use different protocols (from what I understand) even for the same driver. This setting is not setup on the NUT package GUI. Had to drop to shell to edit ups.conf. I have Powercom KIN-1000AP-RM. There are 8 different "types". Surprisingly enough, even though my model type is a KIN & there is a KIN type, that setting does not work. It was the last type I tried, BNT-other, that worked.
I was able to bring one battery online & it is getting data, but it's not really correct. Battery life says 200%, 240v (really it's 120v residential), etc. There are extra arguments that probably need to be set for my specific battery which I can figure out later. I tried to write the config file for all the batteries it gave me an error about the user i believe. I saw one tutorial says to set a "user=root". I will try that. I need to also set the NUT package to basically disable itself & write the files elsewhere (I have a tutorial I found on how to make it do that), then adjust my ups.conf.
So for anyone that has problems, you may have to try to manually set a "type" under your ups.conf. networkupstools.org user manual should let you know the type settings for your UPS if it needs this setting. I will post back once I figure out how to get all 8 batteries online on my pfSense box.
P3R last edited by
So essentially my setup for everything is I have 8 UPS.
And they all supply power to your pfSense? :o
I had posted up a long reply & got a error when I tried to post it & it got erased.
In short, I have a 42U server rack with the 8 UPS. I run VMs on the other machines & they don't support passthrough for devices, so I can't monitor UPS from each server. Also it seems it would be more of a mess to have each managed individually than all by one main server, my pfSense box.
My pfSense box is on dedicated hardware & I have two 4 port rs232 serial hubs hooked to it. It can relay when to shutdown via IP with WinNUT to my Windows VMs. Then I should be able to set ESXi to shutdown when it detects no running VMs.