knowing when file is flushed to disk



Hello,

I'm using a Python CGI script on a web server to log data from a remote site
every few minutes. I do not want to lose any data for whatever rare reason -
power outage/os crash just at the wrong moment etc. So I would like to know
when the data is actually written to disk and the file closed. At that point
I can signal deleting of the data at the remote site which has very limited
storage.

Is there some way from my Python script to know when the data is actually on
the disk. BTW server OS is Linux. Presumably calling flush() and close() on
the output file will initiate the disk write, but do they wait for the
actual disk write or immediately return leaving the OS to do the write when
it sees fit?

Any thoughts appreciated,

John


.



Relevant Pages

  • SATA 3ware RAID review...sort of.
    ... Details of a web server upgrade using SATA RAID5 drives. ... External disk case for SCSI SCA 10k RPM drives. ...
    (freebsd-isp)
  • Re: Clustering - how can I.......
    ... the data source for the web server is an NFS file location stored on ... Because the cluster is of DS10Ls, using local IDE storage and the only ... disk image you give it, and the underlying disk can be whatever. ...
    (comp.os.vms)
  • Re: Clustering - how can I.......
    ... the data source for the web server is an NFS file location stored on ... Because the cluster is of DS10Ls, using local IDE storage and the only ... disk image you give it, and the underlying disk can be whatever. ...
    (comp.os.vms)
  • Re: port 80
    ... Frontpage 98 had included with it a product called "Personal Web Server" which it ... Frontpage 98 won't work with disk based webs, it only will create a web site ... So if you have Windows 2000 or Windows XP Professional, IIS can be run on your ...
    (microsoft.public.frontpage.client)
  • Re: setup DC at remote location, 2003 Enterprise R2 and 2003 Std
    ... This is only available on disk 2 of the R2 disk. ... I have windows 2003 Standard installed at the main site and ... this an Active Directory wizard and it failed with and error saying that I ... exact same OS at the remote site as I do at the local site? ...
    (microsoft.public.windows.server.active_directory)