diff options
Diffstat (limited to 'testsuite/systemtap.examples/io')
-rw-r--r-- | testsuite/systemtap.examples/io/iostat-scsi.meta | 2 | ||||
-rw-r--r-- | testsuite/systemtap.examples/io/mbrwatch.meta | 6 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/io/mbrwatch.stp | 9 | ||||
-rw-r--r-- | testsuite/systemtap.examples/io/ttyspy.meta | 1 |
4 files changed, 17 insertions, 1 deletions
diff --git a/testsuite/systemtap.examples/io/iostat-scsi.meta b/testsuite/systemtap.examples/io/iostat-scsi.meta index a5fe7a8f..6aa4c5d9 100644 --- a/testsuite/systemtap.examples/io/iostat-scsi.meta +++ b/testsuite/systemtap.examples/io/iostat-scsi.meta @@ -9,6 +9,6 @@ exit: user-controlled output: timed scope: system-wide description: The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports. -test_support: stap -l module("st").function("st_do_scsi")!,kernel.function("st_do_scsi") +test_support: stap -l 'module("st").function("st_do_scsi")!,kernel.function("st_do_scsi")' test_check: stap -g -p4 iostat-scsi.stp 1 test_installcheck: stap -g iostat-scsi.stp 1 -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/mbrwatch.meta b/testsuite/systemtap.examples/io/mbrwatch.meta new file mode 100644 index 00000000..0ff88b13 --- /dev/null +++ b/testsuite/systemtap.examples/io/mbrwatch.meta @@ -0,0 +1,6 @@ +title: Monitor read/write of MBR (boot sector) area of block devices +name: mbrwatch.stp +keywords: io monitoring +description: The mbrwatch.stp script reports any attempted reads/writes of the first few sectors of a raw block device. +test_check: stap -p4 mbrwatch.stp +test_installcheck: stap mbrwatch.stp -c "dd of=/dev/null count=1 if=/dev/`grep -v major /proc/partitions | grep . | awk '{print $4}' | head -1`" diff --git a/testsuite/systemtap.examples/io/mbrwatch.stp b/testsuite/systemtap.examples/io/mbrwatch.stp new file mode 100755 index 00000000..f981073e --- /dev/null +++ b/testsuite/systemtap.examples/io/mbrwatch.stp @@ -0,0 +1,9 @@ +#! /usr/bin/env stap + +probe ioblock.request { + if (bdev==bdev_contains && sector<4) { + printf("device %s sector %d %s, process %s[%d]\n", + devname, sector, (rw==BIO_READ ? "read":"write"), execname(), pid()) + print_backtrace() + } +} diff --git a/testsuite/systemtap.examples/io/ttyspy.meta b/testsuite/systemtap.examples/io/ttyspy.meta index b190eafd..ea1c9040 100644 --- a/testsuite/systemtap.examples/io/ttyspy.meta +++ b/testsuite/systemtap.examples/io/ttyspy.meta @@ -2,5 +2,6 @@ title: Monitor tty typing. name: ttyspy.stp keywords: io tty per-process monitor description: The ttyspy.stp script uses tty_audit hooks to monitor recent typing activity on the system, printing a scrolling record of recent keystrokes, on a per-tty basis. +test_support: stap -l 'kernel.function("tty_audit_add_data")' test_check: stap -gp4 ttyspy.stp test_installcheck: stap --skip-badvars -g ttyspy.stp -c "sleep 1" |