UFTRACE-RECV(1)

✨ uftrace-recv ✨

okay bestie, this is uftrace-recv(1), a page from the Uftrace User Manuals, and honestly? it's giving receiver era πŸ’…


πŸŽ€ NAME πŸŽ€

uftrace-recv β€” Receive tracing data from socket and save it to files


πŸ¦‹ SYNOPSIS πŸ¦‹

uftrace recv [options]

πŸ’– DESCRIPTION πŸ’–

So like, this command catches tracing data coming in over the network and saves all of it into files. That's it, that's the job. 🌸

The data on the other end gets sent by uftrace-record when you give it the --host option. So it's a whole two-party situation: one program sends, this one receives. No cap.


✨ OPTIONS ✨

  • -d DATA, --data=DATA β€” tell it which directory name to save the received data into. Pick a cute one. πŸŽ€
  • --port=PORT β€” use this port instead of the default, which is 8090. Yes bestie, 8090 is the fallback. Mark it. 🫢
  • --run-cmd=COMMAND β€” run the given (shell) command the moment data arrives. For example, you could run uftrace replay on the data you just received. Instant gratification, periodt. πŸ”₯

πŸ‘‘ EXAMPLE πŸ‘‘

Heads up: you gotta run uftrace recv before anybody sends data with the record command. Receiver first, always. 🧚

# HOST
$ uftrace recv -d recv_data --port 1234

That command up there starts a server on the port you gave it (and if you don't give one, it's the default 8090) so it can receive data from a remote client. πŸ’œ

# CLIENT
$ uftrace record -d example_data --host localhost --port 1234 example

^^ that one sends the trace data over to the remote server pointed at by the --host option you gave it (localhost in this case), and it does that after running the example program. And see how you can pick your save directory with the -d option? Sending data saves to example_data here. Slay. ✨

# HOST : Check received data
$ uftrace replay -d recv_data/example_data
# DURATION    TID     FUNCTION
            [17308] | main() {
            [17308] |   a() {
            [17308] |     b() {
            [17308] |       c() {
   1.058 us [17308] |         getpid();
   4.356 us [17308] |       } /* c */
   4.664 us [17308] |     } /* b */
   4.845 us [17308] |   } /* a */
   5.076 us [17308] | } /* main */

You'll find the saved trace data of example sitting inside recv_data's subdirectory, example_data. And obviously bestie, you check it at the HOST. πŸ™ˆ


🌈 SEE ALSO 🌈

uftrace(1), uftrace-record(1)


πŸ’œ AUTHORS πŸ’œ

Namhyung Kim <namhyung@gmail.com>


and that's the whole page, bestie β€” no crumbs left behind πŸ’… this was Uftrace User Manuals, Sep, 2018, and you just read UFTRACE-RECV(1). go receive something iconic 🫢✨
πŸ“¦ where this page comes from