Skip to content

Instantly share code, notes, and snippets.

@wenjianhn
Created January 8, 2015 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wenjianhn/5865ca10831c46b0ba08 to your computer and use it in GitHub Desktop.
Save wenjianhn/5865ca10831c46b0ba08 to your computer and use it in GitHub Desktop.
trace ceph osd skb in kernel.function("tcp_transmit_skb")
#! /usr/bin/env stap
probe begin {
printf("Started...\n")
}
probe kernel.function("tcp_transmit_skb") {
if (execname() == "ceph-osd") {
printf("%s(pid: %d, tid: %d)\n", execname(), pid(), tid());
printf("priority: %ld %15s:%-5d ---> %s:%d\n\n",
$sk->sk_priority,
ip_ntop(ntohl(tcpmib_local_addr($sk))),
tcpmib_local_port($sk),
ip_ntop(ntohl(tcpmib_remote_addr($sk))),
tcpmib_remote_port($sk))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment