Table of Contents > Reference

Example Graphing Scripts

Provided below are a few scripts that you can use with the Graphing Perspective.

readwrite.stp

Counts the reads and writes that occur and provide this information once per second.

global read, write, startasdfasdf

probe begin {
   start = gettimeofday_s()
}
probe syscall.write {
   write += count
}

probe syscall.read {
   read += count
}

probe timer.ms(1000) {
   printf("%d\t%d\t%d\n", (gettimeofday_s()-start), read, write)
   read=0
   write=0
}