/usr/share/systemtap/tapset/linux
NameSizeModeActions
arm/-0755rm
arm64/-0755rm
i386/-0755rm
ia64/-0755rm
mips/-0755rm
powerpc/-0755rm
riscv/-0755rm
s390/-0755rm
x86_64/-0755rm
atomic.stp15630644editdlrm
aux_syscalls.stp1517020644editdlrm
context-caller.stp31480644editdlrm
context-envvar.stp17610644editdlrm
context-symbols.stp122760644editdlrm
context-unwind.stp32830644editdlrm
context.stp190150644editdlrm
context.stpm1250644editdlrm
conversions-guru.stp58760644editdlrm
conversions.stp172730644editdlrm
ctime.stp57500644editdlrm
dentry.stp106670644editdlrm
dev.stp20740644editdlrm
endian.stp6020644editdlrm
errno.stpm570644editdlrm
guru-delay.stp12300644editdlrm
guru-signal.stp10920644editdlrm
inet.stp14560644editdlrm
inet.stpm3830644editdlrm
inet_sock.stp12820644editdlrm
ioblock.stp155970644editdlrm
ioscheduler.stp140980644editdlrm
ip.stp54830644editdlrm
ipmib-filter-default.stp9650644editdlrm
ipmib.stp129810644editdlrm
irq.stp51200644editdlrm
json.stp91940644editdlrm
json.stpm62560644editdlrm
kprocess.stp47500644editdlrm
kretprobe.stp21530644editdlrm
linuxmib-filter-default.stp8760644editdlrm
linuxmib.stp37180644editdlrm
loadavg.stp19950644editdlrm
logging.stp25850644editdlrm
memory.stp192190644editdlrm
netfilter.stp363560644editdlrm
networking.stp96560644editdlrm
nfs.stp389970644editdlrm
nfsd.stp473790644editdlrm
nfsderrno.stp119790644editdlrm
nfs_proc.stp583250644editdlrm
nfs_proc.stpm12880644editdlrm
panic.stp10920644editdlrm
perf.stp52840644editdlrm
proc_mem.stp127020644editdlrm
pstrace.stp7730644editdlrm
rcu.stp9280644editdlrm
rlimit.stp13820644editdlrm
rpc.stp385780644editdlrm
scheduler.stp116610644editdlrm
scsi.stp97210644editdlrm
signal.stp293710644editdlrm
socket.stp350240644editdlrm
syscalls.stpm146430644editdlrm
syscalls_cfg_trunc.stp1110644editdlrm
syscall_any.stp15600644editdlrm
syscall_table.stp14750644editdlrm
sysc_accept.stp78680644editdlrm
sysc_accept4.stp78640644editdlrm
sysc_access.stp29110644editdlrm
sysc_acct.stp25830644editdlrm
sysc_add_key.stp35320644editdlrm
sysc_adjtimex.stp56720644editdlrm
sysc_alarm.stp28330644editdlrm
sysc_bdflush.stp31130644editdlrm
sysc_bind.stp69650644editdlrm
sysc_bpf.stp27380644editdlrm
sysc_brk.stp26290644editdlrm
sysc_capget.stp31010644editdlrm
sysc_capset.stp31020644editdlrm
sysc_chdir.stp26160644editdlrm
sysc_chmod.stp29590644editdlrm
sysc_chown.stp37750644editdlrm
sysc_chown16.stp31150644editdlrm
sysc_chroot.stp26790644editdlrm
sysc_clock_adjtime.stp52430644editdlrm
sysc_clock_getres.stp42480644editdlrm
sysc_clock_gettime.stp40350644editdlrm
sysc_clock_nanosleep.stp80410644editdlrm
sysc_clock_settime.stp55540644editdlrm
sysc_clone.stp67080644editdlrm
sysc_close.stp27710644editdlrm
sysc_connect.stp74520644editdlrm
sysc_copy_file_range.stp37690644editdlrm
sysc_creat.stp27280644editdlrm
sysc_delete_module.stp33660644editdlrm
sysc_dup.stp23830644editdlrm
sysc_dup2.stp29910644editdlrm
sysc_dup3.stp30730644editdlrm
sysc_epoll_create.stp57420644editdlrm
sysc_epoll_ctl.stp39980644editdlrm
sysc_epoll_pwait.stp41570644editdlrm
sysc_epoll_wait.stp48500644editdlrm
sysc_eventfd.stp54110644editdlrm
sysc_execve.stp62570644editdlrm
sysc_execveat.stp69420644editdlrm
sysc_exit.stp19840644editdlrm
sysc_exit_group.stp21460644editdlrm
sysc_faccessat.stp37360644editdlrm
sysc_faccessat2.stp44340644editdlrm
sysc_fadvise64.stp86390644editdlrm
sysc_fallocate.stp39180644editdlrm
sysc_fanotify_init.stp34320644editdlrm
sysc_fanotify_mark.stp75720644editdlrm
sysc_fchdir.stp25250644editdlrm
sysc_fchmod.stp28800644editdlrm
sysc_fchmodat.stp37340644editdlrm
sysc_fchown.stp37220644editdlrm
sysc_fchown16.stp30230644editdlrm
sysc_fchownat.stp39030644editdlrm
sysc_fcntl.stp48060644editdlrm
sysc_fdatasync.stp26920644editdlrm
sysc_fgetxattr.stp37200644editdlrm
sysc_finit_module.stp33820644editdlrm
sysc_flistxattr.stp30000644editdlrm
sysc_flock.stp25790644editdlrm
sysc_fork.stp25860644editdlrm
sysc_fremovexattr.stp32290644editdlrm
sysc_fsetxattr.stp41870644editdlrm
sysc_fstat.stp61630644editdlrm
sysc_fstatat.stp57890644editdlrm
sysc_fstatfs.stp32660644editdlrm
sysc_fstatfs64.stp32400644editdlrm
sysc_fsync.stp24190644editdlrm
sysc_ftruncate.stp62120644editdlrm
sysc_futex.stp58100644editdlrm
sysc_futimesat.stp66390644editdlrm
sysc_getcpu.stp30340644editdlrm
sysc_getcwd.stp27470644editdlrm
sysc_getdents.stp56180644editdlrm
sysc_getegid.stp35420644editdlrm
sysc_geteuid.stp34840644editdlrm
sysc_getgid.stp34020644editdlrm
sysc_getgroups.stp42740644editdlrm
sysc_gethostname.stp12490644editdlrm
sysc_getitimer.stp53550644editdlrm
sysc_getpeername.stp75220644editdlrm
sysc_getpgid.stp28590644editdlrm
sysc_getpgrp.stp20900644editdlrm
sysc_getpid.stp20310644editdlrm
sysc_getppid.stp21120644editdlrm
sysc_getpriority.stp29430644editdlrm
sysc_getrandom.stp31840644editdlrm
sysc_getresgid.stp41720644editdlrm
sysc_getresuid.stp39720644editdlrm
sysc_getrlimit.stp44600644editdlrm
sysc_getrusage.stp38030644editdlrm
sysc_getsid.stp25090644editdlrm
sysc_getsockname.stp75500644editdlrm
sysc_getsockopt.stp85200644editdlrm
sysc_gettid.stp20570644editdlrm
sysc_gettimeofday.stp40780644editdlrm
sysc_getuid.stp34270644editdlrm
sysc_getxattr.stp38120644editdlrm
sysc_get_mempolicy.stp46710644editdlrm
sysc_get_robust_list.stp45720644editdlrm
sysc_init_module.stp32410644editdlrm
sysc_inotify_add_watch.stp38610644editdlrm
sysc_inotify_init.stp55480644editdlrm
sysc_inotify_rm_watch.stp32770644editdlrm
sysc_ioctl.stp35360644editdlrm
sysc_ioperm.stp28190644editdlrm
sysc_ioprio_get.stp30180644editdlrm
sysc_ioprio_set.stp32470644editdlrm
sysc_io_cancel.stp33180644editdlrm
sysc_io_destroy.stp28160644editdlrm
sysc_io_getevents.stp49940644editdlrm
sysc_io_setup.stp38380644editdlrm
sysc_io_submit.stp39830644editdlrm
sysc_kcmp.stp30070644editdlrm
sysc_kexec_file_load.stp40410644editdlrm
sysc_kexec_load.stp45130644editdlrm
sysc_keyctl.stp37220644editdlrm
sysc_kill.stp25910644editdlrm
sysc_lchown.stp38800644editdlrm
sysc_lchown16.stp31940644editdlrm
sysc_lgetxattr.stp39120644editdlrm
sysc_link.stp28850644editdlrm
sysc_linkat.stp40050644editdlrm
sysc_listen.stp66240644editdlrm
sysc_listxattr.stp33180644editdlrm
sysc_llistxattr.stp33790644editdlrm
sysc_llseek.stp33710644editdlrm
sysc_lookup_dcookie.stp40890644editdlrm
sysc_lremovexattr.stp40010644editdlrm
sysc_lseek.stp45000644editdlrm
sysc_lsetxattr.stp40970644editdlrm
sysc_lstat.stp64550644editdlrm
sysc_madvise.stp29760644editdlrm
sysc_mbind.stp43030644editdlrm
sysc_membarrier.stp30170644editdlrm
sysc_memfd_create.stp32470644editdlrm
sysc_memfd_secret.stp28150644editdlrm
sysc_migrate_pages.stp43740644editdlrm
sysc_mincore.stp29000644editdlrm
sysc_mkdir.stp28970644editdlrm
sysc_mkdirat.stp34450644editdlrm
sysc_mknod.stp29580644editdlrm
sysc_mknodat.stp36440644editdlrm
sysc_mlock.stp26180644editdlrm
sysc_mlock2.stp28820644editdlrm
sysc_mlockall.stp27710644editdlrm
sysc_mmap2.stp62290644editdlrm
sysc_modify_ldt.stp31120644editdlrm
sysc_mount.stp44990644editdlrm
sysc_move_pages.stp47250644editdlrm
sysc_mprotect.stp29660644editdlrm
sysc_mq_getsetattr.stp44600644editdlrm
sysc_mq_notify.stp39360644editdlrm
sysc_mq_open.stp53850644editdlrm
sysc_mq_timedreceive.stp61830644editdlrm
sysc_mq_timedsend.stp59280644editdlrm
sysc_mq_unlink.stp30180644editdlrm
sysc_mremap.stp35770644editdlrm
sysc_msgctl.stp82550644editdlrm
sysc_msgget.stp44230644editdlrm
sysc_msgrcv.stp106890644editdlrm
sysc_msgsnd.stp88660644editdlrm
sysc_msync.stp28510644editdlrm
sysc_munlock.stp27440644editdlrm
sysc_munlockall.stp23420644editdlrm
sysc_munmap.stp27090644editdlrm
sysc_name_to_handle_at.stp41500644editdlrm
sysc_nanosleep.stp58240644editdlrm
sysc_nfsservctl.stp22840644editdlrm
sysc_nice.stp24400644editdlrm
sysc_ni_syscall.stp14330644editdlrm
sysc_open.stp43290644editdlrm
sysc_openat.stp39160644editdlrm
sysc_open_by_handle_at.stp42980644editdlrm
sysc_pause.stp25640644editdlrm
sysc_perf_event_open.stp38080644editdlrm
sysc_personality.stp30770644editdlrm
sysc_pipe.stp105960644editdlrm
sysc_pivot_root.stp33140644editdlrm
sysc_pkey_alloc.stp30570644editdlrm
sysc_pkey_free.stp27190644editdlrm
sysc_pkey_mprotect.stp33920644editdlrm
sysc_poll.stp27690644editdlrm
sysc_ppoll.stp64930644editdlrm
sysc_prctl.stp29930644editdlrm
sysc_pread.stp54270644editdlrm
sysc_preadv.stp52830644editdlrm
sysc_preadv2.stp56670644editdlrm
sysc_prlimit64.stp34950644editdlrm
sysc_process_vm_readv.stp47750644editdlrm
sysc_process_vm_writev.stp48970644editdlrm
sysc_pselect6.stp64570644editdlrm
sysc_pselect7.stp36680644editdlrm
sysc_ptrace.stp36610644editdlrm
sysc_pwrite.stp72390644editdlrm
sysc_pwritev.stp54140644editdlrm
sysc_pwritev2.stp57740644editdlrm
sysc_quotactl.stp46910644editdlrm
sysc_read.stp37210644editdlrm
sysc_readahead.stp36010644editdlrm
sysc_readdir.stp40430644editdlrm
sysc_readlink.stp31140644editdlrm
sysc_readlinkat.stp38330644editdlrm
sysc_readv.stp35020644editdlrm
sysc_reboot.stp32530644editdlrm
sysc_recv.stp72600644editdlrm
sysc_recvfrom.stp85540644editdlrm
sysc_recvmmsg.stp64620644editdlrm
sysc_recvmsg.stp109620644editdlrm
sysc_remap_file_pages.stp39350644editdlrm
sysc_removexattr.stp33200644editdlrm
sysc_rename.stp30380644editdlrm
sysc_renameat.stp41910644editdlrm
sysc_renameat2.stp45000644editdlrm
sysc_request_key.stp41380644editdlrm
sysc_restart_syscall.stp25650644editdlrm
sysc_rmdir.stp26570644editdlrm
sysc_rt_sigaction.stp69520644editdlrm
sysc_rt_sigpending.stp47990644editdlrm
sysc_rt_sigprocmask.stp91050644editdlrm
sysc_rt_sigqueueinfo.stp47500644editdlrm
sysc_rt_sigreturn.stp16390644editdlrm
sysc_rt_sigsuspend.stp38790644editdlrm
sysc_rt_sigtimedwait.stp60240644editdlrm
sysc_rt_tgsigqueueinfo.stp44600644editdlrm
sysc_sched_getaffinity.stp41020644editdlrm
sysc_sched_getattr.stp36710644editdlrm
sysc_sched_getparam.stp32360644editdlrm
sysc_sched_getscheduler.stp32960644editdlrm
sysc_sched_get_priority_max.stp36400644editdlrm
sysc_sched_get_priority_min.stp36400644editdlrm
sysc_sched_rr_get_interval.stp48640644editdlrm
sysc_sched_setaffinity.stp39600644editdlrm
sysc_sched_setattr.stp34450644editdlrm
sysc_sched_setparam.stp32210644editdlrm
sysc_sched_setscheduler.stp36660644editdlrm
sysc_sched_yield.stp23150644editdlrm
sysc_seccomp.stp33650644editdlrm
sysc_select.stp63590644editdlrm
sysc_semctl.stp82060644editdlrm
sysc_semget.stp45960644editdlrm
sysc_semop.stp57700644editdlrm
sysc_semtimedop.stp99360644editdlrm
sysc_send.stp73690644editdlrm
sysc_sendfile.stp49120644editdlrm
sysc_sendmmsg.stp93050644editdlrm
sysc_sendmsg.stp121100644editdlrm
sysc_sendto.stp83570644editdlrm
sysc_setdomainname.stp37290644editdlrm
sysc_setfsgid.stp47960644editdlrm
sysc_setfsuid.stp48390644editdlrm
sysc_setgid.stp45730644editdlrm
sysc_setgroups.stp45190644editdlrm
sysc_sethostname.stp32740644editdlrm
sysc_setitimer.stp62860644editdlrm
sysc_setns.stp28040644editdlrm
sysc_setpgid.stp27600644editdlrm
sysc_setpriority.stp32180644editdlrm
sysc_setregid.stp66600644editdlrm
sysc_setresgid.stp70400644editdlrm
sysc_setresuid.stp70550644editdlrm
sysc_setreuid.stp66300644editdlrm
sysc_setrlimit.stp40300644editdlrm
sysc_setsid.stp21010644editdlrm
sysc_setsockopt.stp84440644editdlrm
sysc_settimeofday.stp66460644editdlrm
sysc_setuid.stp45720644editdlrm
sysc_setxattr.stp39930644editdlrm
sysc_set_mempolicy.stp41710644editdlrm
sysc_set_robust_list.stp43580644editdlrm
sysc_set_tid_address.stp31950644editdlrm
sysc_sgetmask.stp21690644editdlrm
sysc_shmat.stp67770644editdlrm
sysc_shmctl.stp81390644editdlrm
sysc_shmdt.stp39820644editdlrm
sysc_shmget.stp45010644editdlrm
sysc_shutdown.stp69090644editdlrm
sysc_sigaction.stp57820644editdlrm
sysc_sigaltstack.stp42670644editdlrm
sysc_signal.stp28670644editdlrm
sysc_signalfd.stp124640644editdlrm
sysc_sigpending.stp37120644editdlrm
sysc_sigprocmask.stp41720644editdlrm
sysc_sigreturn.stp14610644editdlrm
sysc_sigsuspend.stp45750644editdlrm
sysc_socket.stp74380644editdlrm
sysc_socketpair.stp82970644editdlrm
sysc_splice.stp33630644editdlrm
sysc_ssetmask.stp28100644editdlrm
sysc_stat.stp65350644editdlrm
sysc_statfs.stp34910644editdlrm
sysc_statfs64.stp34590644editdlrm
sysc_statx.stp41180644editdlrm
sysc_stime.stp30830644editdlrm
sysc_swapoff.stp28750644editdlrm
sysc_swapon.stp31210644editdlrm
sysc_symlink.stp30280644editdlrm
sysc_symlinkat.stp40600644editdlrm
sysc_sync.stp19250644editdlrm
sysc_syncfs.stp25710644editdlrm
sysc_sync_file_range.stp60110644editdlrm
sysc_sysctl.stp30950644editdlrm
sysc_sysfs.stp36480644editdlrm
sysc_sysinfo.stp32860644editdlrm
sysc_syslog.stp28260644editdlrm
sysc_tee.stp27430644editdlrm
sysc_tgkill.stp28830644editdlrm
sysc_time.stp35050644editdlrm
sysc_timerfd.stp18290644editdlrm
sysc_timerfd_create.stp33940644editdlrm
sysc_timerfd_gettime.stp42190644editdlrm
sysc_timerfd_settime.stp52820644editdlrm
sysc_timer_create.stp49750644editdlrm
sysc_timer_delete.stp29420644editdlrm
sysc_timer_getoverrun.stp32070644editdlrm
sysc_timer_gettime.stp46700644editdlrm
sysc_timer_settime.stp60750644editdlrm
sysc_times.stp31670644editdlrm
sysc_tkill.stp26950644editdlrm
sysc_truncate.stp70310644editdlrm
sysc_tux.stp10680644editdlrm
sysc_umask.stp25220644editdlrm
sysc_umount.stp53600644editdlrm
sysc_uname.stp51450644editdlrm
sysc_unlink.stp28660644editdlrm
sysc_unlinkat.stp33800644editdlrm
sysc_unshare.stp28140644editdlrm
sysc_uselib.stp28710644editdlrm
sysc_userfaultfd.stp30050644editdlrm
sysc_ustat.stp53330644editdlrm
sysc_utime.stp61730644editdlrm
sysc_utimensat.stp70440644editdlrm
sysc_utimes.stp63310644editdlrm
sysc_vfork.stp20290644editdlrm
sysc_vhangup.stp21280644editdlrm
sysc_vmsplice.stp63370644editdlrm
sysc_wait4.stp50970644editdlrm
sysc_waitid.stp42530644editdlrm
sysc_waitpid.stp34600644editdlrm
sysc_write.stp39390644editdlrm
sysc_writev.stp36560644editdlrm
target_set.stp17690644editdlrm
task.stp228800644editdlrm
task.stpm2530644editdlrm
task_ancestry.stp16210644editdlrm
task_time.stp78610644editdlrm
tcp.stp226420644editdlrm
tcpmib-filter-default.stp8850644editdlrm
tcpmib.stp108240644editdlrm
timestamp.stp17610644editdlrm
timestamp_gtod.stp16290644editdlrm
timestamp_monotonic.stp55890644editdlrm
tty.stp73510644editdlrm
tzinfo.stp8030644editdlrm
ucontext-symbols.stp88420644editdlrm
ucontext-unwind.stp76450644editdlrm
ucontext.stp22370644editdlrm
udp.stp60970644editdlrm
utrace.stp13630644editdlrm
vfs.stp338260644editdlrm
Edit: /usr/share/systemtap/tapset/linux/nfs_proc.stp (58325B)
// NFS procedure tapset // Copyright (C) 2006 IBM Corp. // Copyright (C) 2007-2013 Red Hat // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. %{ /* For AF_INET */ #include %} function AF_INET:long() { return @const("AF_INET") } function AF_INET6:long() { return @const("AF_INET6") } function NFS_I:long(inode:long) { /* * Notice we're casting 0 here on purpose. We need the offset * of the 'vfs_inode' member of 'struct nfs_inode'. This is * the script language equivalent of: * offset = offsetof(struct nfs_inode, vfs_inode); */ offset = &@cast(0, "nfs_inode", "kernel:nfs")->vfs_inode return (inode - offset) } @__private30 function NFS_FH:long(inode:long) { return &@cast(NFS_I(inode), "nfs_inode", "kernel:nfs")->fh } function NFS_SERVER:long(inode:long) { return @cast(inode, "inode")->i_sb->s_fs_info } @__private30 function NFS_CLIENT:long(inode:long) { return @cast(NFS_SERVER(inode), "nfs_server", "kernel:nfs")->client } %( systemtap_v < "2.3" %? /* deprecated */ function stap_NFS_CLIENT:long(inode:long) { return NFS_CLIENT(inode) } %) function NFS_PROTO:long(inode:long) { nfsserver = NFS_SERVER(inode) return @choose_defined(@cast(nfsserver, "nfs_server", "kernel:nfs")->nfs_client->rpc_ops, @cast(nfsserver, "nfs_server", "kernel:nfs")->rpc_ops) } /* Get ip address from a rpc_clnt */ %( systemtap_v >= "4.3" %? function get_ip_from_client:string(clnt:long) { cl_xprt = @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_xprt addr = &@cast(cl_xprt, "rpc_xprt", "kernel:sunrpc")->addr /* In reality, 'cl_xprt->addr' is of 'sockaddr_storage' type * (since 2.6.19). But when used, you cast it to what is * inside that buffer. */ if (@cast(addr, "sockaddr")->sa_family == @const("AF_INET")) { return format_ipaddr(&@cast(addr, "sockaddr_in", "kernel:sunrpc")->sin_addr->s_addr, @const("AF_INET")) } else if (@cast(addr, "sockaddr")->sa_family == @const("AF_INET6")) { return format_ipaddr(&@cast(addr, "sockaddr_in6", "kernel:sunrpc")->sin6_addr, @const("AF_INET6")) } return "" } %: function get_ip_from_client:long(clnt:long) { cl_xprt = @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_xprt addr = &@cast(cl_xprt, "rpc_xprt", "kernel:sunrpc")->addr if (@cast(addr, "sockaddr_in", "kernel:sunrpc")->sin_family != @const("AF_INET")) { /* Now consider ipv4 only */ return 0 } return @cast(addr, "sockaddr_in", "kernel:sunrpc")->sin_addr->s_addr } %) /* Get protocol types from a rpc_clnt */ function get_prot_from_client:long(clnt:long) { cl_xprt = @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_xprt return @cast(cl_xprt, "rpc_xprt", "kernel:sunrpc")->prot } /* Get ip address from a rpc_task */ %( systemtap_v >= "4.3" %? function get_ip:string(task:long) { clnt = @cast(task, "rpc_task", "kernel:sunrpc")->tk_client return get_ip_from_client(clnt) } %: function get_ip:long(task:long) { clnt = @cast(task, "rpc_task", "kernel:sunrpc")->tk_client return get_ip_from_client(clnt) } %) /* Get protocol types from a rpc_task */ function get_prot:long(task:long) { clnt = @cast(task, "rpc_task", "kernel:sunrpc")->tk_client return get_prot_from_client(clnt) } @__private30 function __nfsv4_bitmask:long(dir:long, i:long) { %( CONFIG_NFS_V4 == "[ym]" %? return @cast(NFS_SERVER(dir), "nfs_server", "kernel:nfs")->attr_bitmask[i] %: return 0 %) } %( systemtap_v < "2.3" %? /* deprecated */ function __getfh_inode:long(dir:long) { return NFS_FH(dir) } %) probe nfs.proc.entries = nfs.proc.lookup, nfs.proc.read ?, nfs.proc.write ?, nfs.proc.commit ?, nfs.proc.read_setup, nfs.proc.write_setup, nfs.proc.commit_setup, nfs.proc.rename_setup, nfs.proc.read_done, nfs.proc.write_done, nfs.proc.commit_done, nfs.proc.rename_done, nfs.proc.open, nfs.proc.create, nfs.proc.rename, nfs.proc.remove, nfs.proc.release ? { } probe nfs.proc.return = nfs.proc.lookup.return, nfs.proc.read.return ?, nfs.proc.write.return ?, nfs.proc.commit.return ?, nfs.proc.read_setup.return, nfs.proc.write_setup.return, nfs.proc.commit_setup.return, nfs.proc.rename_setup.return, nfs.proc.read_done.return, nfs.proc.write_done.return, nfs.proc.commit_done.return, nfs.proc.rename_done.return, nfs.proc.open.return, nfs.proc.create.return, nfs.proc.rename.return, nfs.proc.remove.return, nfs.proc.release.return ? { } /** * probe nfs.proc.lookup - NFS client opens/searches a file on server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @filename: the name of file which client opens/searches on server * @name_len: the length of file name * @bitmask0: V4 bitmask representing the set of attributes supported * on this filesystem * @bitmask1: V4 bitmask representing the set of attributes supported * on this filesystem */ probe nfs.proc.lookup = nfs.proc2.lookup, nfs.proc3.lookup, nfs.proc4.lookup { } probe nfs.proc.lookup.return = nfs.proc2.lookup.return, nfs.proc3.lookup.return, nfs.proc4.lookup.return {} probe nfs.proc2.lookup = _nfs.proc2.lookup !, _nfs.proc2.missing_lookup { version = 2 bitmask0 = 0 bitmask1 = 0 name = "nfs.proc2.lookup" argstr = sprintf("%s", filename) } probe _nfs.proc2.lookup = kernel.function("nfs_proc_lookup") !, module("nfs").function("nfs_proc_lookup") ?, module("nfsv2").function("nfs_proc_lookup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) name_len = $name->len filename = kernel_string_n($name->name, name_len) } probe _nfs.proc2.missing_lookup = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 name_len = 0 filename = "" } probe nfs.proc2.lookup.return = kernel.function("nfs_proc_lookup").return !, module("nfs").function("nfs_proc_lookup").return !, module("nfsv2").function("nfs_proc_lookup").return !, never { version = 2 name = "nfs.proc2.lookup.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.lookup = kernel.function("nfs3_proc_lookup") !, module("nfs").function("nfs3_proc_lookup") ?, module("nfsv3").function("nfs3_proc_lookup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 name_len = $name->len filename = kernel_string_n($name->name, name_len) bitmask0 = 0 bitmask1 = 0 name = "nfs.proc3.lookup" argstr = sprintf("%s", filename) } probe nfs.proc3.lookup.return = kernel.function("nfs3_proc_lookup").return !, module("nfs").function("nfs3_proc_lookup").return ?, module("nfsv3").function("nfs3_proc_lookup").return ? { version = 3 name = "nfs.proc3.lookup.return" retstr = sprintf("%d", $return) } probe nfs.proc4.lookup = kernel.function("nfs4_proc_lookup") !, module("nfs").function("nfs4_proc_lookup") ?, module("nfsv4").function("nfs4_proc_lookup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 name_len = $name->len filename = kernel_string_n($name->name, name_len) bitmask0 = __nfsv4_bitmask($dir, 0) bitmask1 = __nfsv4_bitmask($dir, 1) name = "nfs.proc4.lookup" argstr = sprintf("%s", filename) } probe nfs.proc4.lookup.return = kernel.function("nfs4_proc_lookup").return !, module("nfs").function("nfs4_proc_lookup").return ?, module("nfsv4").function("nfs4_proc_lookup").return ? { version = 4 name = "nfs.proc4.lookup.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.read - NFS client synchronously reads file from server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @flags: used to set task->tk_flags in rpc_init_task function * @size: * @count: read bytes in this execution * @offset: the file offset * * All the nfs.proc.read kernel functions were removed in kernel commit * 8e0969 in December 2006, so these probes do not exist on Linux * 2.6.21 and newer kernels. */ probe nfs.proc.read = nfs.proc2.read ?, nfs.proc3.read ?, nfs.proc4.read ? {} probe nfs.proc.read.return = nfs.proc2.read.return ?, nfs.proc3.read.return ?, nfs.proc4.read.return ? { } probe nfs.proc2.read = _nfs.proc2.read !, _nfs.proc2.missing_read { version = 2 name = "nfs.proc2.read" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe _nfs.proc2.read = kernel.function("nfs_proc_read") !, module("nfs").function("nfs_proc_read") ?, module("nfsv2").function("nfs_proc_read") ? { server_ip = @_nfs_data_server_ip($rdata) prot = @_nfs_data_prot($rdata) version = 2 flags = $rdata->flags count = @_nfs_data_args_count($rdata) offset = $rdata->args->offset } probe _nfs.proc2.missing_read = never { %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 flags = 0 count = 0 offset = 0 } probe nfs.proc2.read.return = kernel.function("nfs_proc_read").return !, module("nfs").function("nfs_proc_read").return !, module("nfsv2").function("nfs_proc_read").return !, never { version = 2 name = "nfs.proc2.read.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.read = kernel.function("nfs3_proc_read") !, module("nfs").function("nfs3_proc_read") ?, module("nfsv3").function("nfs3_proc_read") ? { server_ip = @_nfs_data_server_ip($rdata) prot = @_nfs_data_prot($rdata) version = 3 flags = $rdata->flags count = @_nfs_data_args_count($rdata) offset = $rdata->args->offset name = "nfs.proc3.read" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc3.read.return = kernel.function("nfs3_proc_read").return !, module("nfs").function("nfs3_proc_read").return ?, module("nfsv3").function("nfs3_proc_read").return ? { version = 3 name = "nfs.proc3.read.return" retstr = sprintf("%d", $return) } probe nfs.proc4.read = kernel.function("nfs4_proc_read") !, module("nfs").function("nfs4_proc_read") ?, module("nfsv3").function("nfs4_proc_read") ? { server_ip = @_nfs_data_server_ip($rdata) prot = @_nfs_data_prot($rdata) version = 4 flags = $rdata->flags count = @_nfs_data_args_count($rdata) offset = $rdata->args->offset name = "nfs.proc4.read" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc4.read.return = kernel.function("nfs4_proc_read").return !, module("nfs").function("nfs4_proc_read").return ?, module("nfsv4").function("nfs4_proc_read").return ? { version = 4 name = "nfs.proc4.read.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.write - NFS client synchronously writes file to server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @flags: used to set task->tk_flags in rpc_init_task function * @count: * @size: read bytes in this execution * @offset: the file offset * @bitmask0: V4 bitmask representing the set of attributes supported * on this filesystem * @bitmask1: V4 bitmask representing the set of attributes supported * on this filesystem * * All the nfs.proc.write kernel functions were removed in kernel commit * 200baa in December 2006, so these probes do not exist on Linux * 2.6.21 and newer kernels. */ probe nfs.proc.write = nfs.proc2.write ?, nfs.proc3.write ?, nfs.proc4.write ? {} probe nfs.proc.write.return = nfs.proc2.write.return ?, nfs.proc3.write.return ?, nfs.proc4.write.return ? {} probe nfs.proc2.write = _nfs.proc2.write !, _nfs.proc2.missing_write { version = 2 bitmask0 = 0 bitmask1 = 0 name = "nfs.proc2.write" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe _nfs.proc2.write = kernel.function("nfs_proc_write") !, module("nfs").function("nfs_proc_write") ?, module("nfsv2").function("nfs_proc_write") ? { server_ip = @_nfs_data_server_ip($wdata) prot = @_nfs_data_prot($wdata) flags = $wdata->flags count = @_nfs_data_args_count($wdata) offset = $wdata->args->offset } probe _nfs.proc2.missing_write = never { %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 flags = 0 count = 0 offset = 0 } probe nfs.proc2.write.return = kernel.function("nfs_proc_write").return !, module("nfs").function("nfs_proc_write").return !, module("nfsv2").function("nfs_proc_write").return !, never { version = 2 name = "nfs.proc2.write.return" if (@defined($return)) { retstr = sprintf("%d", $return) if ($return >= 0) { size = $return } } else { retstr = "N/A" size = 0 } units = "bytes" } probe nfs.proc3.write = kernel.function("nfs3_proc_write") !, module("nfs").function("nfs3_proc_write") ?, module("nfsv3").function("nfs3_proc_write") ? { server_ip = @_nfs_data_server_ip($wdata) prot = @_nfs_data_prot($wdata) version = 3 flags = $wdata->flags count = @_nfs_data_args_count($wdata) offset = $wdata->args->offset bitmask0 = 0 bitmask1 = 0 name = "nfs.proc3.write" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc3.write.return = kernel.function("nfs3_proc_write").return !, module("nfs").function("nfs3_proc_write").return ?, module("nfsv3").function("nfs3_proc_write").return ? { version = 3 name = "nfs.proc3.write.return" retstr = sprintf("%d", $return) if ($return >= 0) { size = $return units = "bytes" } } probe nfs.proc4.write = kernel.function("nfs4_proc_write") !, module("nfs").function("nfs4_proc_write") ?, module("nfsv4").function("nfs4_proc_write") ? { server_ip = @_nfs_data_server_ip($wdata) prot = @_nfs_data_prot($wdata) version = 4 flags = $wdata->flags count = @_nfs_data_args_count($wdata) offset = $wdata->args->offset bitmask0 = __nfsv4_bitmask($wdata->inode, 0) bitmask1 = __nfsv4_bitmask($wdata->inode, 1) name = "nfs.proc4.write" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc4.write.return = kernel.function("nfs4_proc_write").return !, module("nfs").function("nfs4_proc_write").return ?, module("nfsv4").function("nfs4_proc_write").return ? { version = 4 name = "nfs.proc4.write.return" retstr = sprintf("%d", $return) if ($return >= 0) { size = $return units = "bytes" } } /** * probe nfs.proc.commit - NFS client committing data on server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @count: * @size: read bytes in this execution * @offset: the file offset * @bitmask0: V4 bitmask representing the set of attributes supported * on this filesystem * @bitmask1: V4 bitmask representing the set of attributes supported * on this filesystem * * All the nfs.proc.commit kernel functions were removed in kernel * commit 200baa in December 2006, so these probes do not exist on Linux * 2.6.21 and newer kernels. * * Fires when client writes the buffered data to disk. * The buffered data is asynchronously written by client earlier. * The commit function works in sync way. * This probe point does not exist in NFSv2. */ probe nfs.proc.commit = nfs.proc3.commit ?, nfs.proc4.commit ? {} probe nfs.proc.commit.return = nfs.proc3.commit.return ?, nfs.proc4.commit.return ? {} // XXX: on kernels > 2.6.18 (?), module("nfs") -> module("nfsd") and // function("nfsN...") becomes function("nfsdN..."). PR3833. probe nfs.proc3.commit = kernel.function ("nfs3_proc_commit") !, module("nfs").function("nfs3_proc_commit") ?, module("nfsv3").function("nfs3_proc_commit") ? { server_ip = @_nfs_data_server_ip($cdata) prot = @_nfs_data_prot($cdata) version = 3 count = @_nfs_data_args_count($cdata) offset = $cdata->args->offset bitmask0 = 0 bitmask1 = 0 name = "nfs.proc3.commit" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc3.commit.return = kernel.function ("nfs3_proc_commit").return !, module("nfs").function("nfs3_proc_commit").return ?, module("nfsv3").function("nfs3_proc_commit").return ? { version = 3 name = "nfs.proc3.commit.return" retstr = sprintf("%d", $return) if ($return >= 0) { size = $return units = "bytes" } } probe nfs.proc4.commit = kernel.function ("nfs4_proc_commit") !, module("nfs").function("nfs4_proc_commit") ?, module("nfsv4").function("nfs4_proc_commit") ? { server_ip = @_nfs_data_server_ip($cdata) prot = @_nfs_data_prot($cdata) version = 4 count = @_nfs_data_args_count($cdata) offset = $cdata->args->offset bitmask0 = __nfsv4_bitmask($cdata->inode, 0) bitmask1 = __nfsv4_bitmask($cdata->inode, 1) name = "nfs.proc4.commit" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc4.commit.return = kernel.function ("nfs4_proc_commit").return !, module("nfs").function("nfs4_proc_commit").return ?, module("nfsv4").function("nfs4_proc_commit").return ? { version = 4 name = "nfs.proc4.commit.return" retstr = sprintf("%d", $return) if ($return >= 0) { size = $return units = "bytes" } } /** * probe nfs.proc.read_setup - NFS client setting up a read RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @count: read bytes in this execution * @size: read bytes in this execution * @offset: the file offset * * The read_setup function is used to setup a read RPC task. * It is not doing the actual read operation. */ probe nfs.proc.read_setup = nfs.proc2.read_setup, nfs.proc3.read_setup, nfs.proc4.read_setup {} probe nfs.proc.read_setup.return = nfs.proc2.read_setup.return, nfs.proc3.read_setup.return, nfs.proc4.read_setup.return {} probe nfs.proc2.read_setup = _nfs.proc2.read_setup !, _nfs.proc2.missing_read_setup { version = 2 name = "nfs.proc2.read_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe _nfs.proc2.read_setup = kernel.function("nfs_proc_read_setup") !, module("nfs").function("nfs_proc_read_setup") ?, module("nfsv2").function("nfs_proc_read_setup") ? { inode = @defined($data->header) ? $data->header->inode : $data->inode client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) count = @_nfs_data_args_count($data) offset = $data->args->offset } probe _nfs.proc2.missing_read_setup = never { inode = 0 client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 count = 0 offset = 0 } probe nfs.proc2.read_setup.return = kernel.function("nfs_proc_read_setup").return !, module("nfs").function("nfs_proc_read_setup").return !, module("nfsv2").function("nfs_proc_read_setup").return !, never { version = 2 name = "nfs.proc2.read_setup.return" retvalue = 0 } probe nfs.proc3.read_setup = kernel.function("nfs3_proc_read_setup") !, module("nfs").function("nfs3_proc_read_setup") ?, module("nfsv3").function("nfs3_proc_read_setup") ? { inode = @choose_defined($hdr->inode, @choose_defined($data->header->inode, $data->inode)) client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 fh = 0 count = @_nfs_data_args_count(@choose_defined($hdr, $data)) offset = @choose_defined($hdr->args->offset, $data->args->offset) name = "nfs.proc3.read_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc3.read_setup.return = kernel.function("nfs3_proc_read_setup").return !, module("nfs").function("nfs3_proc_read_setup").return ?, module("nfsv3").function("nfs3_proc_read_setup").return ? { version = 3 name = "nfs.proc3.read_setup.return" retvalue = 0 } probe nfs.proc4.read_setup = kernel.function("nfs4_proc_read_setup") !, module("nfs").function("nfs4_proc_read_setup") ?, module("nfsv4").function("nfs4_proc_read_setup") ? { inode = @choose_defined($hdr->inode, @choose_defined($data->header->inode, $data->inode)) client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 count = @_nfs_data_args_count(@choose_defined($hdr, $data)) offset = @choose_defined($hdr->args->offset, $data->args->offset) //timestamp = $jiffies name = "nfs.proc4.read_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc4.read_setup.return = kernel.function("nfs4_proc_read_setup").return !, module("nfs").function("nfs4_proc_read_setup").return ?, module("nfsv4").function("nfs4_proc_read_setup").return ? { version = 4 name = "nfs.proc4.read_setup.return" retvalue = 0 } /** * probe nfs.proc.read_done - NFS client response to a read RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @status: result of last operation * @count: number of bytes read * @timestamp : V4 timestamp, which is used for lease renewal * * Fires when a reply to a read RPC task is received or some read error occurs * (timeout or socket shutdown). */ probe nfs.proc.read_done = nfs.proc2.read_done, nfs.proc3.read_done, nfs.proc4.read_done {} probe nfs.proc.read_done.return = nfs.proc2.read_done.return, nfs.proc3.read_done.return, nfs.proc4.read_done.return {} probe nfs.proc2.read_done = _nfs.proc2.read_done !, _nfs.proc2.missing_read_done { timestamp = 0 version = 2 name = "nfs.proc2.read_done" argstr = sprintf("%d", status) } probe _nfs.proc2.read_done = kernel.function("nfs_read_done") !, module("nfs").function("nfs_read_done") ?, module("nfsv2").function("nfs_read_done") ? { if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) } status = $task->tk_status } probe _nfs.proc2.missing_read_done = never { %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 count = 0 status = 0 } probe nfs.proc2.read_done.return = kernel.function("nfs_read_done").return !, module("nfs").function("nfs_read_done").return !, module("nfsv2").function("nfs_read_done").return !, never { version = 2 name = "nfs.proc2.read_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.read_done = kernel.function("nfs3_read_done") !, module("nfs").function("nfs3_read_done") ?, module("nfsv3").function("nfs3_read_done") ? { if (@defined($hdr)) { # kernels >= 3.17 server_ip = @_nfs_data_server_ip($hdr) prot = @_nfs_data_prot($hdr) count = @_nfs_data_res_count($hdr) } else if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) } timestamp = 0 version = 3 status = $task->tk_status name = "nfs.proc3.read_done" argstr = sprintf("%d", status) } probe nfs.proc3.read_done.return = kernel.function("nfs3_read_done").return !, module("nfs").function("nfs3_read_done").return ?, module("nfsv3").function("nfs3_read_done").return ? { version = 3 name = "nfs.proc3.read_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc4.read_done = kernel.function("nfs4_read_done") !, module("nfs").function("nfs4_read_done") ?, module("nfsv4").function("nfs4_read_done") ? { if (@defined($hdr)) { # kernels >= 3.17 server_ip = @_nfs_data_server_ip($hdr) prot = @_nfs_data_prot($hdr) count = @_nfs_data_res_count($hdr) timestamp = @_nfs_data_timestamp($hdr) } else if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) timestamp = @_nfs_data_timestamp($data) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) timestamp = @_nfs_data_timestamp($task->tk_calldata) } version = 4 status = $task->tk_status name = "nfs.proc4.read_done" argstr = sprintf("%d", status) } probe nfs.proc4.read_done.return = kernel.function("nfs4_read_done").return !, module("nfs").function("nfs4_read_done").return ?, module("nfsv4").function("nfs4_read_done").return ? { version = 4 name = "nfs.proc4.read_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } /** * probe nfs.proc.write_setup - NFS client setting up a write RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @size: bytes written in this execution * @count: bytes written in this execution * @offset: the file offset * @how: used to set args.stable. The stable value could be: * NFS_UNSTABLE,NFS_DATA_SYNC,NFS_FILE_SYNC * (in nfs.proc3.write_setup and nfs.proc4.write_setup) * @bitmask0: V4 bitmask representing the set of attributes supported * on this filesystem * @bitmask1: V4 bitmask representing the set of attributes supported * on this filesystem * * The write_setup function is used to setup a write RPC task. * It is not doing the actual write operation. */ probe nfs.proc.write_setup = nfs.proc2.write_setup, nfs.proc3.write_setup, nfs.proc4.write_setup {} probe nfs.proc.write_setup.return = nfs.proc2.write_setup.return, nfs.proc3.write_setup.return, nfs.proc4.write_setup.return {} probe nfs.proc2.write_setup = _nfs.proc2.write_setup !, _nfs.proc2.missing_write_setup { version = 2 bitmask0 = 0 bitmask1 = 0 name = "nfs.proc2.write_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe _nfs.proc2.write_setup = kernel.function("nfs_proc_write_setup") !, module("nfs").function("nfs_proc_write_setup") ?, module("nfsv2").function("nfs_proc_write_setup") ? { inode = @defined($data->header) ? $data->header->inode : $data->inode client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) count = @_nfs_data_args_count($data) offset = $data->args->offset how = @choose_defined($how, $data->args->stable) } probe _nfs.proc2.missing_write_setup = never { inode = 0 client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 count = 0 offset = 0 how = 0 } probe nfs.proc2.write_setup.return = kernel.function("nfs_proc_write_setup").return !, module("nfs").function("nfs_proc_write_setup").return !, module("nfsv2").function("nfs_proc_write_setup").return !, never { version = 2 name = "nfs.proc2.write_setup.return" retvalue = 0 } probe nfs.proc3.write_setup = kernel.function("nfs3_proc_write_setup") !, module("nfs").function("nfs3_proc_write_setup") ?, module("nfsv3").function("nfs3_proc_write_setup") ? { inode = @choose_defined($hdr->inode, @choose_defined($data->header->inode, $data->inode)) client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 count = @_nfs_data_args_count(@choose_defined($hdr, $data)) offset = @choose_defined($hdr->args->offset, $data->args->offset) how = @choose_defined($hdr->args->stable, @choose_defined($how, $data->args->stable)) bitmask0 = 0 bitmask1 = 0 name = "nfs.proc3.write_setup" argstr = sprintf("%d,%d,%d", count, offset, how) size = count units = "bytes" } probe nfs.proc3.write_setup.return = kernel.function("nfs3_proc_write_setup").return !, module("nfs").function("nfs3_proc_write_setup").return ?, module("nfsv3").function("nfs3_proc_write_setup").return ? { version = 3 name = "nfs.proc3.write_setup.return" retvalue = 0 } probe nfs.proc4.write_setup = kernel.function("nfs4_proc_write_setup") !, module("nfs").function("nfs4_proc_write_setup") ?, module("nfsv4").function("nfs4_proc_write_setup") ? { inode = @choose_defined($hdr->inode, @choose_defined($data->header->inode, $data->inode)) client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 count = @_nfs_data_args_count(@choose_defined($hdr, $data)) offset = @choose_defined($hdr->args->offset, $data->args->offset) how = @choose_defined($hdr->args->stable, @choose_defined($how, $data->args->stable)) bitmask0 = __nfsv4_bitmask(inode, 0) bitmask1 = __nfsv4_bitmask(inode, 1) //timestamp = $jiffies name = "nfs.proc4.write_setup" argstr = sprintf("%d,%d,%d", count, offset, how) size = count units = "bytes" } probe nfs.proc4.write_setup.return = kernel.function("nfs4_proc_write_setup").return !, module("nfs").function("nfs4_proc_write_setup").return ?, module("nfsv4").function("nfs4_proc_write_setup").return ? { version = 4 name = "nfs.proc4.write_setup.return" retvalue = 0 } /** * probe nfs.proc.write_done - NFS client response to a write RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @status: result of last operation * @valid: fattr->valid, indicates which fields are valid * @count: number of bytes written * @timestamp: V4 timestamp, which is used for lease renewal * * Fires when a reply to a write RPC task is received or some write error occurs * (timeout or socket shutdown). */ probe nfs.proc.write_done = nfs.proc2.write_done, nfs.proc3.write_done, nfs.proc4.write_done {} probe nfs.proc.write_done.return = nfs.proc2.write_done.return, nfs.proc3.write_done.return, nfs.proc4.write_done.return {} probe nfs.proc2.write_done = _nfs.proc2.write_done !, _nfs.proc2.missing_write_done { timestamp = 0 version = 2 name = "nfs.proc2.write_done" argstr = sprintf("%d", status) } probe _nfs.proc2.write_done = kernel.function("nfs_write_done") !, module("nfs").function("nfs_write_done") ?, module("nfsv2").function("nfs_write_done") ? { if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) valid = @_nfs_data_valid($data) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) valid = @_nfs_data_valid($task->tk_calldata) } status = $task->tk_status } probe _nfs.proc2.missing_write_done = never { %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 count = 0 valid = 0 status = 0 } probe nfs.proc2.write_done.return = kernel.function("nfs_write_done").return !, module("nfs").function("nfs_write_done").return !, module("nfsv2").function("nfs_write_done").return !, never { version = 2 name = "nfs.proc2.write_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.write_done = kernel.function("nfs3_write_done") !, module("nfs").function("nfs3_write_done") ?, module("nfsv3").function("nfs3_write_done") ? { if (@defined($hdr) || @defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip(@choose_defined($hdr, $data)) prot = @_nfs_data_prot(@choose_defined($hdr, $data)) count = @_nfs_data_res_count(@choose_defined($hdr, $data)) valid = @_nfs_data_valid(@choose_defined($hdr, $data)) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) valid = @_nfs_data_valid($task->tk_calldata) } timestamp = 0 version = 3 status = $task->tk_status name = "nfs.proc3.write_done" argstr = sprintf("%d", status) } probe nfs.proc3.write_done.return = kernel.function("nfs3_write_done").return !, module("nfs").function("nfs3_write_done").return ?, module("nfsv3").function("nfs3_write_done").return ? { version = 3 name = "nfs.proc3.write_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc4.write_done = kernel.function("nfs4_write_done") !, module("nfs").function("nfs4_write_done") ?, module("nfsv4").function("nfs4_write_done") ? { if (@defined($hdr) || @defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip(@choose_defined($hdr, $data)) prot = @_nfs_data_prot(@choose_defined($hdr, $data)) count = @_nfs_data_res_count(@choose_defined($hdr, $data)) valid = @_nfs_data_valid(@choose_defined($hdr, $data)) timestamp = @_nfs_data_timestamp(@choose_defined($hdr, $data)) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) valid = @_nfs_data_valid($task->tk_calldata) timestamp = @_nfs_data_timestamp($task->tk_calldata) } version = 4 status = $task->tk_status name = "nfs.proc4.write_done" argstr = sprintf("%d", status) } probe nfs.proc4.write_done.return = kernel.function("nfs4_write_done").return !, module("nfs").function("nfs4_write_done").return ?, module("nfsv4").function("nfs4_write_done").return ? { version = 4 name = "nfs.proc4.write_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } /** * probe nfs.proc.commit_setup - NFS client setting up a commit RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @size: bytes in this commit * @count: bytes in this commit * @offset: the file offset * @bitmask0: V4 bitmask representing the set of attributes supported * on this filesystem * @bitmask1: V4 bitmask representing the set of attributes supported * on this filesystem * * The commit_setup function is used to setup a commit RPC task. * Is is not doing the actual commit operation. * It does not exist in NFSv2. */ probe nfs.proc.commit_setup = nfs.proc3.commit_setup, nfs.proc4.commit_setup {} probe nfs.proc.commit_setup.return = nfs.proc3.commit_setup.return, nfs.proc4.commit_setup.return {} probe nfs.proc3.commit_setup = kernel.function("nfs3_proc_commit_setup") !, module("nfs").function("nfs3_proc_commit_setup") ?, module("nfsv3").function("nfs3_proc_commit_setup") ? { inode = @defined($data->header) ? $data->header->inode : $data->inode client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 count = @_nfs_data_args_count($data) offset = $data->args->offset bitmask0 = 0 bitmask1 = 0 name = "nfs.proc3.commit_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc3.commit_setup.return = kernel.function("nfs3_proc_commit_setup") .return !, module("nfs").function("nfs3_proc_commit_setup").return ?, module("nfsv3").function("nfs3_proc_commit_setup").return ? { version = 3 name = "nfs.proc3.commit_setup.return" retvalue = 0 } probe nfs.proc4.commit_setup = kernel.function("nfs4_proc_commit_setup") !, module("nfs").function("nfs4_proc_commit_setup") ?, module("nfsv4").function("nfs4_proc_commit_setup") ? { inode = @defined($data->header) ? $data->header->inode : $data->inode client = NFS_CLIENT(inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 count = @_nfs_data_args_count($data) offset = $data->args->offset bitmask0 = __nfsv4_bitmask(inode, 0) bitmask1 = __nfsv4_bitmask(inode, 1) //timestamp = $jiffies name = "nfs.proc4.commit_setup" argstr = sprintf("%d,%d", count, offset) size = count units = "bytes" } probe nfs.proc4.commit_setup.return = kernel.function("nfs4_proc_commit_setup") .return !, module("nfs").function("nfs4_proc_commit_setup").return ?, module("nfsv4").function("nfs4_proc_commit_setup").return ? { version = 4 name = "nfs.proc4.commit_setup.return" retvalue = 0 } /** * probe nfs.proc.commit_done - NFS client response to a commit RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @status: result of last operation * @valid: fattr->valid, indicates which fields are valid * @count: number of bytes committed * @timestamp: V4 timestamp, which is used for lease renewal * * Fires when a reply to a commit RPC task is received * or some commit operation error occur (timeout or socket shutdown). */ probe nfs.proc.commit_done = nfs.proc3.commit_done, nfs.proc4.commit_done {} probe nfs.proc.commit_done.return = nfs.proc3.commit_done.return, nfs.proc4.commit_done.return {} probe nfs.proc3.commit_done = kernel.function("nfs3_commit_done") !, module("nfs").function("nfs3_commit_done") ?, module("nfsv3").function("nfs3_commit_done") ? { if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) valid = @_nfs_data_valid($data) } else { _tk_calldata=@choose_defined($task->tk_calldata, @cast($task, "rpc_task", "kernel:nfs")->tk_calldata) server_ip = @_nfs_data_server_ip(_tk_calldata) prot = @_nfs_data_prot(_tk_calldata) count = @_nfs_data_res_count(_tk_calldata) valid = @_nfs_data_valid(_tk_calldata) } timestamp = 0 version = 3 status = $task->tk_status name = "nfs.proc3.commit_done" argstr = sprintf("%d", status) } probe nfs.proc3.commit_done.return = kernel.function("nfs3_commit_done").return !, module("nfs").function("nfs3_commit_done").return ?, module("nfsv3").function("nfs3_commit_done").return ? { version = 3 name = "nfs.proc3.commit_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc4.commit_done = kernel.function("nfs4_commit_done") !, module("nfs").function("nfs4_commit_done") ?, module("nfsv4").function("nfs4_commit_done") ? { if (@defined($data)) { # kernels >= 2.6.10 server_ip = @_nfs_data_server_ip($data) prot = @_nfs_data_prot($data) count = @_nfs_data_res_count($data) valid = @_nfs_data_valid($data) timestamp = @_nfs_data_timestamp($data) } else { server_ip = @_nfs_data_server_ip($task->tk_calldata) prot = @_nfs_data_prot($task->tk_calldata) count = @_nfs_data_res_count($task->tk_calldata) valid = @_nfs_data_valid($task->tk_calldata) timestamp = @_nfs_data_timestamp($task->tk_calldata) } version = 4 status = $task->tk_status name = "nfs.proc4.commit_done" argstr = sprintf("%d", status) } probe nfs.proc4.commit_done.return = kernel.function("nfs4_commit_done").return !, module("nfs").function("nfs4_commit_done").return ?, module("nfsv4").function("nfs4_commit_done").return ? { version = 4 name = "nfs.proc4.commit_done.return" retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } /** * probe nfs.proc.rename_setup - NFS client setting up a rename RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @fh: file handle of parent dir * * The rename_setup function is used to setup a rename RPC task. * Is is not doing the actual rename operation. */ probe nfs.proc.rename_setup = nfs.proc2.rename_setup ?, nfs.proc3.rename_setup, nfs.proc4.rename_setup {} probe nfs.proc.rename_setup.return = nfs.proc2.rename_setup.return ?, nfs.proc3.rename_setup.return, nfs.proc4.rename_setup.return {} probe nfs.proc2.rename_setup = kernel.function("nfs_proc_rename_setup") !, module("nfs").function("nfs_proc_rename_setup") ?, module("nfsv2").function("nfs_proc_rename_setup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 2 fh = NFS_FH($dir) name = "nfs.proc2.rename_setup" argstr = sprintf("%d", fh) } probe nfs.proc2.rename_setup.return = kernel.function("nfs2_proc_rename_setup").return !, module("nfs").function("nfs_proc_rename_setup").return ?, module("nfsv2").function("nfs_proc_rename_setup").return ? { version = 2 name = "nfs.proc2.rename_setup.return" retvalue = 0 } probe nfs.proc3.rename_setup = kernel.function("nfs3_proc_rename_setup") !, module("nfs").function("nfs3_proc_rename_setup") ?, module("nfsv3").function("nfs3_proc_rename_setup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 fh = NFS_FH($dir) name = "nfs.proc3.rename_setup" argstr = sprintf("%d", fh) } probe nfs.proc3.rename_setup.return = kernel.function("nfs3_proc_rename_setup").return !, module("nfs").function("nfs3_proc_rename_setup").return ?, module("nfsv3").function("nfs3_proc_rename_setup").return ? { version = 3 name = "nfs.proc3.rename_setup.return" retvalue = 0 } probe nfs.proc4.rename_setup = kernel.function("nfs4_proc_rename_setup") !, module("nfs").function("nfs4_proc_rename_setup") ?, module("nfsv4").function("nfs4_proc_rename_setup") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 fh = NFS_FH($dir) name = "nfs.proc4.rename_setup" argstr = sprintf("%d", fh) } probe nfs.proc4.rename_setup.return = kernel.function("nfs4_proc_rename_setup").return !, module("nfs").function("nfs4_proc_rename_setup").return ?, module("nfsv4").function("nfs4_proc_rename_setup").return ? { version = 4 name = "nfs.proc4.rename_setup.return" retvalue = 0 } /** * probe nfs.proc.rename_done - NFS client response to a rename RPC task * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version * @status: result of last operation * @timestamp : V4 timestamp, which is used for lease renewal * @old_fh: file handle of old parent dir * @new_fh: file handle of new parent dir * * Fires when a reply to a rename RPC task is received or some rename * error occurs (timeout or socket shutdown). */ probe nfs.proc.rename_done = nfs.proc2.rename_done ?, nfs.proc3.rename_done, nfs.proc4.rename_done {} probe nfs.proc.rename_done.return = nfs.proc2.rename_done.return ?, nfs.proc3.rename_done.return, nfs.proc4.rename_done.return {} probe nfs.proc2.rename_done = kernel.function("nfs_proc_rename_done") !, module("nfs").function("nfs_proc_rename_done") ?, module("nfsv2").function("nfs_proc_rename_done") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 2 status = $task->tk_status timestamp = 0 old_fh = NFS_FH($old_dir) new_fh = NFS_FH($new_dir) name = "nfs.proc2.rename_done" argstr = sprintf("%d", status) } probe nfs.proc2.rename_done.return = kernel.function("nfs_rename_done").return !, module("nfs").function("nfs_rename_done").return !, module("nfsv2").function("nfs_rename_done").return ! { version = 2 name = "nfs.proc2.rename_done.return" retstr = sprintf("%d", $return) } probe nfs.proc3.rename_done = kernel.function("nfs3_proc_rename_done") !, module("nfs").function("nfs3_proc_rename_done") ?, module("nfsv3").function("nfs3_proc_rename_done") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 status = $task->tk_status timestamp = 0 old_fh = NFS_FH($old_dir) new_fh = NFS_FH($new_dir) name = "nfs.proc3.rename_done" argstr = sprintf("%d", status) } probe nfs.proc3.rename_done.return = kernel.function("nfs3_proc_rename_done").return !, module("nfs").function("nfs3_proc_rename_done").return ?, module("nfsv3").function("nfs3_proc_rename_done").return ? { version = 3 name = "nfs.proc3.rename_done.return" retstr = sprintf("%d", $return) } probe nfs.proc4.rename_done = kernel.function("nfs4_proc_rename_done") !, module("nfs").function("nfs4_proc_rename_done") ?, module("nfsv4").function("nfs4_proc_rename_done") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 timestamp = @_nfs_data_timestamp(@choose_defined($hdr, $data)) status = $task->tk_status old_fh = NFS_FH($old_dir) new_fh = NFS_FH($new_dir) name = "nfs.proc4.rename_done" argstr = sprintf("%d", status) } probe nfs.proc4.rename_done.return = kernel.function("nfs4_proc_rename_done").return !, module("nfs").function("nfs4_proc_rename_done").return ?, module("nfsv4").function("nfs4_proc_rename_done").return ? { version = 4 name = "nfs.proc4.rename_done.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.open - NFS client allocates file read/write context information * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version (the function is used for all NFS version) * @filename: file name * @flag: file flag * @mode: file mode * * Allocate file read/write context information */ probe nfs.proc.open = kernel.function("nfs_open") !, module("nfs").function("nfs_open") ? { client = NFS_CLIENT($inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = __nfs_version($inode) filename = __file_filename($filp) flag = $filp->f_flags mode = $filp->f_mode name = "nfs.proc.open" argstr = sprintf("%s,%d,%d", filename, flag, mode) } probe nfs.proc.open.return = kernel.function("nfs_open").return !, module("nfs").function("nfs_open").return ? { name = "nfs.proc.open.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.release - NFS client releases file read/write context information * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version (the function is used for all NFS version) * @filename: file name * @flag: file flag * @mode: file mode * * Release file read/write context information */ probe nfs.proc.release = kernel.function("nfs_release") !, module("nfs").function("nfs_release") ? { client = NFS_CLIENT($inode) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = __nfs_version($inode) filename = __file_filename($filp) flag = $filp->f_flags mode = $filp->f_mode name = "nfs.proc.release" argstr = sprintf("%s,%d,%d", filename, flag, mode) } probe nfs.proc.release.return = kernel.function("nfs_release").return !, module("nfs").function("nfs_release").return ? { name = "nfs.proc.release.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.handle_exception - NFS client handling an NFSv4 exception * * @errorcode: indicates the type of error * * This is the error handling routine for processes for NFSv4. */ probe nfs.proc.handle_exception = nfs.proc4.handle_exception {} probe nfs.proc.handle_exception.return = nfs.proc4.handle_exception.return {} probe nfs.proc4.handle_exception = kernel.function("nfs4_handle_exception") !, module("nfs").function("nfs4_handle_exception") ?, module("nfsv4").function("nfs4_handle_exception") ? { version = 4 errorcode = $errorcode name = "nfs.proc4.handle_exception" argstr = sprintf("%d", errorcode) } probe nfs.proc4.handle_exception.return = kernel.function("nfs4_handle_exception").return !, module("nfs").function("nfs4_handle_exception").return ?, module("nfsv4").function("nfs4_handle_exception").return ? { name = "nfs.proc4.handle_exception.return" retstr = sprintf("%d", $return) } /** * probe nfs.proc.create - NFS client creating file on server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version (the function is used for all NFS version) * @fh: file handle of parent dir * @filename: file name * @filelen: length of file name * @flag: indicates create mode (only for NFSv3 and NFSv4) */ probe nfs.proc.create = nfs.proc2.create, nfs.proc3.create, nfs.proc4.create {} probe nfs.proc.create.return = nfs.proc2.create.return, nfs.proc3.create.return, nfs.proc4.create.return {} probe nfs.proc2.create = _nfs.proc2.create !, _nfs.proc2.missing_create { version = 2 name = "nfs.proc2.create" argstr = sprintf("%s", filename) } probe _nfs.proc2.create = kernel.function("nfs_proc_create") !, module("nfs").function("nfs_proc_create") ?, module("nfsv2").function("nfs_proc_create") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) fh = NFS_FH($dir) filelen = $dentry->d_name->len filename = kernel_string_n($dentry->d_name->name, filelen) mode = $sattr->ia_mode } probe _nfs.proc2.missing_create = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 fh = 0 filelen = 0 filename = "" mode = 0 } probe nfs.proc2.create.return = kernel.function("nfs_proc_create").return !, module("nfs").function("nfs_proc_create").return !, module("nfsv2").function("nfs_proc_create").return !, never { name = "nfs.proc2.create.return" version = 2 retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.create = kernel.function("nfs3_proc_create") !, module("nfs").function("nfs3_proc_create") ?, module("nfsv3").function("nfs3_proc_create") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 fh = NFS_FH($dir) filelen = $dentry->d_name->len filename = kernel_string_n($dentry->d_name->name, filelen) flag = $flags mode = $sattr->ia_mode name = "nfs.proc3.create" argstr = sprintf("%s", filename) } probe nfs.proc3.create.return = kernel.function("nfs3_proc_create").return !, module("nfs").function("nfs3_proc_create").return ?, module("nfsv3").function("nfs3_proc_create").return ? { name = "nfs.proc3.create.return" version = 3 retstr = sprintf("%d", $return) } probe nfs.proc4.create = kernel.function("nfs4_proc_create") !, module("nfs").function("nfs4_proc_create") ?, module("nfsv4").function("nfs4_proc_create") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 fh = NFS_FH($dir) filelen = $dentry->d_name->len filename = kernel_string_n($dentry->d_name->name, filelen) flag = $flags mode = $sattr->ia_mode name = "nfs.proc4.create" argstr = sprintf("%s", filename) } probe nfs.proc4.create.return = kernel.function("nfs4_proc_create").return !, module("nfs").function("nfs4_proc_create").return ?, module("nfsv4").function("nfs4_proc_create").return ? { name = "nfs.proc4.create.return" version = 4 retstr = sprintf("%d", $return) } /** * probe nfs.proc.remove - NFS client removes a file on server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version (the function is used for all NFS version) * @fh: file handle of parent dir * @filename: file name * @filelen: length of file name */ probe nfs.proc.remove = nfs.proc2.remove, nfs.proc3.remove, nfs.proc4.remove {} probe nfs.proc.remove.return = nfs.proc2.remove.return, nfs.proc3.remove.return, nfs.proc4.remove.return {} probe nfs.proc2.remove = _nfs.proc2.remove !, _nfs.proc2.missing_remove { version = 2 name = "nfs.proc2.remove" argstr = sprintf("%s", filename) } probe _nfs.proc2.remove = kernel.function("nfs_proc_remove") !, module("nfs").function("nfs_proc_remove") ?, module("nfsv2").function("nfs_proc_remove") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) fh = NFS_FH($dir) filelen = $name->len filename = kernel_string_n($name->name, filelen) } probe _nfs.proc2.missing_remove = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 fh = 0 filelen = 0 filename = "" } probe nfs.proc2.remove.return = kernel.function("nfs_proc_remove").return !, module("nfs").function("nfs_proc_remove").return !, module("nfsv2").function("nfs_proc_remove").return !, never { name = "nfs.proc2.remove.return" version = 2 retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.remove = kernel.function("nfs3_proc_remove") !, module("nfs").function("nfs3_proc_remove") ?, module("nfsv3").function("nfs3_proc_remove") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 3 fh = NFS_FH($dir) filelen = $name->len filename = kernel_string_n($name->name, filelen) name = "nfs.proc3.remove" argstr = sprintf("%s", filename) } probe nfs.proc3.remove.return = kernel.function("nfs3_proc_remove").return !, module("nfs").function("nfs3_proc_remove").return ?, module("nfsv3").function("nfs3_proc_remove").return ? { name = "nfs.proc3.remove.return" version = 3 retstr = sprintf("%d", $return) } probe nfs.proc4.remove = kernel.function("nfs4_proc_remove") !, module("nfs").function("nfs4_proc_remove") ?, module("nfsv4").function("nfs4_proc_remove") ? { client = NFS_CLIENT($dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) version = 4 fh = NFS_FH($dir) filelen = $name->len filename = kernel_string_n($name->name, filelen) name = "nfs.proc4.remove" argstr = sprintf("%s", filename) } probe nfs.proc4.remove.return = kernel.function("nfs4_proc_remove").return !, module("nfs").function("nfs4_proc_remove").return ?, module("nfsv4").function("nfs4_proc_remove").return ? { name = "nfs.proc4.remove.return" version = 4 retstr = sprintf("%d", $return) } /** * probe nfs.proc.rename - NFS client renames a file on server * * @server_ip: IP address of server * @prot: transfer protocol * @version: NFS version (the function is used for all NFS version) * @old_fh: file handle of old parent dir * @new_fh: file handle of new parent dir * @old_name: old file name * @old_filelen: length of old file name * @new_name: new file name * @new_filelen: length of new file name */ probe nfs.proc.rename = nfs.proc2.rename, nfs.proc3.rename, nfs.proc4.rename {} probe nfs.proc.rename.return = nfs.proc2.rename.return, nfs.proc3.rename.return, nfs.proc4.rename.return {} probe nfs.proc2.rename = _nfs.proc2.rename !, _nfs.proc2.missing_rename { version = 2 name = "nfs.proc2.rename" argstr = sprintf("%s,%s", old_name, new_name) } probe _nfs.proc2.rename = kernel.function("nfs_proc_rename") !, module("nfs").function("nfs_proc_rename") ?, module("nfsv2").function("nfs_proc_rename") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) old_fh = NFS_FH($old_dir) old_filelen = $old_name->len old_name = kernel_string_n($old_name->name, old_filelen) new_fh = NFS_FH($new_dir) new_filelen = $new_name->len new_name = kernel_string_n($new_name->name, new_filelen) } probe _nfs.proc2.missing_rename = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 old_fh = 0 old_filelen = 0 old_name = "" new_fh = 0 new_filelen = 0 new_name = "" } probe nfs.proc2.rename.return = kernel.function("nfs_proc_rename").return !, module("nfs").function("nfs_proc_rename").return !, module("nfsv2").function("nfs_proc_rename").return !, never { name = "nfs.proc2.rename.return" version = 2 retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc3.rename = _nfs.proc3.rename !, _nfs.proc3.missing_rename { version = 3 name = "nfs.proc3.rename" argstr = sprintf("%s,%s", old_name, new_name) } probe _nfs.proc3.rename = kernel.function("nfs3_proc_rename") !, module("nfs").function("nfs3_proc_rename") ?, module("nfsv3").function("nfs3_proc_rename") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) old_fh = NFS_FH($old_dir) old_filelen = $old_name->len old_name = kernel_string_n($old_name->name, old_filelen) new_fh = NFS_FH($new_dir) new_filelen = $new_name->len new_name = kernel_string_n($new_name->name, new_filelen) } probe _nfs.proc3.missing_rename = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 old_fh = 0 old_filelen = 0 old_name = "" new_fh = 0 new_filelen = 0 new_name = "" } probe nfs.proc3.rename.return = kernel.function("nfs3_proc_rename").return !, module("nfs").function("nfs3_proc_rename").return ?, module("nfsv3").function("nfs3_proc_rename").return !, never { name = "nfs.proc3.rename.return" version = 3 retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") } probe nfs.proc4.rename = _nfs.proc4.rename !, _nfs.proc4.missing_rename { version = 4 name = "nfs.proc4.rename" argstr = sprintf("%s,%s", old_name, new_name) } probe _nfs.proc4.rename = kernel.function("nfs4_proc_rename") !, module("nfs").function("nfs4_proc_rename") ?, module("nfsv4").function("nfs4_proc_rename") ? { client = NFS_CLIENT($old_dir) server_ip = get_ip_from_client(client) prot = get_prot_from_client(client) old_fh = NFS_FH($old_dir) old_filelen = $old_name->len old_name = kernel_string_n($old_name->name, old_filelen) new_fh = NFS_FH($new_dir) new_filelen = $new_name->len new_name = kernel_string_n($new_name->name, new_filelen) } probe _nfs.proc4.missing_rename = never { client = 0 %( systemtap_v >= "4.3" %? server_ip = "" %: server_ip = 0 %) prot = 0 old_fh = 0 old_filelen = 0 old_name = "" new_fh = 0 new_filelen = 0 new_name = "" } probe nfs.proc4.rename.return = kernel.function("nfs4_proc_rename").return !, module("nfs").function("nfs4_proc_rename").return ?, module("nfsv4").function("nfs4_proc_rename").return !, never { name = "nfs.proc4.rename.return" version = 4 retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") }