Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd November 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default How to use sensorsd to monitor a UPS.

I have a battery backup (UPS) for my OpenBSD-6.4 server. $ sysctl -a | grep hw.sensors.upd
hw.sensors.upd0.indicator0=On (BatteryPresent), OK
hw.sensors.upd0.indicator1=Off (Charging), OK
hw.sensors.upd0.indicator2=Off (Discharging), OK
hw.sensors.upd0.indicator3=Off (NeedReplacement), OK
hw.sensors.upd0.indicator4=Off (ShutdownImminent), OK
hw.sensors.upd0.indicator5=On (ACPresent), OK
hw.sensors.upd0.indicator6=Off (Overload), OK
hw.sensors.upd0.percent0=100.00% (RemainingCapacity), OK
hw.sensors.upd0.percent1=100.00% (FullChargeCapacity), OK
hw.sensors.upd0.timedelta0=2613.000000 secs (RunTimeToEmpty), OK
sensorsd(8) looks like it might be a lean alternative to sysutils/apcupsd but I don't really understand the sensorsd.conf(5) man page well enough to configure the thing. The first experiment didn't go well.
ssh hanzer@minerva sudo halt -p
halt -p
minerva is small, low-power FreeBSD machine that is also currently connected to the battery.

This setup results in both machines powering down almost immediately after sensorsd starts.

Any ideas on how to proceed or any experiments that might shed some light on how this thing works?
Reply With Quote
  #2   (View Single Post)  
Old 3rd November 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
Join Date: May 2008
Location: USA
Posts: 7,838

A wild guess here is that your percentage character is the key problem. But when testing, better to use a test script rather than actual power off.

systat(1) can show sensor output, and may help you configure sensorsd(8)
Reply With Quote
  #3   (View Single Post)  
Old 4th November 2018
TronDD TronDD is offline
Spam Deminer
Join Date: Sep 2014
Posts: 296

Read the caveat in the manpage.

Do a check in your script that you're in the state you want to act on.
Reply With Quote

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
my monitor(with no X) happens to deconnect ...a means to "monitor" its behavior ? spermwhale_warrior NetBSD General 2 1st September 2014 01:14 PM
Monitor on before computer IdOp General Hardware 13 22nd March 2012 01:48 PM
sensorsd configuration mehaj OpenBSD General 4 28th November 2011 11:07 AM
gdm/ new monitor issue jimbus FreeBSD General 3 4th August 2009 07:39 PM
What is best way to monitor for bad sectors? PeterSteele FreeBSD General 9 16th August 2008 02:41 AM

All times are GMT. The time now is 08:56 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick