Partager via


Event Tracking with OSCapture.exe

The OSCapture.exe and Celogflush.exe applications manage data that is generated by the event tracking subsystem. You can choose to use either of these applications. For information about the Celogflush.exe application, see Log File Flushing in the Event Tracking Subsystem.

On a target device, the OSCapture.exe application stores, in RAM, a specified amount of the most recent data collected by the event tracking subsystem. At a time of your choosing, while OSCapture.exe runs, you can instruct OSCapture.exe to copy the data currently stored in RAM into a file. For information about instructing OSCapture.exe to copy data to a log file, see Storing Data from OSCapture.exe in a Log File.

You can use OSCapture.exe to record events that occur when the performance of a target device slows. To record events, run OSCapture.exe in the background while you use the target device. When you notice an unusual reduction in the performance of the target device, instruct OSCapture.exe to capture to a file the most recent activity on the target device.

Note   If you make OSCapture.exe capture to a file more than once, each subsequent time the contents of the log file are overwritten with the latest data stored in RAM on the target device.

To include OSCapture.exe in your Windows CE OS image, set the value of the IMGCELOGENABLE and IMGOSCAPTURE environment variables to 1, and then build a new OS image.

OSCapture.exe does not require the target device to be connected to a development workstation. Also, OSCapture.exe does not require the target device to have a display.

Note   While OSCapture.exe runs, you may notice a reduction in the performance of the target device. For this reason, Microsoft recommends that you add OSCapture.exe to the OS image only during investigation of a known problem with the target device.

In the HKEY_LOCAL_MACHINE\System\Celog registry key, you can modify the behavior of OSCapture.exe by editing registry entries. The OSCapture.exe application uses the same registry key as the Celogflush.exe application. The following table shows the registry entries that affect the behavior of OSCapture.exe.

Registry entry Data type Description
FlushTimeout DWORD Hexadecimal value that specifies the length of time, in milliseconds (ms), between successive flushes of the RAM buffer. OSCapture.exe flushes the RAM buffer more frequently if data is collected quickly. The default value for this registry entry is 2000, or 2 seconds.
ThreadPriority DWORD Hexadecimal value that specifies the priority level of the thread that flushes the log file. Priority levels range from 0 to 255. The default value for this registry entry is 248. Priority level 248 is the lowest real-time priority level.
Transport String Specifies which transport to use. The default transport for OSCapture.exe is "LocalFile". You can specify one of the following transports:
  • "CESH"

    Stores data in a log file in the release directory on the development workstation.

  • "LocalFile"

    Stores data in a log file on the target device. The "LocalFile" setting provides an alternative method of collecting data if the Celogflush.exe application consumes an excessive amount of CPU or network bandwidth. The "LocalFile" setting can also be useful if there is no development workstation to send data to.

FileName String Specifies the path and file name of the log file. For OSCapture.exe, the default location for the log is the OSCapture.clg file in the root directory of the file system on the target device.
SavedFlushes DWORD Hexadecimal value that specifies the number of log file flushes to store in RAM on the target device. The default value for this registry entry is 15.

The amount of data stored in RAM on the target device is approximately equal to the product of the number of flushes and the length of time between successive flushes of the log file, as specified by the FlushTimeout registry entry. For example, when you combine the default FlushTimeout setting of 2 seconds with the default SavedFlushes setting of 15, approximately 30 seconds of data is buffered in RAM. This estimate of the amount of data stored is an approximation, because if the buffer overruns, data is flushed more frequently.

You can view or modify the source code for the OSCapture.exe application in %_WINCEROOT%\Public\Common\Oak\Utils\Celogflush.

For information about viewing a log file created with OSCapture.exe, see Viewing Data from OSCapture.exe with Remote Kernel Tracker.

See Also

Event Tracking Implementation | Event Tracking | Log File Flushing in the Event Tracking Subsystem

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.