Skip to content

Commit

Permalink
man: fixes some man pages
Browse files Browse the repository at this point in the history
In the man pages of tcplife and tcpstates, the name of the field for
the remote port and address (DPORT, DADDR) differs from the tool
itself (RPORT, RADDR). This patch fix the man pages.

The man page of tcpdrop mentions options that do not exists. This
patch fix that. It also fix the comment at the head of the code that
too mentions inexistents options.

The man pages for solisten and sofdsnoop are missing. This patch adds
them.

The deadlock_detector tools has been rename simply deadlock, but its
manpage is still named deadlock_detector although its content has been
updated. This patch rename the manpage.
  • Loading branch information
jeromemarchand committed Aug 6, 2019
1 parent 1a47a9a commit 33c9c57
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 12 deletions.
File renamed without changes.
62 changes: 62 additions & 0 deletions man/man8/sofdsnoop.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.TH SOFDSNOOP 8 "2019-07-29" "USER COMMANDS"
.SH NAME
sofdsnoop \- traces FDs passed by sockets
.SH SYNOPSIS
usage: sofdsnoop [\-h] [\-T] [\-p PID] [\-t TID] [\-n NAME] [\-d DURATION]
.SH DESCRIPTION
Trace file descriptors passed via socket
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-T\fR, \fB\-\-timestamp\fR
include timestamp on output
.TP
\fB\-p\fR PID, \fB\-\-pid\fR PID
trace this PID only
.TP
\fB\-t\fR TID, \fB\-\-tid\fR TID
trace this TID only
.TP
\fB\-n\fR NAME, \fB\-\-name\fR NAME
only print process names containing this name
.TP
\fB\-d\fR DURATION, \fB\-\-duration\fR DURATION
total duration of trace in seconds
.SH EXAMPLES
.TP
Trace passed file descriptors
#
.B sofdsnoop
.TP
Include timestamps
#
.B sofdsnoop \fB\-T\fR
.TP
Only trace PID 181
#
.B sofdsnoop \fB\-p\fR 181
.TP
Only trace TID 123
#
.B sofdsnoop \fB\-t\fR 123
.TP
Trace for 10 seconds only
#
.B sofdsnoop \fB\-d\fR 10
.TP
Only print process names containing "main"
#
.B sofdsnoop \fB\-n\fR main
.SH SOURCE
This is from bcc.
.IP
https://github.com/iovisor/bcc
.PP
Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
.SH STABILITY
Unstable - in development.
49 changes: 49 additions & 0 deletions man/man8/solisten.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.TH SOLISTEN 8 "2019-07-29" "USER COMMANDS"
.SH NAME
solisten \- Trace listening socket
.SH SYNOPSIS
usage: solisten [\-h] [\-\-show\-netns] [\-p PID] [\-n NETNS]
.SH DESCRIPTION
All IPv4 and IPv6 listen attempts are traced, even if they ultimately
fail or the listening program is not willing to accept().
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-show\-netns\fR
show network namespace
.TP
\fB\-p\fR PID, \fB\-\-pid\fR PID
trace this PID only
.TP
\fB\-n\fR NETNS, \fB\-\-netns\fR NETNS
trace this Network Namespace only
.SH EXAMPLES
.TP
Stream socket listen:
#
.B solisten
.TP
Stream socket listen for specified PID only
#
.B solisten \-p 1234
.TP
Stream socket listen for the specified network namespace ID only
#
.B solisten \-\-netns 4242
.TP
Show network ns ID (useful for containers)
#
.B solisten \-\-show\-netns
.SH SOURCE
This is from bcc.
.IP
https://github.com/iovisor/bcc
.PP
Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
.SH STABILITY
Unstable - in development.
2 changes: 1 addition & 1 deletion man/man8/tcpdrop.8
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.SH NAME
tcpdrop \- Trace kernel-based TCP packet drops with details. Uses Linux eBPF/bcc.
.SH SYNOPSIS
.B tcpdrop [\-h] [\-T] [\-t] [\-w] [\-s] [\-p PID] [\-D PORTS] [\-L PORTS]
.B tcpdrop [\-h]
.SH DESCRIPTION
This tool traces TCP packets or segments that were dropped by the kernel, and
shows details from the IP and TCP headers, the socket state, and the
Expand Down
6 changes: 3 additions & 3 deletions man/man8/tcplife.8
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ IP address family (4 or 6)
LADDR
Local IP address.
.TP
DADDR
RADDR
Remote IP address.
.TP
LPORT
Local port.
.TP
DPORT
Destination port.
RPORT
Remote port.
.TP
TX_KB
Total transmitted Kbytes.
Expand Down
6 changes: 3 additions & 3 deletions man/man8/tcpstates.8
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ IP address family (4 or 6)
LADDR
Local IP address.
.TP
DADDR
RADDR
Remote IP address.
.TP
LPORT
Local port.
.TP
DPORT
Destination port.
RPORT
Remote port.
.TP
OLDSTATE
Previous TCP state.
Expand Down
2 changes: 1 addition & 1 deletion tools/sofdsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# arguments
examples = """examples:
./sofdsnoop # trace file descriptors passes
./sofdsnoop # trace passed file descriptors
./sofdsnoop -T # include timestamps
./sofdsnoop -p 181 # only trace PID 181
./sofdsnoop -t 123 # only trace TID 123
Expand Down
2 changes: 1 addition & 1 deletion tools/sofdsnoop_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ optional arguments:
total duration of trace in seconds

examples:
./sofdsnoop # trace file descriptors passes
./sofdsnoop # trace passed file descriptors
./sofdsnoop -T # include timestamps
./sofdsnoop -p 181 # only trace PID 181
./sofdsnoop -t 123 # only trace TID 123
Expand Down
4 changes: 2 additions & 2 deletions tools/solisten.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# It could be useful in scenarios where load balancers needs to be updated
# dynamically as application is fully initialized.
#
# All IPv4 listen attempts are traced, even if they ultimately fail or the
# the listening program is not willing to accept().
# All IPv4 and IPv6 listen attempts are traced, even if they ultimately fail
# or the the listening program is not willing to accept().
#
# Copyright (c) 2016 Jean-Tiare Le Bigot.
# Licensed under the Apache License, Version 2.0 (the "License")
Expand Down
2 changes: 1 addition & 1 deletion tools/tcpdrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# This provides information such as packet details, socket state, and kernel
# stack trace for packets/segments that were dropped via tcp_drop().
#
# USAGE: tcpdrop [-c] [-h] [-l]
# USAGE: tcpdrop [-h]
#
# This uses dynamic tracing of kernel functions, and will need to be updated
# to match kernel changes.
Expand Down

0 comments on commit 33c9c57

Please sign in to comment.