diff options
author | mmason <mmason> | 2007-01-24 07:25:29 +0000 |
---|---|---|
committer | mmason <mmason> | 2007-01-24 07:25:29 +0000 |
commit | 3797855d3ccfaa2871878b538d8ea866930e8dfd (patch) | |
tree | ef53637123ad6ff7b48cc3500bd7729ee832040a | |
parent | c2ee3ea88d0ff02fe3bd03a34354fae87ada78a5 (diff) | |
download | systemtap-steved-3797855d3ccfaa2871878b538d8ea866930e8dfd.tar.gz systemtap-steved-3797855d3ccfaa2871878b538d8ea866930e8dfd.tar.xz systemtap-steved-3797855d3ccfaa2871878b538d8ea866930e8dfd.zip |
Added stapprobes.socket(5) man page and updates to stapprobes(5) and stapfuncs(5).
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Makefile.in | 9 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | man/ChangeLog | 4 | ||||
-rw-r--r-- | man/stapprobes.socket.5.in | 426 | ||||
-rw-r--r-- | stapfuncs.5.in | 50 | ||||
-rw-r--r-- | stapprobes.5.in | 1 |
8 files changed, 491 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index ce3ab228..ef685b2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ AM_CFLAGS = -std=gnu99 -D_GNU_SOURCE -fexceptions \ -Wall -Werror -Wshadow -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 +dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 bin_PROGRAMS = stap staprun stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ diff --git a/Makefile.in b/Makefile.in index ddda1fee..4d54cd6a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -63,6 +63,7 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ $(top_srcdir)/man/stapprobes.rpc.5.in \ $(top_srcdir)/man/stapprobes.scsi.5.in \ $(top_srcdir)/man/stapprobes.signal.5.in \ + $(top_srcdir)/man/stapprobes.socket.5.in \ $(top_srcdir)/man/stapprobes.tcp.5.in \ $(top_srcdir)/man/stapprobes.udp.5.in AUTHORS COPYING \ ChangeLog INSTALL NEWS compile depcomp install-sh missing @@ -80,8 +81,8 @@ CONFIG_CLEAN_FILES = systemtap.spec stp_check stap.1 stapprobes.5 \ man/stapprobes.nfs.5 man/stapprobes.nfsd.5 \ man/stapprobes.pagefault.5 man/stapprobes.process.5 \ man/stapprobes.rpc.5 man/stapprobes.scsi.5 \ - man/stapprobes.signal.5 man/stapprobes.tcp.5 \ - man/stapprobes.udp.5 + man/stapprobes.signal.5 man/stapprobes.socket.5 \ + man/stapprobes.tcp.5 man/stapprobes.udp.5 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) @@ -248,7 +249,7 @@ AM_CFLAGS = -std=gnu99 -D_GNU_SOURCE -fexceptions \ -Wall -Werror -Wshadow -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 +dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ @@ -380,6 +381,8 @@ man/stapprobes.scsi.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobe cd $(top_builddir) && $(SHELL) ./config.status $@ man/stapprobes.signal.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes.signal.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ +man/stapprobes.socket.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes.socket.5.in + cd $(top_builddir) && $(SHELL) ./config.status $@ man/stapprobes.tcp.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes.tcp.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ man/stapprobes.udp.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes.udp.5.in @@ -5967,7 +5967,7 @@ esac ac_config_headers="$ac_config_headers config.h:config.in" - ac_config_files="$ac_config_files Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 runtime/lket/b2a/Makefile testsuite/Makefile man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.tcp.5 man/stapprobes.udp.5" + ac_config_files="$ac_config_files Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 runtime/lket/b2a/Makefile testsuite/Makefile man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6587,6 +6587,7 @@ do "man/stapprobes.rpc.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.rpc.5" ;; "man/stapprobes.scsi.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.scsi.5" ;; "man/stapprobes.signal.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.signal.5" ;; + "man/stapprobes.socket.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.socket.5" ;; "man/stapprobes.tcp.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.tcp.5" ;; "man/stapprobes.udp.5" ) CONFIG_FILES="$CONFIG_FILES man/stapprobes.udp.5" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; diff --git a/configure.ac b/configure.ac index 319065bc..4885374c 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ esac AC_SUBST([PROCFLAGS]) AC_CONFIG_HEADERS([config.h:config.in]) -AC_CONFIG_FILES(Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 runtime/lket/b2a/Makefile testsuite/Makefile man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.tcp.5 man/stapprobes.udp.5) +AC_CONFIG_FILES(Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 lket-b2a.1 runtime/lket/b2a/Makefile testsuite/Makefile man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5) AC_OUTPUT if test $build_elfutils = yes; then diff --git a/man/ChangeLog b/man/ChangeLog index 3f79b493..8423dc27 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2007-01-23 Mike Mason <mmlnx@us.ibm.com> + + * stapprobes.socket.5.in: New sockets tapset man page. + 2006-10-18 Li Guanglei <guanglei@cn.ibm.com> * stapprobes.iosched.5.in: update diff --git a/man/stapprobes.socket.5.in b/man/stapprobes.socket.5.in new file mode 100644 index 00000000..3fa1ae52 --- /dev/null +++ b/man/stapprobes.socket.5.in @@ -0,0 +1,426 @@ +.\" -*- nroff -*- +.TH STAPPROBES.SOCKET 5 @DATE@ "IBM" +.SH NAME +stapprobes.socket \- systemtap socket probe points + +.\" macros +.de SAMPLE +.br +.RS +.nf +.nh +.. +.de ESAMPLE +.hy +.fi +.RE +.. + +.SH DESCRIPTION + +This family of probe points is used to probe socket activities. +It contains the following probe points: + +.P +.TP +.B socket.send + +Fires at the conclusion of sending a message on a socket. +This probe alias includes the +.B socket.sendmsg.return +and +.B socket.do_write.return +probes (these two probes should +catch all messages sent on sockets). The arguments supplied at the beginning +of the send are cached and made available in this probe. + +.B Context: + +The message sender. + +.B Arguments: + +.I name + Name of this probe. + +.I size + Size of message sent (in bytes) or error code if success == 0 + +.I protocol + Protocol used on the socket. Use sock_prot_num2str(protocol) + to convert to a string. + + Common values include: + 0 - IP (Internet Procotol, local interprocess communications) + 6 - TCP (Transmission Control Protocol) + 17 - UDP (User Datagram Protocol) + 132 - SCTP (Stream Control Transmission Protocol) + + Refer to /etc/protocols for a complete list of possible values. + +.I family + Protocol family of the socket (from include/linux/socket.h). + Use sock_fam_num2str(family) to convert to a string. + + Possible values are: + 0 - UNSPEC (Unspecified) + 1 - LOCAL (Unix domain/local sockets) + 2 - INET (Internet Protocol (IP)) + 3 - AX25 (Amateur Radio AX.25) + 4 - IPX (Novell IPX) + 5 - APPLETALK (AppleTalk DDP) + 6 - NETROM (Amateur Radio NET/ROM) + 7 - BRIDGE (Multiprotocol bridge) + 8 - ATMPVC (ATM PVCs) + 9 - X25 (X.25) + 10 - INET6 (IP version 6) + 11 - ROSE (Amateur Radio X.25 PLP) + 12 - DECNET (Reserved for DECnet project) + 13 - NETBEUI (Reserved for 802.2LLC project) + 14 - SECURITY (Security callback pseudo AF) + 15 - KEY (key management API) + 16 - NETLINK (Netlink protocol) + 17 - PACKET (Packet family) + 18 - ASH (Ash) + 19 - ECONET (Acorn Econet) + 20 - ATMSVC (ATM SVCs) + 22 - SNA (Linux SNA Project) + 23 - IRDA (IRDA sockets) + 24 - PPP0X (PPPoX sockets) + 25 - WANPIPE (Wanpipe API Sockets) + 26 - LLC (Linux LLC) + 30 - TIPC (TIPC sockets) + 31 - BLUETOOTH (Bluetooth sockets) + +.I state + State of the socket. Use sock_state_num2str(state) to convert + to a string. + + Possible values are: + 0 - FREE (not allocated) + 1 - UNCONNECTED (unconnected to any socket) + 2 - CONNECTING (in the process of connecting) + 3 - CONNECTED (connected to a socket) + 4 - DISCONNECTING (in the process of disconnecting) + +.I flags + Socket flags. Use sock_flags_num2str(flags) to convert + to a string. + + Possible values are: + 0 - ASYNC_NOSPACE + 1 - ASYNC_WAITDATA + 2 - NOSPACE + 3 - PASSCRED + 4 - PASSSEC + +.I type + Socket type. Use sock_type_num2str(type) to convert + to a string. + + Possible values are: + 1 - STREAM (stream connection socket) + 2 - DGRAM (datagram connectionless socket) + 3 - RAW (raw socket) + 4 - RDM (reliably-deliverd message) + 5 - SEQPACKET (sequential packet socket) + 6 - DCCP (datagram congestion control protocol socket) + 10 - PACKET (Linux-specific way of getting packets at device level) + +.I mflags + Message type bitmap. Use msg_flags_num2str(flags) to convert + to a string. + + Possible bit settings are: + 0x01 - OOB + 0x02 - PEEK + 0x04 - DONTROUTE + 0x08 - CTRUNC + 0x10 - PROBE (Do not send. Only probe path f.e. for MTU) + 0x20 - TRUNC + 0x40 - DONTWAIT (Nonblocking IO) + 0x80 - EOR (End of record) + 0x100 - WAITALL (Wait for a full request) + 0x200 - FIN + 0x400 - SYN + 0x800 - CONFIRM (Confirm path validity) + 0x1000 - RST + 0x2000 - ERRQUEUE (Fetch message from error queue) + 0x4000 - NOSIGNAL (Do not generate SIGPIPE) + 0x8000 - MORE (Sender will send more) + +.I success + Was send successful? + + Possible values are: + 1 - Yes + 0 - No + +.TP +.B socket.receive + +Fires at the conclusion of receiving a message on a socket. +This probe alias includes the +.B socket.recvmsg.return +and +.B socket.do_read.return +probes (these two probes should +catch all messages received on sockets). The arguments supplied at +the beginning of the receive are cached and made available in this probe. + +.B Context: + +The message receiver. + +.B Arguments: + +Same as +.B socket.send. + +.TP +.B socket.sendmsg + +Fires when the sock_sendmsg() kernel function is entered. + +.B Context: + +The message sender. + +.B Arguments: + +Same as +.B socket.send, +with the following exceptions: + +.I size + + Size of message being sent (in bytes). + +.I success + + Not used. + +.TP +.B socket.sendmsg.return + +Fires when the sock_sendmsg() kernel function returns. + +.B Context: + +The message sender. + +.B Arguments: + +Same as +.B socket.send + +.TP +.B socket.recvmsg + +Fires when the sock_recvmsg() kernel function is entered. + +.B Context: + +The message receiver. + +.B Arguments: + +Same as +.B socket.receive, +with the following exceptions: + +.I size + + Size of message being received (in bytes). + +.I success + + Not used. + +.TP +.B socket.recvmsg.return + +Fires when the sock_recvmsg() kernel function returns. + +.B Context: + +The message receiver. + +.B Arguments: + +Same as +.B socket.receive. + +.TP +.B socket.do_write + +Fires when the do_sock_write() kernel function is entered. + +.B Context: + +The message sender. + +.B Arguments: + +Same as +.B socket.send, +with the following exceptions: + +.I size + + Size of message being sent (in bytes). + +.I success + + Not used. + +.TP +.B socket.do_write.return + +Fires when the do_sock_write() kernel function returns. + +.B Context: + +The message sender. + +.B Arguments: + +Same as +.B socket.send. + +.TP +.B socket.do_read + +Fires when the do_sock_read() kernel function is entered. + +.B Context: + +The message receiver. + +.B Arguments: + +Same as +.B socket.receive, +with the following exceptions: + +.I size + + Size of message being received (in bytes). + +.I success + + Not used. + +.TP +.B socket.do_read.return + +Fires when the do_sock_read() kernel function returns. + +.B Context: + +The message receiver. + +.B Arguments: + +Same as +.B socket.receive. + +.TP +.B socket.create + +Fires at the beginning of creating a socket. + +.B Context: + +The socket creator. + +.B Arguments: + +.I name +.br +.I protocol +.br +.I family +.br +.I type + See +.B socket.send. + +.I requester + Requester type. + + Possible values are: + 1 - kernel + 0 - user + +.TP +.B socket.create.return + +Fires at the end of creating a socket. + +.B Context: + +The socket creator. + +.B Arguments: + +Same as +.B socket.create, +plus: + +.I err + Return code. + + Possible values are: + 0 - success + < 0 - error + +.I success + Was the socket created successfully? + + Possible values are: + 1 - Yes + 0 - No +.TP +.B socket.close + +Fires at the beginning of closing a socket. + +.B Context: + +The socket closer. + +.B Arguments: + +.I name +.br +.I protocol +.br +.I family +.br +.I state +.br +.I flags +.br +.I type + See +.B socket.send. + +.TP +.B socket.close.return + +Fires at the end of closing a socket. + +.B Context: + +The socket closer. + +.B Arguments: + +.I name + Name of this probe. + +.SH SEE ALSO +.IR stap (1), +.IR stapprobes (5), +.IR stapfuncs (5)
\ No newline at end of file diff --git a/stapfuncs.5.in b/stapfuncs.5.in index f8891310..a76ff240 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -84,6 +84,18 @@ Return the substring of str starting from character start and ending at characte .TP isinstr:long (s1:string, s2:string) Return 1 if string s1 contains string s2, returns 0 otherwise. +.TP +strtol:long (str:string, base:long) +Convert the string representation of a number to a long using the numbering system +specified by base. For example, strtol("1000", 16) returns 4096. Returns 0 if the +string cannot be converted. +.TP +tokenize:string (str:string, delim:string) +Given a string and a token delimiter, return the next token in the string. +If str is non-NULL, returns the first token. If str is NULL, returns the +next token in the str passed in the previous call to tokenize(). Only the +first character in delim is used as the delimiter. Returns NULL when no +more tokens are left. .SS TIMESTAMP .TP @@ -271,6 +283,44 @@ Returns the value for the processor's performance counter for the associated handle. The body of the a perfmon probe should set record the handle being used for that event. +.SS SOCKETS +These functions convert arguments in the socket tapset back and +forth between their numeric and string representations. +See +.IR stapprobes.socket (5) +for details. + +.TP +sock_prot_num2str:string (proto:long) +Returns the string representation of the given protocol value. +.TP +sock_prot_str2num:long (proto:string) +Returns the numeric value associated with the given protocol string. +.TP +sock_fam_num2str:string (family:long) +Returns the string representation of the given protocol family value. +.TP +sock_fam_str2num:long (family:string) +Returns the numeric value associated with the given protocol family string. +.TP +sock_state_num2str:string (state:long) +Returns the string representation of the given socket state value. +.TP +sock_state_str2num:long (state:string) +Returns the numeric value associated with the given socket state string. +.TP +sock_type_num2str:string (type:long) +Returns the string representation of the given socket type value. +.TP +sock_type_str2num:long (type:string) +Returns the numeric value associated with the given socket type string. +.TP +sock_flags_num2str:string (flags:long) +Returns the string representation of the given socket flags value. +.TP +msg_flags_num2str:string (flags:long) +Returns the string representation of the given message flags bit map. + .SH FILES .nh .IR /usr/share/systemtap/tapset diff --git a/stapprobes.5.in b/stapprobes.5.in index 0af08cbf..59daee8e 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -326,6 +326,7 @@ refers to the group of probe aliases with any name in the third position .IR stapprobes.rpc (5), .IR stapprobes.scsi (5), .IR stapprobes.signal (5), +.IR stapprobes.socket (5), .IR stapprobes.tcp (5), .IR stapprobes.udp (5), .IR lket (5) |