Git Product home page Git Product logo

etwrealtime's Introduction

Windows Event Trace (ETW) Example

This is a simple Win32 console application that demonstrates the use of simultaneous realtime sessions of the standard NT kernel logger and NDIS packet capture (Win7+).

Elevated privileges required

Processes that make use of ETW require debugging privileges.

Packet Capture

Requires that you run a netsh command-line for wiring up NDIS monitoring. Notice that I ask for truncated packets... full packet capture without specialized hardware is too much load, and will lead to dropped events. The first 98 bytes of packets are enough to get the layer headers for IPV4 and IPV6.

netsh.exe trace start capture=yes report=no correlation=no PacketTruncateBytes=98 maxSize=16m

Delayed Events and Flood of Events at Start

After trace sessions have been established for a while, and you restart your application (e.g. this example), you will get a flood of events. This is because ETW is buffered. It appears that ETW will send you everything it has buffered up, and once caught-up, new events. You need to plan for this, and ignore buffered events.

Additionally, consider that events such as packets are not really 'real time'. There is a delay of several seconds between an action (a packet sent on wire or new process start) and the event to be reported to your application.

References

Thank you,

Alex Malone, Ziften Technologies Inc.

etwrealtime's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.