Koozali.org: home of the SME Server

changing a ups parameter

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
changing a ups parameter
« on: October 24, 2008, 01:55:42 AM »
I had fun today when I lost power. the shutdown started but it didn't quite have time to complete. By default my APC UPS has the BATTLOW signal set at:
Code: [Select]
battery.charge.low: 10
This gives me not quite enough time. So rather than cutting it this close, I would like to set the above parameter to say 20.

Does anyone know of a way to set this parameter easily?

My other options I will fall back to:
1) Disconnect UPS and use Windows to set the parameter via Powechute (should stick but a pain to do)
2) Use upssched.conf. Not quite what I'm looking for but better than nothing.
SME since 2003

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #1 on: October 24, 2008, 02:13:44 AM »
never fails. I spend an hour looking for this.
I post.
I then resume searching and find the answer one minute later!

For others, do a man on upsrw.

You will need to make a temporary mod to /etc/ups/upsd.users to give you permission to execute the set command. The upsrw man page tells you what you need.

Then don't forget to execute the following to ensure this changed config is picked up by upsd:
Code: [Select]
upsd -c reload
After all this, I then did:
Code: [Select]
upsrw -s battery.charge.low=20 upsentered the temporary user and password.

Verified it with:
Code: [Select]
upsc ups
When all is done, unmodify the upsd.users file and once again reload upsd.
SME since 2003

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #2 on: October 24, 2008, 04:21:38 AM »
I have updated the wiki to include the specific instructions on how to modify the UPS parameters.

http://wiki.contribs.org/Uninterruptable_Power_Supply#Modifying_UPS_Parameters
SME since 2003

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: changing a ups parameter
« Reply #3 on: October 24, 2008, 11:26:28 AM »

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #4 on: October 24, 2008, 01:52:23 PM »
next time, use search ;-)

I did!!! Check out my second note. But as you know the search function in our forums isn't great. I did a search on ups and nut in this forum (amongst many other parameters) and this never showed up; perhaps I should have searched on "nuts"  :P. The solution I found in the end was outside of contribs.

Anyway, I've taken the short amount of time required to update the wiki. This is the best way to capture recipes. I'll add your link to the wiki references as well as you also describe the templating option. Thanks for pointing it out.
SME since 2003

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: changing a ups parameter
« Reply #5 on: October 25, 2008, 01:17:25 PM »
christian

Quote
But as you know the search function in our forums isn't great.

Don't use the basic search window (field) at the top of these forums.

Instead click on the magnifying glass icon and then do an advanced search.

You will have much better success at finding things.
eg there are lot's (7 pages) of search results for nut
http://forums.contribs.org/index.php?action=search2
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #6 on: October 25, 2008, 03:46:07 PM »
Hi Mary,
It's a good tip and I did use this. When I post a query it is because I hit the law of diminishing returns. My general search pattern is:
1) Search the wiki
2) Search the forum
3) go back to step 1 and then 2 in an exhaustive manner
4) Go to the web.
5) Dead end: do a post.
6) Document the solution

I think too I've become too used to smart search engines. Regardless some search capability is better than none and the forums and wiki are a wealth of information. And of course, I was extensively searching the broader internet before posting. That's why I thought it was funny that I actually got a spot on hit on the web literally a minute after posting and after a good couple of hours searching our own documentation and forums.

As a side remark, nenonano's post was in that list of 7 pages but it looked like most of the other posts which were about how to generically get nut working. Interestingly, if you make the search more specific, that post is actually elliminated.

Something that I think that would be helpful in general is if people have good tips to undocumented capability then they should update the wiki docs or file a bug for inclusion in the docs. At a minimum adding a reference to a recipe would be good. I've personally started taking that approach as it not only helps others it alows me to centrally store my own how-to mods.

Christian
SME since 2003

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: changing a ups parameter
« Reply #7 on: October 26, 2008, 03:47:00 AM »
Might suggest you unplug the ups and let it drain down to test the time setting was changed
and works as it should.

Quote
That's why I thought it was funny that I actually got a spot on hit on the web literally a minute after posting and after a good couple of hours searching our own documentation and forums.

Kinda gives an idea as to how bad the search engines in these forums are.

It's certainly an area that the forum dev's can improve on.

Gotta love the folks that respond with STF after you spent 2hrs reading through all the crap.

Fortunately for them... their not standing in front of you....else lights out!! :-P

I quote from Clint Eastwood

"Go ahead Make My Day"

Some..... have never gotten a handle on what that means.

lol

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #8 on: October 26, 2008, 03:26:37 PM »
Gotta love the folks that respond with STF after you spent 2hrs reading through all the crap.

Fortunately for them... their not standing in front of you....else lights out!! :-P

LOL. I have to admit that was my first instinct in the situation but I have seen Stefano as very helpful in general in the forums and assumed he meant it toung in cheek.

The rest of my follow ups are more as guidance to others. So often people post before they have even tried to look not recognizing that we are not a paid support group; just a bunch of folks trying to help each other out.
SME since 2003

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: changing a ups parameter
« Reply #9 on: October 26, 2008, 03:27:44 PM »
Might suggest you unplug the ups and let it drain down to test the time setting was changed
and works as it should.

Good point, I'll add it to the How-to. It is good practice.
SME since 2003

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: changing a ups parameter
« Reply #10 on: October 27, 2008, 12:18:20 AM »

Something that I think that would be helpful in general is if people have good tips to undocumented capability then they should update the wiki docs or file a bug for inclusion in the docs.

I've personally started taking that approach as it not only helps others it allows me to centrally store my own how-to mods.


nodding head...