Package: net-tools Version: 2.10-1.1 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" [Use "groff -e ' $' <file>" to find trailing spaces.] ["test-groff" is a script in the repository for "groff"; is not shipped] (local copy and "troff" slightly changed by me). [The fate of "test-nroff" was decided in groff bug #55941.] * What was the outcome of this action? troff: backtrace: file '<stdin>':117 troff:<stdin>:117: warning: trailing space in the line troff: backtrace: file '<stdin>':122 troff:<stdin>:122: warning: trailing space in the line troff: backtrace: file '<stdin>':124 troff:<stdin>:124: warning: trailing space in the line troff: backtrace: file '<stdin>':126 troff:<stdin>:126: warning: trailing space in the line troff: backtrace: file '<stdin>':172 troff:<stdin>:172: warning: trailing space in the line troff: backtrace: file '<stdin>':218 troff:<stdin>:218: warning: trailing space in the line troff: backtrace: file '<stdin>':279 troff:<stdin>:279: warning: trailing space in the line troff: backtrace: file '<stdin>':280 troff:<stdin>:280: warning: trailing space in the line troff: backtrace: file '<stdin>':282 troff:<stdin>:282: warning: trailing space in the line troff: backtrace: file '<stdin>':297 troff:<stdin>:297: warning: trailing space in the line troff: backtrace: file '<stdin>':344 troff:<stdin>:344: warning: trailing space in the line troff: backtrace: file '<stdin>':346 troff:<stdin>:346: warning: trailing space in the line troff: backtrace: file '<stdin>':348 troff:<stdin>:348: warning: trailing space in the line troff: backtrace: file '<stdin>':350 troff:<stdin>:350: warning: trailing space in the line troff: backtrace: file '<stdin>':414 troff:<stdin>:414: warning: trailing space in the line troff: backtrace: file '<stdin>':438 troff:<stdin>:438: warning: trailing space in the line troff: backtrace: file '<stdin>':519 troff:<stdin>:519: warning: trailing space in the line troff: backtrace: file '<stdin>':520 troff:<stdin>:520: warning: trailing space in the line * What outcome did you expect instead? No output (no warnings). -.- General remarks and further material, if a diff-file exist, are in the attachments. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.11.5-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: sysvinit (via /sbin/init) Versions of packages net-tools depends on: ii libc6 2.40-3 ii libselinux1 3.7-3 net-tools recommends no packages. net-tools suggests no packages. -- no debconf information
Any program (person), that produces man pages, should check the output for defects by using (both groff and nroff) [gn]roff -mandoc -t -ww -b -z -K utf8 <man page> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. Not removing trailing spaces (in in- and output). The reason for these trailing spaces should be found and eliminated. Not beginning each input sentence on a new line. Lines should thus be shorter. See man-pages(7), item 'semantic newline'. -.- The difference between the formatted output of the original and patched file can be seen with: nroff -mandoc <file1> > <out1> nroff -mandoc <file2> > <out2> diff -u <out1> <out2> and for groff, using "printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - " instead of 'nroff -mandoc' Add the option '-t', if the file contains a table. Read the output of 'diff -u' with 'less -R' or similar. -.-. If 'man' (man-db) is used to check the manual for warnings, the following must be set: The option "-warnings=w" The environmental variable: export MAN_KEEP_STDERR=yes (or any non-empty value) or (produce only warnings): export MANROFFOPT="-ww -b -z" export MAN_KEEP_STDERR=yes (or any non-empty value) -.-. Output from "mandoc -T lint netstat.8": (possibly shortened list) mandoc: netstat.8:2:14: STYLE: whitespace at end of input line mandoc: netstat.8:7:35: STYLE: whitespace at end of input line mandoc: netstat.8:8:45: STYLE: whitespace at end of input line mandoc: netstat.8:15:125: STYLE: input text line longer than 80 bytes: netstat \- Print net... mandoc: netstat.8:19:12: STYLE: whitespace at end of input line mandoc: netstat.8:40:12: STYLE: whitespace at end of input line mandoc: netstat.8:80:12: STYLE: whitespace at end of input line mandoc: netstat.8:83:12: STYLE: whitespace at end of input line mandoc: netstat.8:91:24: STYLE: whitespace at end of input line mandoc: netstat.8:98:17: STYLE: whitespace at end of input line mandoc: netstat.8:117:8: STYLE: whitespace at end of input line mandoc: netstat.8:122:58: STYLE: whitespace at end of input line mandoc: netstat.8:123:15: STYLE: whitespace at end of input line mandoc: netstat.8:124:13: STYLE: whitespace at end of input line mandoc: netstat.8:125:15: STYLE: whitespace at end of input line mandoc: netstat.8:126:4: STYLE: whitespace at end of input line mandoc: netstat.8:127:13: STYLE: whitespace at end of input line mandoc: netstat.8:160:11: STYLE: whitespace at end of input line mandoc: netstat.8:162:12: STYLE: whitespace at end of input line mandoc: netstat.8:164:12: STYLE: whitespace at end of input line mandoc: netstat.8:165:11: STYLE: whitespace at end of input line mandoc: netstat.8:166:12: STYLE: whitespace at end of input line mandoc: netstat.8:172:38: STYLE: whitespace at end of input line mandoc: netstat.8:213:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:215:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:217:13: STYLE: whitespace at end of input line mandoc: netstat.8:218:55: STYLE: whitespace at end of input line mandoc: netstat.8:220:88: STYLE: input text line longer than 80 bytes: Established: The cou... mandoc: netstat.8:224:88: STYLE: input text line longer than 80 bytes: Listening: Since Ker... mandoc: netstat.8:225:21: STYLE: whitespace at end of input line mandoc: netstat.8:236:87: STYLE: input text line longer than 80 bytes: states used in UDP a... mandoc: netstat.8:279:68: STYLE: whitespace at end of input line mandoc: netstat.8:280:50: STYLE: whitespace at end of input line mandoc: netstat.8:282:3: STYLE: whitespace at end of input line mandoc: netstat.8:297:69: STYLE: whitespace at end of input line mandoc: netstat.8:337:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:339:13: STYLE: whitespace at end of input line mandoc: netstat.8:344:49: STYLE: whitespace at end of input line mandoc: netstat.8:346:12: STYLE: whitespace at end of input line mandoc: netstat.8:348:14: STYLE: whitespace at end of input line mandoc: netstat.8:349:12: STYLE: whitespace at end of input line mandoc: netstat.8:350:13: STYLE: whitespace at end of input line mandoc: netstat.8:384:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:391:14: STYLE: whitespace at end of input line mandoc: netstat.8:414:75: STYLE: whitespace at end of input line mandoc: netstat.8:421:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:424:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:427:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:430:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:431:1: WARNING: skipping paragraph macro: sp after PP mandoc: netstat.8:438:69: STYLE: whitespace at end of input line mandoc: netstat.8:500:2: STYLE: fill mode already enabled, skipping: fi mandoc: netstat.8:501:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:509:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:513:2: WARNING: skipping paragraph macro: PP empty mandoc: netstat.8:519:61: STYLE: whitespace at end of input line mandoc: netstat.8:520:66: STYLE: whitespace at end of input line -.-. Remove space characters at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". 2:.\" netstat.8 7:.\" Modified: Andi Kleen a...@muc.de 8:.\" Modified: Tuan Hoang tqho...@bigfoot.com 19:.B netstat 40:.B netstat 80:.B netstat 83:.B netstat 91:.RB [ \-\-unix | \-x ] 98:.RB [ \-\-ipx ] 117:netstat 122:Display the kernel routing tables. See the description in 123:.BR route (8) 124:for details. 125:.B netstat -r 126:and 127:.B route -e 160:.I family 162:.BR inet , 164:.BR unix , 165:.BR ipx , 166:.BR ax25 , 172:This has the same effect as using the 218:The protocol (tcp, udp, udpl, raw) used by the socket. 279:The socket is listening for incoming connections. Such sockets are 280:not included in the output unless you specify the 282:or 297:Slash-separated pair of the process id (PID) and process name of the 344:The flags displayed is SO_ACCEPTON (displayed as 346:SO_WAITDATA 348:or SO_NOSPACE 349:.RB ( N ). 350:SO_ACCECPTON 391:.I LISTENING 414:Process ID (PID) and process name of the process that has the socket open. 438:-- Mount point for the proc filesystem, which gives access to kernel 519:<tqho...@bigfoot.com>. The man page and the command included 520:in the net\-tools package is totally rewritten by Bernd Eckenfels -.-. Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em), if one is intended. " \(em " creates a too big gap in the text (in "troff"). An en-dash is usually surrounded by a space, while an em-dash is used without spaces. "man" (1 byte characters in input) transforms an en-dash (\(en) to one HYPHEN-MINUS, and an em-dash to two HYPHEN-MINUSES without considering the space around it. If "--" are two single "-" (end of options) then use "\-\-". netstat.8:435:-- The services translation file netstat.8:438:-- Mount point for the proc filesystem, which gives access to kernel netstat.8:442:-- device information netstat.8:445:-- raw socket information netstat.8:448:-- TCP socket information netstat.8:451:-- UDP socket information netstat.8:454:-- UDPLite socket information netstat.8:457:-- IGMP multicast information netstat.8:460:-- Unix domain socket information netstat.8:463:-- IPX socket information netstat.8:466:-- AX25 socket information netstat.8:469:-- DDP (appletalk) socket information netstat.8:472:-- NET/ROM socket information netstat.8:475:-- IP routing information netstat.8:478:-- AX25 routing information netstat.8:481:-- IPX routing information netstat.8:484:-- NET/ROM nodelist netstat.8:487:-- NET/ROM neighbours netstat.8:490:-- masqueraded connections netstat.8:493:-- Bluetooth L2CAP information netstat.8:496:-- Bluetooth serial connections netstat.8:499:-- statistics -.-. Change - to \- if it shall be printed as a minus sign. netstat.8:88:.RB [ -4 | \-\-inet ] netstat.8:89:.RB [ -6 | \-\-inet6 ] netstat.8:173:.BR \-\-inet | -4 , netstat.8:174:.BR \-\-inet6 | -6 , -.-. Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-), if it is in front of a name for an option, is a symbol for standard input, is a single character used to indicate an option, or is in the NAME section (man-pages(7)). N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen (0x2010, groff \[u2010] or \[hy]) in the output. 73:.RB { \-\-statistics | -s } 88:.RB [ -4 | \-\-inet ] 89:.RB [ -6 | \-\-inet6 ] 106:Replacement for \fBnetstat -r\fR is \fBip route\fR. 107:Replacement for \fBnetstat -i\fR is \fBip -s link\fR. 108:Replacement for \fBnetstat -g\fR is \fBip maddr\fR. 125:.B netstat -r 127:.B route -e 173:.BR \-\-inet | -4 , 174:.BR \-\-inet6 | -6 , 175:.BR \-\-unix | -x , 383:Who ever knows what the future will bring us - just fill in here :-) 435:-- The services translation file 438:-- Mount point for the proc filesystem, which gives access to kernel 442:-- device information 445:-- raw socket information 448:-- TCP socket information 451:-- UDP socket information 454:-- UDPLite socket information 457:-- IGMP multicast information 460:-- Unix domain socket information 463:-- IPX socket information 466:-- AX25 socket information 469:-- DDP (appletalk) socket information 472:-- NET/ROM socket information 475:-- IP routing information 478:-- AX25 routing information 481:-- IPX routing information 484:-- NET/ROM nodelist 487:-- NET/ROM neighbours 490:-- masqueraded connections 493:-- Bluetooth L2CAP information 496:-- Bluetooth serial connections 499:-- statistics -.-. Add a comma (or \&) after "e.g." and "i.e.", or use English words (man-pages(7)). Abbreviation points should be protected against being interpreted as an end of sentence, if they are not, and that independent of the current place on the line. 201:A hyphen is shown if the socket belongs to the kernel (e.g. a kernel service, 342:The reference count (i.e. attached processes via this socket). -.-. Wrong distance between sentences in the input file. Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions"). The best procedure is to always start a new sentence on a new line, at least, if you are typing on a computer. Remember coding: Only one command ("sentence") on each (logical) line. E-mail: Easier to quote exactly the relevant lines. Generally: Easier to edit the sentence. Patches: Less unaffected text. Search for two adjacent words is easier, when they belong to the same line, and the same phrase. The amount of space between sentences in the output can then be controlled with the ".ss" request. N.B. The number of lines affected can be too large to be in a patch. 122:Display the kernel routing tables. See the description in 139:Tell the user what is going on by being verbose. Especially print some 142:Do not truncate IP addresses by using output as wide as needed. This is 201:A hyphen is shown if the socket belongs to the kernel (e.g. a kernel service, 235:The state of the socket. Since there are no states in raw mode and usually no 236:states used in UDP and UDPLite, this column may be left blank. Normally this can be one 274:The remote end has shut down, and the socket is closed. Waiting for 305:TCP timer associated with this socket. The format is timer(a/b/c). 342:The reference count (i.e. attached processes via this socket). 352:processes are waiting for a connect request. The other flags are not 512:as it is viewed. This is unlikely to occur. 517:by Matt Welsh <m...@tc.cornell.edu>. It was updated by 519:<tqho...@bigfoot.com>. The man page and the command included -.-. Split lines longer than 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. Line 15, length 125 netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships Line 90, length 93 .RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp , bluetooth ", ... } ]" Line 220, length 88 Established: The count of bytes not copied by the user program connected to this socket. Line 224, length 88 Listening: Since Kernel 2.6.18 this column contains the maximum size of the syn backlog. Line 236, length 87 states used in UDP and UDPLite, this column may be left blank. Normally this can be one -.-. Use \(en (en-dash) for a dash between space characters, not a minus (\-) or a hyphen (-), except in the NAME section. netstat.8:383:Who ever knows what the future will bring us - just fill in here :-) -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". netstat.8:204:Show only listening sockets. (These are omitted by default.) netstat.8:210:Print routing information from the FIB. (This is the default.) netstat.8:216:.SS Active Internet connections \fR(TCP, UDP, UDPLite, raw)\fR netstat.8:342:The reference count (i.e. attached processes via this socket). -.-. Change a HYPHEN-MINUS (code 0x55, 2D) to a dash (\-, minus) if it matches "[[:alph:]]-[[:alpha:]]" in the name of an option). Facilitates the copy and paste of a) an option in UTF-8 text b) web addresses (URL). Is not needed in ordinary words like "mother-in-law", that are not copied and pasted to a command line (which needs ASCII code) 56:.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] -.-. Two or more space charaters between printable characters 33:.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] 43:.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] 52:.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] 112:prints information about the Linux networking subsystem. The type of 118:displays a list of open sockets. If you don't specify any 196:Display additional information. Use this option twice for maximum detail. 204:Show only listening sockets. (These are omitted by default.) 206:Show both listening and non-listening sockets. With the 210:Print routing information from the FIB. (This is the default.) 226:Address and port number of the local end of the socket. Unless the 279:The socket is listening for incoming connections. Such sockets are 300:causes this column to be included. You will also need 302:privileges to see this information on sockets you don't own. This 392:The socket is listening for a connection request. Such 521:<e...@linux.de>. UDPLite options were added by Brian Micek -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ": troff: backtrace: file '<stdin>':117 troff:<stdin>:117: warning: trailing space in the line troff: backtrace: file '<stdin>':122 troff:<stdin>:122: warning: trailing space in the line troff: backtrace: file '<stdin>':124 troff:<stdin>:124: warning: trailing space in the line troff: backtrace: file '<stdin>':126 troff:<stdin>:126: warning: trailing space in the line troff: backtrace: file '<stdin>':172 troff:<stdin>:172: warning: trailing space in the line troff: backtrace: file '<stdin>':218 troff:<stdin>:218: warning: trailing space in the line troff: backtrace: file '<stdin>':279 troff:<stdin>:279: warning: trailing space in the line troff: backtrace: file '<stdin>':280 troff:<stdin>:280: warning: trailing space in the line troff: backtrace: file '<stdin>':282 troff:<stdin>:282: warning: trailing space in the line troff: backtrace: file '<stdin>':297 troff:<stdin>:297: warning: trailing space in the line troff: backtrace: file '<stdin>':344 troff:<stdin>:344: warning: trailing space in the line troff: backtrace: file '<stdin>':346 troff:<stdin>:346: warning: trailing space in the line troff: backtrace: file '<stdin>':348 troff:<stdin>:348: warning: trailing space in the line troff: backtrace: file '<stdin>':350 troff:<stdin>:350: warning: trailing space in the line troff: backtrace: file '<stdin>':414 troff:<stdin>:414: warning: trailing space in the line troff: backtrace: file '<stdin>':438 troff:<stdin>:438: warning: trailing space in the line troff: backtrace: file '<stdin>':519 troff:<stdin>:519: warning: trailing space in the line troff: backtrace: file '<stdin>':520 troff:<stdin>:520: warning: trailing space in the line
--- netstat.8 2024-11-12 19:50:30.888563355 +0000 +++ netstat.8.new 2024-11-12 20:42:16.011526394 +0000 @@ -1,22 +1,23 @@ .\" -.\" netstat.8 +.\" netstat.8 .\" .\" Original: (m...@tc.cornell.edu & dc...@insu1.etec.uni-karlsruhe.de) .\" .\" Modified: bernd.eckenf...@inka.de -.\" Modified: Andi Kleen a...@muc.de -.\" Modified: Tuan Hoang tqho...@bigfoot.com +.\" Modified: Andi Kleen a...@muc.de +.\" Modified: Tuan Hoang tqho...@bigfoot.com .\" Modified: Brian Micek bmi...@gmail.com .\" .\" .TH NETSTAT 8 "2014\-10\-07" "net\-tools" "Linux System Administrator's Manual" .SH NAME -netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships +netstat \- Print network connections, routing tables, interface statistics, \ +masquerade connections, and multicast memberships .SH SYNOPSIS -.B netstat +.B netstat .RI [ address_family_options ] .RB [ \-\-tcp | \-t ] .RB [ \-\-udp | \-u ] @@ -30,17 +31,17 @@ netstat \- Print network connections, ro .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ] .RB [ \-\-symbolic | \-N ] -.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] +.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-timers | \-o ] .RB [ \-\-program | \-p ] .RB [ \-\-verbose | \-v ] .RB [ \-\-continuous | \-c] .RB [ \-\-wide | \-W ] .P -.B netstat +.B netstat .RB { \-\-route | \-r } .RI [ address_family_options ] -.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] +.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-verbose | \-v ] .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ] @@ -49,7 +50,7 @@ netstat \- Print network connections, ro .B netstat .RB { \-\-interfaces | \-i } .RB [ \-\-all | \-a ] -.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] +.RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-verbose | \-v ] .RB [ \-\-program | \-p ] .RB [ \-\-numeric | \-n ] @@ -70,32 +71,33 @@ netstat \- Print network connections, ro .RB [ \-\-continuous | \-c ] .P .B netstat -.RB { \-\-statistics | -s } +.RB { \-\-statistics | \-s } .RB [ \-\-tcp | \-t ] .RB [ \-\-udp | \-u ] .RB [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .RB [ \-\-raw | \-w ] .P -.B netstat +.B netstat .RB { \-\-version | \-V } .P -.B netstat +.B netstat .RB { \-\-help | \-h } .P .IR address_family_options : .PP -.RB [ -4 | \-\-inet ] -.RB [ -6 | \-\-inet6 ] -.RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp , bluetooth ", ... } ]" -.RB [ \-\-unix | \-x ] +.RB [ \-4 | \-\-inet ] +.RB [ \-6 | \-\-inet6 ] +.RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp , \ +bluetooth ", ... } ]" +.RB [ \-\-unix | \-x ] .RB [ \-\-inet | \-\-ip | \-\-tcpip ] .RB [ \-\-ax25 ] .RB [ \-\-x25 ] .RB [ \-\-rose ] .RB [ \-\-ash ] .RB [ \-\-bluetooth ] -.RB [ \-\-ipx ] +.RB [ \-\-ipx ] .RB [ \-\-netrom ] .RB [ \-\-ddp | \-\-appletalk ] .RB [ \-\-econet | \-\-ec ] @@ -103,28 +105,30 @@ netstat \- Print network connections, ro .SH NOTES This program is mostly obsolete. Replacement for \fBnetstat\fR is \fBss\fR. -Replacement for \fBnetstat -r\fR is \fBip route\fR. -Replacement for \fBnetstat -i\fR is \fBip -s link\fR. -Replacement for \fBnetstat -g\fR is \fBip maddr\fR. +Replacement for \fBnetstat \-r\fR is \fBip route\fR. +Replacement for \fBnetstat \-i\fR is \fBip \-s link\fR. +Replacement for \fBnetstat \-g\fR is \fBip maddr\fR. .SH DESCRIPTION .B Netstat -prints information about the Linux networking subsystem. The type of -information printed is controlled by the first argument, as follows: +prints information about the Linux networking subsystem. +The type of information printed is controlled by the first argument, +as follows: .SS (none) By default, -.B -netstat -displays a list of open sockets. If you don't specify any -address families, then the active sockets of all configured address +.B netstat +displays a list of open sockets. +If you don't specify any address families, +then the active sockets of all configured address families will be printed. .SS "\-\-route, \-r" -Display the kernel routing tables. See the description in -.BR route (8) -for details. -.B netstat -r -and -.B route -e +Display the kernel routing tables. +See the description in +.BR route (8) +for details. +.B netstat \-r +and +.B route \-e produce the same output. .SS "\-\-groups, \-g" Display multicast group membership information for IPv4 and IPv6. @@ -136,11 +140,12 @@ Display a list of masqueraded connection Display summary statistics for each protocol. .SH OPTIONS .SS "\-\-verbose, \-v" -Tell the user what is going on by being verbose. Especially print some -useful information about unconfigured address families. +Tell the user what is going on by being verbose. +Especially print some useful information about unconfigured address +families. .SS "\-\-wide, \-W" -Do not truncate IP addresses by using output as wide as needed. This is -optional for now to not break existing scripts. +Do not truncate IP addresses by using output as wide as needed. +This is optional for now to not break existing scripts. .SS "\-\-numeric, \-n" Show numerical addresses instead of trying to determine symbolic host, port or user names. @@ -157,22 +162,22 @@ port names. .SS "\-\-protocol=\fIfamily\fR, \fB\-A" Specifies the address families (perhaps better described as low level protocols) for which connections are to be shown. -.I family +.I family is a comma (',') separated list of address family keywords like -.BR inet , +.BR inet , .BR inet6 , -.BR unix , -.BR ipx , -.BR ax25 , +.BR unix , +.BR ipx , +.BR ax25 , .BR netrom , .BR econet , .BR ddp , and .BR bluetooth . -This has the same effect as using the -.BR \-\-inet | -4 , -.BR \-\-inet6 | -6 , -.BR \-\-unix | -x , +This has the same effect as using the +.BR \-\-inet | \-4 , +.BR \-\-inet6 | \-6 , +.BR \-\-unix | \-x , .BR \-\-ipx , .BR \-\-ax25 , .BR \-\-netrom , @@ -193,48 +198,59 @@ This will cause .B netstat to print the selected information every second continuously. .SS "\-e, \-\-extend" -Display additional information. Use this option twice for maximum detail. +Display additional information. +Use this option twice for maximum detail. .SS "\-o, \-\-timers" Include information related to networking timers. .SS "\-p, \-\-program" Show the PID and name of the program to which each socket belongs. -A hyphen is shown if the socket belongs to the kernel (e.g. a kernel service, +A hyphen is shown +if the socket belongs to the kernel +(e.g., a kernel service, or the process has exited but the socket hasn't finished closing yet). .SS "\-l, \-\-listening" -Show only listening sockets. (These are omitted by default.) +Show only listening sockets. +(These are omitted by default.) .SS "\-a, \-\-all" -Show both listening and non-listening sockets. With the +Show both listening and non-listening sockets. +With the .B \-\-interfaces option, show interfaces that are not up .SS "\-F" -Print routing information from the FIB. (This is the default.) +Print routing information from the FIB. +(This is the default.) .SS "\-C" Print routing information from the route cache. -.P +. .SH OUTPUT -.P -.SS Active Internet connections \fR(TCP, UDP, UDPLite, raw)\fR -.SS "Proto" -The protocol (tcp, udp, udpl, raw) used by the socket. +. +.SS Active Internet connections \fB(TCP, UDP, UDPLite, raw)\fR +.SS "Proto" +The protocol (tcp, udp, udpl, raw) used by the socket. .SS "Recv\-Q" -Established: The count of bytes not copied by the user program connected to this socket. +Established: The count of bytes not copied by the user program connected to +this socket. Listening: Since Kernel 2.6.18 this column contains the current syn backlog. .SS "Send\-Q" Established: The count of bytes not acknowledged by the remote host. -Listening: Since Kernel 2.6.18 this column contains the maximum size of the syn backlog. -.SS "Local Address" -Address and port number of the local end of the socket. Unless the +Listening: Since Kernel 2.6.18 this column contains the maximum size of the +syn backlog. +.SS "Local Address" +Address and port number of the local end of the socket. +Unless the .BR \-\-numeric " (" \-n ) -option is specified, the socket address is resolved to its canonical -host name (FQDN), and the port number is translated into the -corresponding service name. +option is specified, +the socket address is resolved to its canonical host name (FQDN), +and the port number is translated into the corresponding service name. .SS "Foreign Address" Address and port number of the remote end of the socket. Analogous to "Local Address". .SS "State" -The state of the socket. Since there are no states in raw mode and usually no -states used in UDP and UDPLite, this column may be left blank. Normally this can be one -of several values: +The state of the socket. +Since there are no states in raw mode and +usually no states used in UDP and UDPLite, +this column may be left blank. +Normally this can be one of several values: .TP .I ESTABLISHED @@ -271,15 +287,16 @@ The remote end has shut down, waiting fo .TP .I LAST_ACK -The remote end has shut down, and the socket is closed. Waiting for -acknowledgement. +The remote end has shut down, +and the socket is closed. +Waiting for acknowledgement. .TP .I LISTEN -The socket is listening for incoming connections. Such sockets are -not included in the output unless you specify the +The socket is listening for incoming connections. +Such sockets are not included in the output unless you specify the .BR \-\-listening " (" \-l ) -or +or .BR \-\-all " (" \-a ) option. .TP @@ -294,15 +311,17 @@ The state of the socket is unknown. .SS "User" The username or the user id (UID) of the owner of the socket. .SS "PID/Program name" -Slash-separated pair of the process id (PID) and process name of the +Slash-separated pair of the process id (PID) and process name of the process that owns the socket. .B \-\-program -causes this column to be included. You will also need +causes this column to be included. +You will also need .I superuser -privileges to see this information on sockets you don't own. This -identification information is not yet available for IPX sockets. +privileges to see this information on sockets you don't own. +This identification information is not yet available for IPX sockets. .SS "Timer" -TCP timer associated with this socket. The format is timer(a/b/c). +TCP timer associated with this socket. +The format is timer(a/b/c). The timer is one of the following values: .TP .I @@ -334,23 +353,24 @@ Number of retransmissions sent. .I c Number of keepalives sent. -.P +. .SS Active UNIX domain Sockets -.SS "Proto" +.SS "Proto" The protocol (usually unix) used by the socket. .SS "RefCnt" -The reference count (i.e. attached processes via this socket). +The reference count +(i.e., attached processes via this socket). .SS "Flags" -The flags displayed is SO_ACCEPTON (displayed as +The flags displayed is SO_ACCEPTON (displayed as .BR ACC ), -SO_WAITDATA +SO_WAITDATA .RB ( W ) -or SO_NOSPACE -.RB ( N ). -SO_ACCECPTON -is used on unconnected sockets if their corresponding -processes are waiting for a connect request. The other flags are not -of normal interest. +or SO_NOSPACE +.RB ( N ). +SO_ACCECPTON +is used on unconnected sockets +if their corresponding processes are waiting for a connect request. +The other flags are not of normal interest. .SS "Type" There are several types of socket access: .TP @@ -380,15 +400,15 @@ Raw interface access socket. .TP .I UNKNOWN -Who ever knows what the future will bring us - just fill in here :-) -.PP +Who ever knows what the future will bring us \(en just fill in here :-) +. .SS "State" This field will contain one of the following Keywords: .TP .I FREE The socket is not allocated .TP -.I LISTENING +.I LISTENING The socket is listening for a connection request. Such sockets are only included in the output if you specify the .BR \-\-listening " (" \-l ) @@ -411,94 +431,94 @@ The socket is not connected to another o .I UNKNOWN This state should never happen. .SS "PID/Program name" -Process ID (PID) and process name of the process that has the socket open. +Process ID (PID) and process name of the process that has the socket open. More info available in .B "Active Internet connections" section written above. .SS "Path" This is the path name as which the corresponding processes attached to the socket. -.P +. .SS Active IPX sockets (this needs to be done by somebody who knows it) -.P +. .SS Active NET/ROM sockets (this needs to be done by somebody who knows it) -.P +. .SS Active AX.25 sockets (this needs to be done by somebody who knows it) -.PP - +. +. .SH FILES .ta .I /etc/services --- The services translation file +\(en The services translation file .I /proc --- Mount point for the proc filesystem, which gives access to kernel +\(en Mount point for the proc filesystem, which gives access to kernel status information via the following files. .I /proc/net/dev --- device information +\(en device information .I /proc/net/raw --- raw socket information +\(en raw socket information .I /proc/net/tcp --- TCP socket information +\(en TCP socket information .I /proc/net/udp --- UDP socket information +\(en UDP socket information .I /proc/net/udplite --- UDPLite socket information +\(en UDPLite socket information .I /proc/net/igmp --- IGMP multicast information +\(en IGMP multicast information .I /proc/net/unix --- Unix domain socket information +\(en Unix domain socket information .I /proc/net/ipx --- IPX socket information +\(en IPX socket information .I /proc/net/ax25 --- AX25 socket information +\(en AX25 socket information .I /proc/net/appletalk --- DDP (appletalk) socket information +\(en DDP (appletalk) socket information .I /proc/net/nr --- NET/ROM socket information +\(en NET/ROM socket information .I /proc/net/route --- IP routing information +\(en IP routing information .I /proc/net/ax25_route --- AX25 routing information +\(en AX25 routing information .I /proc/net/ipx_route --- IPX routing information +\(en IPX routing information .I /proc/net/nr_nodes --- NET/ROM nodelist +\(en NET/ROM nodelist .I /proc/net/nr_neigh --- NET/ROM neighbours +\(en NET/ROM neighbours .I /proc/net/ip_masquerade --- masqueraded connections +\(en masqueraded connections .I /sys/kernel/debug/bluetooth/l2cap --- Bluetooth L2CAP information +\(en Bluetooth L2CAP information .I /sys/kernel/debug/bluetooth/rfcomm --- Bluetooth serial connections +\(en Bluetooth serial connections .I /proc/net/snmp --- statistics -.fi -.P +\(en statistics +. +. .SH SEE ALSO .BR route (8), .BR ifconfig (8), @@ -506,17 +526,19 @@ status information via the following fil .BR proc (5), .BR ss (8), .BR ip (8) -.P +. .SH BUGS -Occasionally strange information may appear if a socket changes -as it is viewed. This is unlikely to occur. -.P +Occasionally strange information may appear +if a socket changes as it is viewed. +This is unlikely to occur. +. .SH AUTHORS The netstat user interface was written by Fred Baumgarten -<dc...@insu1.etec.uni\-karlsruhe.de>, the man page basically -by Matt Welsh <m...@tc.cornell.edu>. It was updated by -Alan Cox <alan....@linux.org>, updated again by Tuan Hoang -<tqho...@bigfoot.com>. The man page and the command included -in the net\-tools package is totally rewritten by Bernd Eckenfels -<e...@linux.de>. UDPLite options were added by Brian Micek -<bmi...@gmail.com> +<dc...@insu1.etec.uni\-karlsruhe.de>, +the man page basically by Matt Welsh <m...@tc.cornell.edu>. +It was updated by Alan Cox <alan....@linux.org>, +updated again by Tuan Hoang <tqho...@bigfoot.com>. +The man page and the command included +in the net\-tools package is totally rewritten by Bernd Eckenfels +<e...@linux.de>. +UDPLite options were added by Brian Micek <bmi...@gmail.com>