hello i think i found a bug i wanted nut to suspend to ram instead of powering off so i made a script that runs the commands but i ran into a problem i changed the shutdown command in upsmon.conf to my suspend script and i tested with upsmon -c fsd everything worked fine system went into suspend and i woke it backup by pressing the power button, now here is where i noticed some problems first one is that upsmon shuts it self down when fsd is called so i thought i would just add a command in my scipt to restart it after it comes out of suspend this worked but for some reason as soon as upsmon starts up it broadcasts a message and system goes into suspend again (it would just keep looping if i kept waking it) im not sure what causes the loop since there is no killpower flag, i think something from upsd is telling upsmon to powerdown but im not sure, i tried adding rm /tmp/killpower before upsmon is restarted but that didnt help, i found a quick fix by restarting the driver , upsd , then starting upsmon is there a better way to make it go into suspend or am i doing something wrong? thanks ---------------------------------------------------------------------- Get a free email account with anti spam protection. http://www.bluebottle.com/tag/2 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070815/ccd4dcce/attachment.htm
> i think i found a bug i wanted nut to suspend to ram instead of powering > offThat would be a horrible idea. Imagine what happens when your UPS runs out of battery, while you're still suspended to RAM. Could it be that you actually mean to suspend-to-disk instead?> so i made a script that runs the commands but i ran into a problem i > changed the shutdown command in upsmon.conf to my suspend script and i > tested with upsmon -c fsd everything worked fine system went into suspend > and i woke it backup by pressing the power button, now here is where i > noticed some problems first one is that upsmon shuts it self down when fsd > is called so i thought i would just add a command in my scipt to restart > it after it comes out of suspend this worked but for some reason as soon > as upsmon starts up it broadcasts a message and system goes into suspend > again (it would just keep looping if i kept waking it) im not sure what > causes the loop since there is no killpower flag, i think something from > upsd is telling upsmon to powerdown but im not sure, i tried adding rm > /tmp/killpower before upsmon is restarted but that didnt help,This is documented in the docs/ideas.txt document, see near the bottom of that file under 'Suspending to disk'.> i found a quick fix by restarting the driver , upsd , then starting upsmon > is there a better way to make it go into suspend or am i doing something > wrong?No, that's the way to do it. Shutting down the UPS is still tricky though. I have yet to see a kernel that allows inserting commands just before it sends the poweroff command, in order to shutdown the UPS. You might be able to use the shutdown with delay feature of your UPS, but this becomes hairy when the system fails to suspend for some reason and resumes. In that case your need to be really quick to stop the shutdown command. All in all we currently don't recommend this. As soon as kernels provide a hook to insert the 'upsdrvctl shutdown' command, it is an interesting option though. Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
> well i was really talking about suspend to ram, i do it on another pc with > windows and it about tripples the battery runtime on that ups (it was at 5 > min and when the system suspended it jumped up to 74 min even then it > would > go to 73 then jump back to 74 min i didnt really see it drop ) , as far > as > i know all the ups has to power in that state is the ram (about 10w~) on > my > script i run sync to hdds first to write any data to them then i suspend > it > to ram everything shuts off , hdds,fans (inc power supply fan), video > card,..etc i think the only thing on is the ram and the led on the > mainboard, i dont care about open programs being lost since its mosly used > for a webserver , my only concern is lost data / curuption , can this > happen > in suspend to ram if i sync the disks first?Let me get this straight. You're sacrify server uptime to maximize the runtime of your UPS? Why? To be able to startup your server in maybe 10 seconds after a downtime of an hour or so? Most people would instead prefer to keep it running until the battery lasts, cleanly shutdown the system and then take two minutes to reboot again (maybe half that if you suspended to disk).> i was thinking about using upssched to suspend it about 12+ mins before > battery runs out that way i would maybe get about 30-40+ minutes out of > the > battery, i have even heard you can unplug the pc while its suspended and > it > will run for awhile before powering off (i havent tried it though ), but i > can undserstand that if the power didnt come back on it would be a bad > shutdownIf that is a laptop, maybe, but don't try this on a server/desktop system. If you pull the plug on that, it's over in a blink of an eye.> i might take a look into suspend to disk but it seems more complicated to > start up the systemIf you already have suspend to RAM working, suspend to disk should be a piece of cake. Best regards, Arjen