You are not logged in.

#1 2021-01-23 21:35:01

physicalit
Member
Registered: 2016-02-12
Posts: 28

apcupsd does not works

Configuration file:

UPSCABLE usb
UPSTYPE usb
DEVICE
POLLTIME 60
LOCKFILE /run/apcupsd
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 120
BATTERYLEVEL 5
MINUTES 1
TIMEOUT 1000
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

This is just one of the configuration I have tried, I also checked the systemd service if it takes the config from this file.

So, no matter what I put in this file, when i disconnect the powern the computer instantly shuts down.

If BATTERYLEVEL is present, I get in the logs:

Jan 23 22:29:06 node1 apcupsd[517118]: Power failure.
Jan 23 22:29:07 node1 apcupsd[517118]: Battery power exhausted.
Jan 23 22:29:07 node1 apcupsd[517118]: Initiating system shutdown!
Jan 23 22:29:07 node1 apcupsd[517118]: User logins prohibited

If it is commented out, i get:

Jan 23 22:43:20 node1 apcupsd[20792]: Power failure.

And then it shuts down.

If i set it to zero, is the same.

I think is a bug, but maybe someone can help me figure out if i am missing something..

Offline

#2 2021-01-23 22:42:39

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: apcupsd does not works

Check a few things:

lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1b1c:0c09 Corsair H100i v2
Bus 001 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply <========
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
systemctl status apcupsd.service
● apcupsd.service - APC UPS Power Control Daemon for Linux
     Loaded: loaded (/usr/lib/systemd/system/apcupsd.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2021-01-21 17:38:57 EST; 1 day 23h ago
   Main PID: 513 (apcupsd)
      Tasks: 3 (limit: 38426)
     Memory: 976.0K
     CGroup: /system.slice/apcupsd.service
             └─513 /sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf

Jan 21 17:38:57 Jammin1 systemd[1]: Starting APC UPS Power Control Daemon for Linux...
Jan 21 17:38:57 Jammin1 systemd[1]: Started APC UPS Power Control Daemon for Linux.
Jan 21 17:38:57 Jammin1 apcupsd[513]: apcupsd 3.14.14 (31 May 2016) unknown startup succeeded
Jan 21 17:38:57 Jammin1 apcupsd[513]: NIS server startup succeeded

Then, check

apcaccess

FWIW, on older versions/distros, apcupsd would not work without this file:

cat /etc/default/apcupsd
ISCONFIGURED=yes

I know it's not in the wiki, it might not even be needed anymore, but I carried it over, and apcupsd works fine for me.


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#3 2021-01-24 02:29:08

physicalit
Member
Registered: 2016-02-12
Posts: 28

Re: apcupsd does not works

Thanks for the answer.
I found the solutions, apparently is something wrong with the ups. I putted my battery in another one, same model and worked perfectly..

Offline

#4 2021-01-24 04:54:43

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: apcupsd does not works

Good to hear.  Please mark your thread as [SOLVED]


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

Board footer

Powered by FluxBB