text
stringlengths
0
4.23k
real-time
Display events and packets on screen at real time. No log file is created. Press Ctrl+C to stop monitoring.
memory
Like circular, but the entire log is stored in memory. It is written to a file when pktmon is stopped. Memory buffer size is specified in [--file-size] parameter.
Examples
Example 1: Packet capture
C:\Test> pktmon start --capture
Example 2: Packet counters only
C:\Test> pktmon start --capture --counters-only
Example 3: Event logging
C:\Test> pktmon start --trace -p Microsoft-Windows-TCPIP -p Microsoft-Windows-NDIS
Example 4: Packet capture with event logging
C:\Test> pktmon start --capture --trace -p Microsoft-Windows-TCPIP -k 0xFF -l 4
pktmon status
Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Azure Stack HCI, Azure Stack Hub, Azure
Query current Packet Monitor status.
Syntax
pktmon status [--buffer-info]
Parameters
Parameter
Description
-b, --buffer-info
Display ETW buffer information.
pktmon unload
Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Azure Stack HCI, Azure Stack Hub, Azure
Stop the PktMon driver service and unload PktMon.sys. Effectively equivalent to 'sc.exe stop PktMon'. Measurement (if active) will immediately stop, and any state will be deleted (counters, filters, etc.).
Syntax
pktmon unload
pktmon
Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Azure Stack HCI, Azure Stack Hub, Azure
Packet Monitor (Pktmon) is an in-box, cross-component network diagnostics tool for Windows. It can be used for advanced packet capture and event collection, drop detection, filtering, and counting. Pktmon is especially helpful in virtualization scenarios such as container networking and SDN, because it provides visibility within the networking stack.
Syntax
pktmon { filter | list | start | stop | status | unload | counters | reset | etl2txt | etl2pcap | hex2pkt | help } [options]
Commands
Command
Description
pktmon filter
Manage packet filters.
pktmon list
List packet processing components.
pktmon start
Start packet capture and event collection.
pktmon stop
Stop data collection.
pktmon status
Query current status.
pktmon unload
Unload PktMon driver.
pktmon counters
Display current packet counters.
pktmon reset
Reset packet counters to zero.
pktmon etl2txt
Convert log file to text format.
pktmon etl2pcap
Convert log file to pcapng format.
pktmon hex2pkt
Decode packet in hexadecimal format.