global device_of_interest probe begin { /* The following is not the most efficient way to do this. One could directly put the result of usrdev2kerndev() into device_of_interest. However, want to test out the other device functions */ dev = usrdev2kerndev($1) device_of_interest = MKDEV(MAJOR(dev), MINOR(dev)) } probe kernel.function ("vfs_write"), kernel.function ("vfs_read") { dev_nr = $file-> %( kernel_v < "2.6.19" %? f_dentry %: f_path->dentry %) ->d_inode->i_sb->s_dev if (dev_nr == device_of_interest) printf ("%s(%d) %s 0x%x\n", execname(), pid(), probefunc(), dev_nr) }