STAP-MERGE(1)

✨ NAME ✨

stap-merge β€” the systemtap per-cpu binary merger, bestie πŸ’…

It's the little tool that stitches your per-cpu chaos back into one (1) single, orderly stream. No cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

stap-merge [ OPTIONS ] [ INPUT FILENAMES ]

🌸 DESCRIPTION 🌸

okay so picture this: you ran a stap script and you used the -b option. iconic. but here's the thing β€” -b doesn't give you one file, it gives you a whole file per-cpu, all split up based on the timestamp field. it's giving "my notes are in seven different apps" energy ngl 😭

that's literally where stap-merge comes in. it merges and sorts through all those per-cpu files, again using that timestamp field, and hands you back one coherent timeline. main character behavior, honestly. πŸ‘‘


πŸ’– OPTIONS πŸ’–

the systemtap merge executable supports the following options. she's not complicated, she's just picky ✨

  • -v β€” Verbose mode πŸ—£οΈ. This displays three extra fields per set of collected data:
[cpunumber,sequencenumberofdata,thelengthofthedataset]
  • -o OUTPUT_FILENAME β€” Specify the name of the file you would like the output to be redirected into πŸŽ€. If this option is not specified then the output will be pushed to standard out. (so like, if you don't say where it goes, it just vibes onto your terminal πŸ’«)

🌈 EXAMPLES 🌈

first, run your stap script with -b:

$ stap -v -b -e 'probe syscall.open { printf("%s(%d) open\n",
execname(), pid()) }'

this should result in several stpd_cpu files β€” each one labled with a number representing which cpu the file was produced from. yes, labled. that's what the page says. we don't fix, we preserve 🫢

then:

$ stap-merge -v stpd_cpu0 stpd_cpu1

running the stap-merge program in the same directory as the stap script from earlier in the example will produce an ordered sequence of packets with the three part label for each set of data. this result will be pushed through the standard output. an output file could have been specified using the -o option β€” your call, bestie πŸ’…


πŸ—‚οΈ FILES πŸ—‚οΈ

important files and their corresponding paths can be located in the stappaths (7) manual page. go look, it's got the receipts πŸ“‹


πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, fr fr 🫢


πŸ’€ BUGS πŸ’€

use the Bugzilla link of the project web page or our mailing list.

http://sourceware.org/systemtap/,<systemtap@sourceware.org>

(not me asking you to file a bug like it's a group chat message πŸ™ˆ but genuinely, they wanna hear it)


reminder: all the flags, filenames and paths up there are literal β€” copy them exactly, don't freestyle. ✨

and that's the whole page, bestie πŸ’œ this was STAP-MERGE(1) from the General Commands Manual β€” go merge those cpus, slay, periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from