Hi, I have a Linux box running Gentoo. I have nut installed and sort of running. It doesn't seem to shutdown though. This is what I would like to have happen mostly because I know our power situation here. I would like for when the power fails, it waits about 15 minutes then starts the shutdown process. No need to wait until the battery is low and all that stuff. My reason for this is this. When our power goes out, most everything is automatic. If it goes out and stays out more than about 5 or 10 minutes, it's going to be a while. It may be 2 hours or all day. If it is going to come back on after resetting itself, it will do so in about 3 or 4 minutes. Anybody care to share their config for a similar situation? Thanks :D :D :D :D -- www.myspace.com/dalek1967
Arjen de Korte
2007-Jan-16 10:34 UTC
[Nut-upsuser] CyberPower 1250AVR UPS. Anybody got one?
[...]> My reason for this is this. When our power goes out, most everything is > automatic. If it goes out and stays out more than about 5 or 10 > minutes, it's going to be a while. It may be 2 hours or all day. If it > is going to come back on after resetting itself, it will do so in about > 3 or 4 minutes. > > Anybody care to share their config for a similar situation?You didn't look at docs/FAQ, did you? ----------------------------------------------------------------------------- Q: How can I make upsmon shut down my system after some fixed interval? A: You probably don't want to do this, since it doesn't maximize your runtime on battery. Assuming you have a good reason for it (see the next entry), then look at upssched.txt or the upssched man page for some ideas. ----------------------------------------------------------------------------- What you want to achieve can be found in upssched.txt. Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
Arjen de Korte
2007-Jan-16 12:39 UTC
[Nut-upsdev] Re: [Nut-upsuser] CyberPower 1250AVR UPS. Anybody got one?
Please keep the mailinglist posted. [ upssched ]> Actually, I tried to do this a long time ago. I did read that though. > It just seems that it's not working right. The last time I had a power > failure, it just sat there. No shutdown or nothing. The UPS just died > when the batteries went dead.Did you read the 'shutdown.txt' document too? If upsmon doesn't pick up the fact that the batteries are low (and acts on it), upssched won't be called. At the very least you should verify that monitoring the ups.status by upsmon works and that it picks up the change in line/battery status. Post your configuration files here and we'll see if there is an obvious mistake there. Knowing what OS you're using may be useful too. Best regards, Arjen
Arjen de Korte
2007-Jan-16 15:41 UTC
[Nut-upsuser] CyberPower 1250AVR UPS. Anybody got one?
> Well, thing is, I don't want it to wait until the battery is about > dead. That is not good for the batteries either. My UPS will last > about a hour but I don't want it to run that long. I mostly got the UPS > because of the blinking our lights do sometimes. As in previous post, > if it is out more than about 10 minutes, it's going to be a while. May > as well shutdown and call it a day.In that case, upssched is what you need. But in order for it to work, you *must* make sure that upsmon is triggered by the mains/battery events. If that doesn't happen (for a variety of reasons), it will never be called. NUT comes with an example script and since version nut-2.0.5 we also have a 'dummy-ups' driver. I found the latter extremely helpful in debugging all sorts of interprocess communication.> I am using Gentoo Linux on this rig. To be honest, I used Mandrake for > a good while. I hated the upgrade process so I switched to Gentoo. > With Mandrake I was using Powstat and it did just what I wanted it to > do. It would sense as soon as the power failed and would wait a bit, > then shut down my system. Thing is, I can't get powstat to work on > Gentoo.Sorry, I don't know powstat, so can't be much of help here.> I'll go dig around and find the configs and post them in a bit. I was > hoping someone had a UPS like mine and could just send me theirs. Then > maybe it would work right. I thought it was working until a power > failure a while back. I found out it wasn't then.First course of action is to find out whether upsmon is seeing any status changes at all. Power your computer directly from the mains, while still monitoring the UPS. If you pull the plug on your UPS, upsmon should notice the change. If this doesn't work, running upsd or the driver in debug mode should aid in sorting out where things go wrong.> I did get the other to work though.Nice to hear. Best regards, Arjen