All of lore.kernel.org
 help / color / mirror / Atom feed
From: avidanborisov@gmail.com
To: linux-trace-devel@vger.kernel.org
Cc: rostedt@goodmis.org, avidanborisov@gmail.com
Subject: [PATCH v2 4/4] trace-cmd record: Add --daemonize example to man page
Date: Mon, 26 Jun 2023 12:16:35 +0300	[thread overview]
Message-ID: <20230626091635.3002827-5-avidanborisov@gmail.com> (raw)
In-Reply-To: <20230626091635.3002827-1-avidanborisov@gmail.com>

From: Avidan Borisov <avidanborisov@gmail.com>

Add a small usage example of how --daemonize can be used with guest/host tracing for analyzing network activity.

Signed-off-by: Avidan Borisov <avidanborisov@gmail.com>
---
 .../trace-cmd/trace-cmd-record.1.txt          | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/Documentation/trace-cmd/trace-cmd-record.1.txt b/Documentation/trace-cmd/trace-cmd-record.1.txt
index 0c9a914..79ab3d0 100644
--- a/Documentation/trace-cmd/trace-cmd-record.1.txt
+++ b/Documentation/trace-cmd/trace-cmd-record.1.txt
@@ -515,6 +515,35 @@ task: sleep-21611
        => try_to_wake_up (0xffffffff8106340a)
 ----
 
+An example of using --daemonize together with guest/host tracing:
+[source,shell]
+----
+$ sudo trace-cmd record --daemonize -p nop -e 'sched:sched_process_exec' -A guest -p nop -e net &&
+> ping -c 1 10.20.1.2 &&
+> sudo start-stop-daemon --stop --signal INT --retry 20 --pidfile /var/run/trace-cmd-record.pid &&
+> sudo trace-cmd report -i trace.dat -i trace-guest.dat | head
+Negotiated kvm time sync protocol with guest guest
+Send SIGINT to pid 3071371 to stop recording
+PING 10.20.1.2 (10.20.1.2) 56(84) bytes of data.
+64 bytes from 10.20.1.2: icmp_seq=1 ttl=64 time=0.134 ms
+--- 10.20.1.2 ping statistics ---
+1 packets transmitted, 1 received, 0% packet loss, time 0ms
+rtt min/avg/max/mdev = 0.134/0.134/0.134/0.000 ms
+CPU0 data recorded at offset=0x14f000
+    229 bytes in size (4096 uncompressed)
+....
+      trace.dat: cpus=28
+trace-guest.dat: cpus=1
+      trace.dat:           ping-3071450 [013] 1196830.834258: sched_process_exec:     filename=/bin/ping pid=3071450 old_pid=3071450
+trace-guest.dat:           <idle>-0     [000] 1196830.835990: napi_gro_receive_entry: dev=eth1 napi_id=0x2002 queue_mapping=1 skbaddr=0xffff95d051a5c400 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 ip_summed=0 hash=0x00000000 l4_hash=0 len=84 data_len=0 truesize=768 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0
+trace-guest.dat:           <idle>-0     [000] 1196830.835997: napi_gro_receive_exit:  ret=3
+trace-guest.dat:           <idle>-0     [000] 1196830.835998: netif_receive_skb:      dev=eth1 skbaddr=0xffff95d051a5c400x len=84
+trace-guest.dat:           <idle>-0     [000] 1196830.836021: net_dev_queue:          dev=eth1 skbaddr=0xffff95d051a5c700x len=98
+trace-guest.dat:           <idle>-0     [000] 1196830.836024: net_dev_start_xmit:     dev=eth1 queue_mapping=0 skbaddr=0xffff95d051a5c700 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 ip_summed=0 len=98 data_len=0 network_offset=14 transport_offset_valid=1 transport_offset=34 tx_flags=0 gso_size=0 gso_segs=0 gso_type=0
+trace-guest.dat:           <idle>-0     [000] 1196830.836069: net_dev_xmit:           dev=eth1 skbaddr=0xffff95d051a5c700 len=98 rc=0
+      trace.dat:           sudo-3071451 [015] 1196830.838262: sched_process_exec:     filename=/usr/bin/sudo pid=3071451 old_pid=3071451
+----
+
 SEE ALSO
 --------
 trace-cmd(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1),
-- 
2.25.1


  parent reply	other threads:[~2023-06-26  9:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 20:31 [PATCH 0/3] trace-cmd record: Support daemonization after recording starts avidanborisov
2023-05-01 20:31 ` [PATCH 1/3] trace-cmd record: Add --daemonize avidanborisov
2023-05-30  8:55   ` Steven Rostedt
2023-05-01 20:31 ` [PATCH 2/3] trace-cmd: export pidfile functions from trace-listen.c avidanborisov
2023-05-01 20:31 ` [PATCH 3/3] trace-cmd record: Create a pidfile when using --daemonize avidanborisov
2023-05-30  8:51 ` [PATCH 0/3] trace-cmd record: Support daemonization after recording starts Steven Rostedt
2023-06-26  9:16   ` [PATCH v2 0/4] trace-cmd record: Improvements to --daemonize option avidanborisov
2023-06-26  9:16     ` [PATCH v2 1/4] trace-cmd record: Add --daemonize avidanborisov
2023-07-06  0:13       ` Steven Rostedt
2023-07-06  0:19       ` Steven Rostedt
2023-06-26  9:16     ` [PATCH v2 2/4] trace-cmd: export pidfile functions from trace-listen.c avidanborisov
2023-06-26  9:16     ` [PATCH v2 3/4] trace-cmd record: Create a pidfile when using --daemonize avidanborisov
2023-06-26  9:16     ` avidanborisov [this message]
2023-07-02  1:39     ` [PATCH v2 0/4] trace-cmd record: Improvements to --daemonize option Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230626091635.3002827-5-avidanborisov@gmail.com \
    --to=avidanborisov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.