« 关于89111.CN恶意ARP攻击的解决办法Governor's Speech at Farewell Ceremony of Hong Kong Handover 1997 »

Collecting Debug Messages in CE devices

Collecting Debug Messages in an Unlimited Buffer with CeLogFlush
Send Feedback

You can configure CeLog to collect debug messages in an unlimited fashion. The data is limited only by the storage capacity of the device file system.

The following instructions use shortcut files to make it as convenient as possible to work with a device that does not have a connection to a development workstation. It is also possible to set up the same behavior by other means.

To collect debug messages with an unlimited buffer

  1. Make a file named FLUSH.lnk with these contents:
    83#\Windows\celogflush.exe -buf 0x100000 -time 60000 -n \celog.clg -z 0x00800000 -ui 1

    This command line sequence overrides the registry settings on the target device.

  2. Copy CeLog.dll and CeLogFlush.exe into the \Windows directory of the target device.
  3. Copy the .lnk file you created in step 1 into the same directory as the Start menu.
  4. From the Start menu, choose FLUSH in the start menu.

    This loads CeLog.dll, sets the log buffer size, and starts recording debug messages. CeLogFlush.exe flushes data from the memory buffer to the file celog.clg once per minute, or more often if the 1MB buffer fills.

  5. Perform the actions you want to collect debug messages for.
  6. After you finish collecting messages, wait one minute to allow CeLogFlush.exe time to flush the data, and then copy celog.clg to a storage location off the device.
  7. To view the data you collected, type

    Readlog celog.clg output.txt

  8. From a text editor, open output.txt.

You also have the option of collecting messages in a limited-size, time-specific buffer. For more information, see Collecting Debug Messages in a Limited Buffer with OSCapture.

The following instructions use a shortcut file for maximum convenience.

To collect debug output messages with OSCapture.exe

  1. On the target device, create a file named LOAD.lnk with the following contents:
    90#\Windows\oscapture.exe -buf 0x100000 -time 10000 –save 6 -n \celog.clg -z 0x00800000 -ui 1
  2. On the target device, create a file named STORE.lnk with the following contents:
    31#\Windows\oscapture.exe -c -ui 1
  3. Copy CeLog.dll and OSCapture.exe into the \Windows directory of the target device.
  4. Copy the .lnk files you created in step 1 and step 2 into the same directory as the Start menu on the target device.
  5. From the Start menu, choose LOAD.lnk.

    This step configures the log file settings, and causes OSCapture.exe begin buffering debug output in a limited-size RAM buffer. It will buffer approximately 60 seconds of debug messages, or 1MB, whichever is smaller. If the messages overfill the buffer, it will keep the most recent data.

  6. Perform the actions you want to collect output for.
  7. From the Start menu, choose STORE.lnk.

    OSCapture.exe saves the buffered debug messages to a file named celog.clg in the root directory of the device.

    You can repeat steps 6 and 7 as often as needed to add the data you want to the output text file. The instance of OSCapture that you started in step 5 continues to buffer data in the background after you run step 7 to trigger it to flush data to a file.

  8. When you are done collecting data, copy celog.clg to a storage location off the device.
  9. To read the saved output, use the Readlog Viewing Tool.

    The following line shows how use Readlog to parse a log file called celog.clg and store readable text into a file called output.txt.

    Readlog celog.clg output.txt

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。