次の方法で共有


Avoiding CeLog Data Loss (Windows Embedded CE 6.0)

1/5/2010

CeLog.dll logs data to a RAM buffer on the target device. A flush application like Remote Kernel Tracker or CeLogFlush.exe copies the data out of the RAM buffer. If data is logged to CeLog faster than the flush application can remove it from the RAM buffer, the buffer fills and no longer accepts data. At that point, CeLog cannot write data until the flush application removes data from the buffer. Any data that is logged when the RAM buffer is full is discarded.

The following sections offer suggestions for minimizing data loss.

  • Reduce the amount logged
  • Speed up flushing
  • Increase the size of the RAM buffer

Reduce the amount logged

To reduce the amount of data logged, reduce the number of zones that are set. Some zones, such as CELZONE_KCALL and CELZONE_HEAP, produce lots of data. If you do not need the events from these zones, turn them off. For more information about controlling the CeLog zone settings, see Filtering CeLog Events.

Most frequently, a combination of reducing the amount of data logged and increasing the size of the RAM buffer is sufficient to prevent data loss.

Speed up flushing

There are several ways to speed up flushing.

  • Store the data in a faster file system
    For example, it is faster to store data in the device file system than in the release directory of the development workstation. It is faster to store the data in a RAM-based file system than it is to write to flash.

  • Increase the priority of the flushing thread, if you are using CeLogFlush.exe or OSCapture.exe
    When CeLog collects lots of data from threads that have higher priority than the flushing thread, the overall logging process slows. For information about how to change the priority of the flush thread, see CeLogFlush Registry Settings or OSCapture Registry Settings.

  • Reduce the time that must be spent opening the log file by forcing CeLogFlush.exe to hold the log file open continuously.
    If the log file is on a remote computer, holding the file open can reduce the time CeLogFlush must have to write to a file by reducing connection time. To make CeLogFlush.exe hold the log file open continuously, change the file flags that CeLogFlush.exe uses. For more information about CeLog flags, see CeLogFlush Registry Settings

    Note

    Keeping a log file open can reduce connection time, but it also introduces other problems. For example, when CeLogFlush.exe is writing to the file, you cannot access the file to read it. Hence, to read the file, you must stop the log flushing process.

Increase the size of the RAM buffer

For information about increasing the size of the CeLog RAM buffer, see Modifying The Size Of The CeLog Buffer.

Most frequently, a combination of reducing the amount of data logged and increasing the size of the RAM buffer is sufficient to prevent data loss.

See Also

Concepts

Kernel Tracker

Other Resources

CeLog Data Collection
Readlog Viewing Tool