DTrace
可以通过-x
指定编译或运行时的选项。以下列命令为例:
# dtrace -n 'syscall::write:entry /pid == $target/ { printf("Written %d bytes\n", arg2); }' -c "dd if=/dev/zero of=/dev/null count=1"
dtrace: description 'syscall::write:entry ' matched 2 probes
1+0 records in
1+0 records out
512 bytes transferred in 0.00003[......]