DLT-SORTBYTIMESTAMP(1)

πŸ’– DLT-SORTBYTIMESTAMP β€” the manual, but make it make sense πŸ’–

okay bestie, welcome to dlt-sortbytimestamp(1) β€” yes that's the whole manual name, section 1, we're in the big leagues now ✨


🌸 NAME 🌸

dlt-sortbytimestamp β€” re-order DLT Logging files according to message creation time and timestamp. no cap, that's literally the whole job πŸŽ€


✨ SYNOPSIS ✨

dlt-sortbytimestamp [-h] [-v] [-c] [-f filterfile] [-b number] [-e number] dltfile_in dltfile_out

two files in, one beautiful sorted file out. the way that syntax just flows πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea. by default, messages in DLT files are ordered according to the time the logger received them. and like... that's fine, until it isn't 😭

it gets unhelpful when you're tracing a sequence of events on a busy multi-threaded/multi-core system, because thread pre-emption combined with multiple processes attempting to log messages simultaneously means that the order in which the messages are received may vary significantly from the order in which they were created. it's giving chaos. it's giving "who logged first, nobody knows" πŸ’€

and that's where our girl comes in β€” dlt-sortbytimestamp is able to re-order a DLT input file's messages according both their creation time and timestamp, and writes them to an output DLT file. icon behaviour, honestly πŸ‘‘


πŸ™ˆ NOTE πŸ™ˆ

listen closely bestie: use the -b and/or -e options to specify a range of messages within a single reboot cycle and all will be well. 🫢

Hint: use dlt-viewer to ascertain the endpoints of the range in question. it's the vibe check for your index numbers, iykyk πŸ”₯


πŸ’… OPTIONS πŸ’…

  • -h β€” Display a short help text. the lil "hey here's what I do" moment πŸŽ€
  • -v β€” Verbose mode. Repeat to give more information. the more you repeat it, the more it spills β˜•
  • -c β€” Count number of messages. just a lil census, no big deal 🧚
  • -f β€” Enable filtering of messages. Incompatible with range options. so like, pick a lane babe, you cannot do both 🚫
  • -b β€” First message to be handled. Zero based index. (zero based!! don't forget!! πŸ™ˆ)
  • -e β€” Last message to be handled. Zero based index. the finale, the closing act 🌈

⭐ EXAMPLES ⭐

sort an entire file by message timestamp:

dlt-sortbytimestamp input.dlt output.dlt

sort a specific range, e.g. from message 1,000,000 to message 1,500,000 from a file called input.dlt and store the result in a file called output.dlt:

dlt-sortbytimestamp -b 1000000 -e 1500000 input.dlt output.dlt

see how clean that is?? ate and left no crumbs πŸ”₯


πŸ’€ EXIT STATUS πŸ’€

Non zero is returned in case of failure. so if the number isn't zero, something went wrong and we're all a little sad 😭


πŸ‘‘ AUTHOR πŸ‘‘

  • Jonathan Sambrook (jonathan.sambrook (at) codethink (dot) co (dot) uk)
  • Alexander Wenzel (alexander.aw.wenzel (at) bmw (dot) de)

legends, both of them, fr fr πŸ’œ


Copyright (C) 2018 Codethink Ltd. Copyright (C) 2015 BMW AG. License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.

legal stuff but make it cute β€” MPL-2.0 girlies rise 🫢


πŸ“ BUGS πŸ“

See Github issue: https://github.com/COVESA/dlt-daemon/issues

if something's cursed, go tell the internet about it, that's the system πŸ’–


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, go say hi 🌸


and that's the page bestie!! this manual is DLT-SORTBYTIMESTAMP(1) β€” section 1, the one and only β€” and yes, the footer at the very bottom of the original just says the exact same DLT-SORTBYTIMESTAMP(1) thing all over again, which is giving main character energy, honestly. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from