NET-MQTT-TRACE(1)

πŸ“¦ version 1.163170, in alpine 3.24

πŸ’… NET-MQTT-TRACE πŸ’…

okay so bestie, this is net-mqtt-trace β€” a Perl script for decoding MQTT messages from IP packets, living its best life in the User Contributed Perl Documentation section. iykyk 🫢

✨ VERSION ✨

version 1.163170 β€” yes she has a version number and yes she's proud of it πŸŽ€

🌸 SYNOPSIS 🌸

net-mqtt-trace [options] {dev|dumpfile}

# live decode
# decode MQTT packets that are visible on the interface eth0
net-mqtt-trace eth0

# batch decode
# sniff 100 MQTT packets from eth0 and write them to mqtt.tcp
# then later decode MQTT messages from tcpdump file
tcpdump -w mqtt.tcp -i eth0 -c 100 -s 4096 tcp and port 1883
net-mqtt-trace mqtt.tcp

like, two whole moods: sniffs it live off an interface, or reads a tcpdump file later. both iconic ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so this script is literally an MQTT message decoder for IP packets, no cap. you can decode packets live by sniffing traffic on a network interface, or you can batch process them by reading them out of a tcpdump file. both are valid, both slay πŸ’–

πŸ‘‘ OPTIONS πŸ‘‘

  • -help β€” prints a brief help message. the "hi, what do you need" of flags 🌈
  • -man β€” prints the manual page. very meta, very main character πŸ’…
  • -verbose β€” gives you more verbose output. by default you only get a little output at the start and end of processing, but this turns on extra stuff β€” including a summary of the counts of the different packets decoded. the tea β˜•
  • -quiet β€” removes even the basic verbose output. she is silence, she is peace πŸ™ˆ
  • -link β€” prints link layer info (assumed to be Ethernet). you can repeat this option to get further output. repeat for more, periodt πŸ”₯
  • -ip β€” prints ip layer information. also repeatable for further output ✨
  • -tcp β€” prints TCP layer information. repeatable too, bestie πŸŽ€
  • -mqtt β€” prints MQTT message information. guess what β€” also repeatable for further output πŸ¦‹
  • -count NNN β€” stops processing after the given number of packets. default is to process all the packets, which is lowkey a lot 😭
  • -snaplen NNN β€” maximum length of data to capture for each packet. default is 65535. ngl this one only gets used when you're capturing directly from a device πŸ’€
  • -promisc β€” turns on promiscuous mode. default is off. again, only used when capturing directly from a device πŸ‘€
  • -timeout NNN β€” the read timeout in milliseconds. default is 0 (aka no timeout). and yes, only used when capturing directly from a device 🌸

⭐ SEE ALSO ⭐

Net::MQTT::Message(3), Net::Pcap(3), tcpdump(8) β€” go read these, they're the supporting cast and they ate πŸ’œ

πŸ’– AUTHOR πŸ’–

Mark Hindess <soft-cpan@temporalanomaly.com> β€” the icon who made this happen 🫢

This software is copyright (c) 2014 by Mark Hindess.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, free software fr fr πŸ’…


and that's the whole vibe check, bestie β€” page brought to you by perl v5.42.2, dated 2026-02-15, from the NET-MQTT-TRACE(1) manual. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from