OSCapture.exe (Compact 2013)

3/28/2014

This tool stores the most recent 20 seconds of activity in the CeLog RAM buffer.

Syntax

OSCapture.exe [Parameters]

Parameters

  • -addr <hex address>
    BufferAddress (for example, 0x8022000)
  • -autoerase <0 or 1>
    AutoEraseMode
  • -buf size
    BufferSize (for example, 0x100000)
  • -flags hexflags
    FileFlags (for example, 0x00000001)
  • -filesize hex size
    FileSize (for example, 0x00020000)
  • -n filename
    FileName
  • -pri priority
    ThreadPriority (for example, 248)
  • -syncbuf <hex size>
    SyncBufferSize (for example, 0x1000)
  • -time timeout
    FlushTimeout (for example, 10000)
  • -trans transport
    Transport (for example, LocalFile)
  • -ui <0 or 1>
    UseUI
  • -z hexzones
    ZoneCE (for example, 0x000043E3)

Remarks

The parameters for this tool override the CeLog registry values and program defaults. For more information, see CeLog Registry Settings.

You can create a run-time image that automatically starts OSCapture.exe during boot by setting environment variables before you build. On the device, OSCapture.exe runs in the background, managing the data in the CeLog RAM buffer until you trigger it to store the buffered data to a log file.

Note

Do not include CeLog on a shipping device because the logging that it performs can reduce system performance. Also, omitting CeLog reduces the attack surface through which a malicious user could try to compromise the system.

To enable OSCapture.exe from Platform Builder

  1. On the Project menu, click Properties.

  2. In the Property Pages window, click Configuration Properties and then click Build Options.

  3. In the Build Options window, select Buffer tracked events in RAM (IMGOSCAPTURE=1).

    OSCapture.exe is added to ROM, and the OS launches it during the next boot process.

  4. (Optional) To load CeLog.dll at an earlier point in the boot process, select Enable Event Tracking During Boot (IMGCELOGENABLE=1) and ensure that it is selected.

    CeLog.dll is added to the MODULES section of the run-time image, so the kernel loads it early in the boot process.

  5. Click OK.

  6. Build the run-time image.

When they are enabled, both CeLogFlush.exe and OSCapture.exe execute constantly. However, these two flushing applications differ significantly in the way that they handle flushed data.

When CeLogFlush.exe runs, it flushes data to a file automatically.

In contrast, when OSCapture.exe runs, it keeps the data buffered in RAM. OSCapture.exe writes data to a file only on command. It buffers a specifically limited amount of CeLog data on a device.

When you trigger OSCapture.exe with a command, it copies the buffered data to a file. OSCapture.exe stores a specified amount of the most recent data that the event tracking subsystem collected. When you trigger OSCapture.exe with a command, it copies the buffered data to a file.

For example, if you specify a flush time-out of 2 seconds, and specify ten saved flushes, OSCapture.exe maintains the most recent 20 seconds of activity in the CeLog RAM buffer. When you trigger OSCapture.exe, it stores that 20 seconds of activity in a log file.

See Also

Other Resources

CeLog Event Tracking