Last active
August 29, 2015 14:13
-
-
Save wenjianhn/b080029540db4ccb24db to your computer and use it in GitHub Desktop.
trace ceph osd socket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env stap | |
probe syscall.accept { | |
if (execname() != "ceph-osd") next; | |
printf("pid: %d tid: %d. accept(%s)\n", pid(), tid(), argstr) | |
} | |
probe syscall.accept.return { | |
if (execname() != "ceph-osd") next; | |
printf("pid: %d tid: %d. accept returns fd: %s\n", pid(), tid(), retstr) | |
} | |
probe syscall.setsockopt | |
{ | |
if (execname() != "ceph-osd") next; | |
printf("pid: %d tid: %d. setsockopt(fd: %d, level: %s, optname: %s, optlen: %u)\n", | |
pid(), tid(), fd, level_str, optname_str, optlen) | |
} | |
probe syscall.close { | |
if (execname() != "ceph-osd") next; | |
printf("pid: %d tid: %d. close(%s)\n", pid(), tid(), argstr) | |
} | |
probe syscall.shutdown { | |
if (execname() != "ceph-osd") next; | |
printf("pid: %d tid: %d. shutdown(%s)\n", pid(), tid(), argstr) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment