SystemTap Tapset Reference Manual

William Cohen

 


      
     

This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.


Table of Contents

1. Introduction
Tapset Name Format
2. Context Functions
print_regs — Print a register dump.
execname — Execname of current processes
pid — Process ID of current process
tid — Thread ID of current process
ppid — Parent Process ID of current process
pexecname — Execname of the parent process.
gid — Group ID of current process
egid — Effective gid of the current process.
uid — User ID of the current process.
euid — Effective User ID of the current process.
cpu — The current cpu number.
pp — Current probe point
registers_valid — Register information valid
user_mode — User Mode
is_return — Is return probe
target — Target pid
stack_size — Size of kernel stack
stack_used — Current amount of kernel stack used
stack_unused — Amount of kernel stack currently available
print_stack — Print out stack from string
probefunc — Function probed
probemod — Module probed
print_backtrace — Print stack back trace
backtrace — Hex backtrace of current stack
caller — Return name and address of calling function
caller_addr — Return caller address
3. Timestamp Functions
get_cycles — Processor cycle count.
gettimeofday_ns — Number of nanoseconds since UNIX epoch.
gettimeofday_us — Number of microseconds since UNIX epoch.
gettimeofday_ms — Number of milliseconds since UNIX epoch.
gettimeofday_s — Number of seconds since UNIX epoch.
4. Memory Tapset
vm_fault_contains — Test return value for page fault reason
probe vm.pagefault — Records that a page fault occurred.
probe vm.pagefault.return — Indicates what type of fault occurred.
addr_to_node — Returns which node a given address belongs to within a NUMA system.
probe vm.write_shared — Attempts at writing to a shared page.
probe vm.write_shared_copy — Page copy for shared page write.
probe vm.mmap — Fires when an <command>mmap</command> is requested.
probe vm.munmap — Fires when an <command>munmap</command> is requested.
probe vm.brk — Fires when a <command>brk</command> is requested (i.e. the heap will be resized).
probe vm.oom_kill — Fires when a thread is selected for termination by the OOM killer.
5. IO Scheduler Tapset
probe ioscheduler.elv_next_request — Retrieve request from request queue
probe ioscheduler.elv_next_request.return — Return from retrieving a request
probe ioscheduler.elv_add_request — Add a request into request queue
probe ioscheduler.elv_completed_request — Request is completed
6. SCSI Tapset
probe scsi.ioentry — Prepares a SCSI mid-layer request
probe scsi.iodispatching — SCSI mid-layer dispatched low-level SCSI command
probe scsi.iodone — SCSI command completed by low level driver and enqueued into the done queue.
probe scsi.iocompleted — SCSI mid-layer running the completion processing for block device I/O requests
7. Networking Tapset
probe netdev.receive — Data recieved from network device.
probe netdev.transmit — Network device transmitting buffer
8. Socket Tapset
probe socket.send — Message sent on a socket.
probe socket.receive — Message received on a socket.
probe socket.sendmsg.return — Return from Message being sent on socket
probe socket.recvmsg — Message being received on socket
probe socket.aio_write — Message send via sock_aio_write
probe socket.aio_write.return — Conclusion of message send via sock_aio_write
probe socket.aio_read — Receiving message via sock_aio_read
probe socket.aio_read.return — Conclusion of message received via sock_aio_read
probe socket.writev — Message sent via socket_writev
probe socket.writev.return — Conclusion of message sent via socket_writev
probe socket.readv — Receiving a message via sock_readv
probe socket.readv.return — Conclusion of receiving a message via sock_readv
probe socket.create — Creation of a socket
probe socket.create.return — Return from Creation of a socket
probe socket.close — Close a socket
probe socket.close.return — Return from closing a socket
9. TCP Tapset
probe tcp.sendmsg — Sending a tcp message
probe tcp.sendmsg.return — Sending TCP message is done
probe tcp.recvmsg — Receiving TCP message
probe tcp.recvmsg.return — Receiving TCP message complete
probe tcp.disconnect — TCP socket disconnection
probe tcp.disconnect.return — TCP socket disconnection complete
probe tcp.setsockopt — Call to setsockopt
probe tcp.setsockopt.return — Return from setsockopt
10. UDP Tapset
probe udp.sendmsg — Fires whenever a process sends a UDP message
probe udp.sendmsg.return — Fires whenever an attempt to send a UDP message is completed
probe udp.recvmsg — Fires whenever a UDP message is received
probe udp.recvmsg.return — An attempt to receive a UDP message received has been completed
probe udp.disconnect — A process requests for UPD to be UDP disconnected
probe udp.disconnect.return — UDP has been disconnected successfully
11. Process Tapset
probe process.create — Fires whenever a new process is successfully created
probe process.start — Starting new process
probe process.exec — Attempt to exec to a new program
probe process.exec_complete — Return from exec to a new program
probe process.exit — Exit from process
probe process.release — Process released
12. Signal Tapset
probe signal.send — Fires when a system call or kernel function sends a signal to a process.
probe signal.send.return — Fires when a signal sent to a process returns.
probe signal.checkperm — Fires when a permission check is performed on a sent signal
probe signal.wakeup — Wakes up a sleeping process, making it ready for new active signals
probe signal.check_ignored — Fires when a system call or kernel function checks whether a
probe signal.force_segv — Fires when a system call, kernel function, or process sent a
probe signal.syskill — Fires when the kernel function <command>sys_kill</command>
probe signal.sys_tkill — Fires when <command>tkill</command> sends a kill signal
probe signal.sys_tgkill — Fires when the kernel function <command>tgkill</command>
probe signal.send_sig_queue — Fires when a signal is queued to a process
probe signal.pending — Fires when the <command>SIGPENDING</command> system call is used;
probe signal.handle — Fires when the signal handler is invoked
probe signal.do_action — Initiates a trace when a thread is about to examine
probe signal.procmask — Initiates a trace when a thread is about to examine and change blocked signals
probe signal.flush — Fires when all pending signals for a task are flushed