Index

flush directory

Flush buffered data to the current archive or log file.

Mandatory Arguments:
ArcFile file
The type of file to flush (archive or log).

Examples:
The following example flushes all received data from the stdio buffers of the current archive file to disk.
  flush archive

Context:
To improve writing performance, archive data received from the real-time cpu is buffered so that it can be written to the archive file in large "chunks". This has the disadvantage that the disk file lags behind what has actually been received, and the last recorded frame is likely to be incomplete until the next time the buffer is flushed. The flush command forces one of these flushes. If data is still coming from the real-time cpu, this is somewhat pointless because buffering will resume with the next frames, but if the real-time CPU is shutdown and one wants to make a copy of what was archived before the CPU was shutdown, then can be useful. Note that flushing also occurs when the file is closed.

Note that although the flush command can be called upon to flush log files, this should be unnecessary because when log files are opened the open command asks the I/O system to make them line buffered.


Martin Shepherd (12-Oct-1998)