On Thu, Jan 6, 2011 at 10:00 AM, Larry Brigman <[email protected]>wrote:
> On Thu, Jan 6, 2011 at 9:56 AM, Denis Heidtmann > <[email protected]> wrote: > > I am writing a little script to record the battery voltage v.s. time. I > > want to run it until the system shuts down due to low voltage. Is it > > reasonable to expect that the system will write the file buffer to the > disk > > prior to shutdown? If not, what is a reasonable way to handle the > problem? > > The system is ubuntu 10.04, the hardware is an ASU eee pc 900. > > If the system does it's own monitoring to do the shutdown then you > will need a signal > handler to catch the shutdown and/or term signal to go record record a > reading and flush your buffers. > The system does the shutdown. You are saying that the system will NOT bother with dirty buffers; that if the system shuts down due to running out of battery power any applications running are on their own. This may explain a failure I had with this machine shortly after I received it: I ran it 'till it shut down. When it came back up the some parts of X were hosed. There are other explanations for the failure, but this may top the list if in fact the system behaves as you say. I will have a bash loop running. All I would need to do is force a write to the disk in the loop as it nears the shutdown voltage. How do I force a write? Thanks, -Denis _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
