/usr/share/systemtap/examples/network
NameSizeModeActions
autofs4.meta3970644editdlrm
autofs4.stp41670755editdlrm
connect_stat.meta4040644editdlrm
connect_stat.stp10190755editdlrm
dropwatch.meta4940644editdlrm
dropwatch.stp9000755editdlrm
netdev.meta3890644editdlrm
netdev.stp14580755editdlrm
netfilter_drop.meta6300644editdlrm
netfilter_drop.stp11560755editdlrm
netfilter_summary.meta5870644editdlrm
netfilter_summary.stp5910755editdlrm
netfilter_summary.txt28730644editdlrm
netfilter_summary_json.meta5110644editdlrm
netfilter_summary_json.stp10700644editdlrm
nettop.meta5190644editdlrm
nettop.stp9890755editdlrm
nettop.txt9530644editdlrm
net_xmit_json.meta4530644editdlrm
net_xmit_json.stp18010644editdlrm
nfsd-recent.meta4230644editdlrm
nfsd-recent.stp4420755editdlrm
nfsd-trace.meta3140644editdlrm
nfsd-trace.stp7010644editdlrm
nfsd-trace.txt8760644editdlrm
nfsdtop.meta4050644editdlrm
nfsdtop.stp33850755editdlrm
nfsd_unlink.meta4790644editdlrm
nfsd_unlink.stp5230755editdlrm
packet_contents.meta5500644editdlrm
packet_contents.stp2160755editdlrm
packet_contents.txt20660644editdlrm
sk_stream_wait_memory.meta7420644editdlrm
sk_stream_wait_memory.stp9990755editdlrm
socket-trace.meta7020644editdlrm
socket-trace.stp2220755editdlrm
socktop91440755editdlrm
socktop.meta5480644editdlrm
socktop.txt41350644editdlrm
stp_dump.meta3390644editdlrm
stp_dump.stp5680644editdlrm
stp_dump.txt16320644editdlrm
tcpdumplike.meta3810644editdlrm
tcpdumplike.stp5810755editdlrm
tcpipstat.meta7250644editdlrm
tcpipstat.stp182470755editdlrm
tcpipstat.txt8980644editdlrm
tcp_connections.meta6250644editdlrm
tcp_connections.stp3610755editdlrm
tcp_init_cwnd.meta5890644editdlrm
tcp_init_cwnd.stp3430755editdlrm
tcp_retransmission.meta2860644editdlrm
tcp_retransmission.stp11820644editdlrm
tcp_trace.meta6840644editdlrm
tcp_trace.stp190950755editdlrm
tcp_trace.txt34650644editdlrm
who_sent_it.meta5830644editdlrm
who_sent_it.stp4770644editdlrm
who_sent_it.txt8030644editdlrm
Edit: /usr/share/systemtap/examples/network/autofs4.stp (4167B)
#!/usr/bin/stap // Copyright (c) 2009, 2015 Red Hat Inc. // // 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. probe kernel.function("autofs4_lookup") !, module("autofs4").function("autofs4_lookup") { /* * Don't log automounts travels in its own directory hierarchy, as * they are treated differently, and certainly not something that is * useful for admins to see. */ if (!isinstr(execname(), "automount")) { printf("%s process %s[%d] looking up %s%s\n", ctime(gettimeofday_s()), execname(), pid(), (@defined($nd) ? fullpath_struct_nameidata($nd) : inode_name($dir)), d_name($dentry)); } } probe kernel.function("autofs4_follow_link") !, module("autofs4").function("autofs4_follow_link") { if (!isinstr(execname(), "automount")) { /* * dentry->d_name will be '/' for the mount trigger. Thus, * the path that the trigger lives on is one level up the * directory stack, and the root of that is yet another level * up. */ printf("%s process %s[%d] following mount trigger %s\n", ctime(gettimeofday_s()), execname(), pid(), (@defined($nd) ? d_path($nd) : reverse_path_walk($dentry))) } } probe kernel.function("autofs4_expire_direct").return !, module("autofs4").function("autofs4_expire_direct").return ? { if ($return != 0) { if (@defined($mnt->mnt_mountpoint)) { relative_path = reverse_path_walk(@entry($mnt->mnt_mountpoint)) root_path = sprintf("/%s", reverse_path_walk(@entry($mnt->mnt_parent->mnt_mountpoint))) } else { relative_path = "" root_path = task_dentry_path(task_current(), @entry($mnt->mnt_root), @entry($mnt)) } printf("%s process %s[%d] expiring direct mount %s/%s\n", ctime(gettimeofday_s()), execname(), pid(), root_path, relative_path) } } /* probe module("autofs4").statement("autofs4_expire_direct@fs/autofs4/expire.c+17").nearest ? { relative_path = reverse_path_walk($mnt->mnt_mountpoint) root_path = reverse_path_walk($mnt->mnt_parent->mnt_mountpoint) printf("%s process %s[%d] expiring direct mount /%s/%s\n", ctime(gettimeofday_s()), execname(), pid(), root_path, relative_path) } */ probe kernel.function("autofs4_expire_indirect").return !, module("autofs4").function("autofs4_expire_indirect").return { if ($return != 0) { relative_path = reverse_path_walk($return) root_path = (@defined($mnt->mnt_root) ? task_dentry_path(task_current(), @entry($mnt->mnt_root), @entry($mnt)) : reverse_path_walk(@entry($mnt->mnt_mountpoint))) printf("%s process %s[%d] expiring indirect mount %s/%s\n", ctime(gettimeofday_s()), execname(), pid(), root_path, relative_path) } } /* * The struct dentry's name may be '/' if this is a mount trigger, which * is not really something that is useful to print out. Instead, we just * indicate whether a mount or umount succeeded or failed. Coupled with the * messages printed out when looking up a directory and traversing a symlink, * this should be relatively easy to correlate to the appropriate directory. */ probe kernel.function("autofs4_wait").return !, module("autofs4").function("autofs4_wait").return { if (@entry($notify) > 0) { dname = d_name(@entry($dentry)) printf("%s %s of %s %s\n", ctime(gettimeofday_s()), (@entry($notify)==1?"mount":"unmount"), dname, $return == 0?"succeeded":"failed") } }