LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-13-2016, 11:59 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
apcupsd not quite working


I have installed apcupsd 3.14.13 on Ubuntu 14.04. I have an APC Back-UPS 550 connected via USB. It *almost* works. When I lose power, it logs the event to /var/log/apcupsd.events and sends an email to the configured $SYSADMIN. I also get a GUI notice, with percent remaining, in Unity. When power is restored I likewise get notices.

However, if the battery does drop below the configured % threshold, there is no notice an no email. It just shuts things down. My computer does not shutdown, but goes to the Ubuntu splash screen with the 5 blinking dots and stays there ... forever; even after the power resumes.

Ideas?
 
Old 02-14-2016, 01:28 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Can you share your working configuration (/etc/apcupsd/apcupsd.conf)?

Does the system log provide any clues?
 
Old 02-14-2016, 02:50 AM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I don't own a UPS (no need with a laptop), but in an effort to assist I installed it and from a quick look under the hood, I note that /etc/apcupsd/apccontrol is the script used to do a bunch of things including shutdown. By default, it uses '/sbin/shutdown -h now' to do this.
Code:
SHUTDOWN=/sbin/shutdown
Code:
doshutdown)
	. /etc/sysconfig/apcupsd
	if test "$APCUPSD_POWERFAIL_BEHAVIOR" = "hibernate" ; then
		echo "UPS ${2} initiated hibernation" | ${WALL}
		$HIBERNATE
	else
		echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
		${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
	fi
    ;;
Does your computer shutdown cleanly when this is command is invoked manually?
 
Old 02-14-2016, 02:59 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
These may be relevant/helpful to your situation

http://askubuntu.com/questions/12584...r-off-computer
http://www.unixmen.com/fix-shutdown-...-ubuntu-14-04/

Last edited by ferrari; 02-14-2016 at 03:03 AM.
 
Old 02-20-2016, 12:33 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
ferrari:
Quote:
Does your computer shutdown cleanly when this is command is invoked manually?
Yes, it does shutdown normally when I invoke `shutdown -h now` manually, but good info on the /etc/apcupsd/apccontrol script. Maybe it's running the HIBERNATE option. Something to check.

Excellent links in your 2nd post. These seem very relevant to my issue. Unfortunately, I've returned the UPS to the owner, but I'll bring the laptop in and check it out there on my next trip.

In any case, apcupsd seems to work fine on the production Slackware servers, so far ... I've pulled the plug and received the notifications, but I haven't actually tried the shutdown test yet as these are production, but I'll do that on a test host and report back.
 
  


Reply

Tags
apcupsd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apcupsd help ahh_username_taken Slackware 2 08-29-2008 01:38 PM
Help with apcupsd Rustylinux Red Hat 1 07-31-2008 10:13 PM
Problem with apcupsd jnojr Linux - Software 0 12-21-2007 01:17 PM
How to config apcupsd riverplate Linux - Hardware 1 06-07-2007 09:24 AM
I have a problema using APCUPSD Dapernia Linux - Hardware 0 07-21-2003 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration