Skip to content

Commit

Permalink
probe-alias.stp - probe point aliases example.
Browse files Browse the repository at this point in the history
  • Loading branch information
soarpenguin committed Jan 9, 2013
1 parent 0b11cae commit 739e0e0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions probe-alias.stp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/stap

global groups

probe begin {
printf("Collecting data... press Ctrl-C to stop.\n")
}

probe syscallgroup.io = syscall.open, syscall.close,
syscall.read, syscall.write
{ groupname = "io" }

probe syscallgroup.process = syscall.fork, syscall.execve
{ groupname = "process" }

probe syscallgroup.*
{ groups [execname() . "/" . groupname]++ }

probe end {
foreach(eg+ in groups)
printf("%s: %d\n", eg, groups[eg])
}

0 comments on commit 739e0e0

Please sign in to comment.