summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
...
* Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPUae2013-07-092-5/+5
| | | | counters.
* Use new macros to implement ipstat and tcpstat using PCPU counters.ae2013-07-093-20/+16
| | | | Change interface of kread_counters() similar ot kread() in the netstat(1).
* Prepare network statistics structures for migration to PCPU counters.ae2013-07-093-125/+109
| | | | | | | | | | Use uint64_t as type for all fields of structures. Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat, in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat, pfkeystat, pim6stat, pimstat, rip6stat, udpstat. Discussed with: arch@
* Replace hardcoded numbers. Also use interface-local scope name insteadae2013-04-161-9/+9
| | | | of node-local.
* Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat fromglebius2013-04-103-29/+69
| | | | | | kernel core files. Sponsored by: Nginx, Inc.
* Merge from projects/counters: TCP/IP stats.glebius2013-04-081-124/+130
| | | | | | | | | Convert 'struct ipstat' and 'struct tcpstat' to counter(9). This speeds up IP forwarding at extreme packet rates, and makes accounting more precise. Sponsored by: Nginx, Inc.
* Add forgotten .Elmelifaro2013-03-091-0/+1
| | | | MFC with: r248112
* Document netstat -Q flags meaning.melifaro2013-03-091-1/+6
| | | | MFC after: 1 week
* WARNS=6 compliancecharnier2013-02-196-11/+10
|
* Use pluralies() for "entry"/"entries".glebius2013-01-221-1/+1
|
* Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel tohrs2012-11-171-0/+6
| | | | | | | | | | | | userland via routing socket or sysctl. This eliminates the following KAME-specific sin6_scope_id handling routine from each userland utility: sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); This behavior can be controlled by net.inet6.ip6.deembed_scopeid. This is set to 1 by default (sin6_scope_id will be filled in the kernel). Reviewed by: bz
* Show the number of times we block waiting for mbufs.alfred2012-10-251-4/+18
| | | | | | | | | | | | | | | | | | Machines can stall out because mbufs are low, however sometimes we won't see "requests denied", instead we see user land processes or kernel threads blocking waiting for mbufs because they set M_WAIT. These consumers do not see errors, only stalling. Unfortunately until now, netstat did not export this information so you could have experienced an mbuf shortage and have no way of seeing it unless you happen to run netstat at the exact time of the shortage and see "in use" = "max". By exporting the number of times processes are blocked, we can effectively see how often non-interrupt context threads are effectively "denied". MFC after: 2 weeks
* Remove unused variable. Newer versions of gcc care.eadler2012-10-221-2/+0
| | | | | | Submitted by: Sascha Wildner <saw@online.de> Approved by: cperciva MFC after: 3 days
* Merge the projects/pf/head branch, that was worked on for last six months,glebius2012-09-081-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into head. The most significant achievements in the new code: o Fine grained locking, thus much better performance. o Fixes to many problems in pf, that were specific to FreeBSD port. New code doesn't have that many ifdefs and much less OpenBSDisms, thus is more attractive to our developers. Those interested in details, can browse through SVN log of the projects/pf/head branch. And for reference, here is exact list of revisions merged: r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330, r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656, r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782, r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868, r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223, r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456, r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505, r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168, r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230, r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398, r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548, r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672, r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169, r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442, r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522, r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661, r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212. I'd like to thank people who participated in early testing: Tested by: Florian Smeets <flo freebsd.org> Tested by: Chekaluk Vitaly <artemrts ukr.net> Tested by: Ben Wilber <ben desync.com> Tested by: Ian FREISLICH <ianf cloudseed.co.za>
* Allow netstat to be build if INET is not defined in the kernel.tuexen2012-07-162-0/+8
| | | | | | | Thanks to Garrett Cooper for reporting the issue. MFC after: 3 days X-MFC: 238501
* - Updated TOE support in the kernel.np2012-06-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs. These are available as t3_tom and t4_tom modules that augment cxgb(4) and cxgbe(4) respectively. The cxgb/cxgbe drivers continue to work as usual with or without these extra features. - iWARP driver for Terminator 3 ASIC (kernel verbs). T4 iWARP in the works and will follow soon. Build-tested with make universe. 30s overview ============ What interfaces support TCP offload? Look for TOE4 and/or TOE6 in the capabilities of an interface: # ifconfig -m | grep TOE Enable/disable TCP offload on an interface (just like any other ifnet capability): # ifconfig cxgbe0 toe # ifconfig cxgbe0 -toe Which connections are offloaded? Look for toe4 and/or toe6 in the output of netstat and sockstat: # netstat -np tcp | grep toe # sockstat -46c | grep toe Reviewed by: bz, gnn Sponsored by: Chelsio communications. MFC after: ~3 months (after 9.1, and after ensuring MFC is feasible)
* Eliminate an unused parameter of static method igmp_stats_live_old().delphij2012-04-131-2/+2
| | | | MFC after: 1 month
* With pf 4.5 import the name of pfsync stats sysctl has changed, thusglebius2012-04-041-2/+2
| | | | 'netstat -sp pfsync' got broken. Fix this.
* After r232745, which makes sure __bswap16(), ntohs() and htons() returndim2012-03-091-3/+0
| | | | | | | | | | | | | __uint16_t, we can partially undo r228668. Note the remark "Work around a clang false positive with format string warnings and ntohs macros (see LLVM PR 11313)" was actually incorrect. Before r232745, on some arches, the ntohs() macros did in fact return int, not uint16_t, so clang was right in warning about the %hu format string. MFC after: 2 weeks
* Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, todim2012-02-281-3/+1
| | | | | | | | | | | | | | | | | | | | | get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp MFC after: 2 weeks
* Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:bz2012-02-171-13/+16
| | | | | | | | | | | | Extend the so far IPv4-only support for multiple routing tables (FIBs) introduced in r178888 to IPv6 providing feature parity. This includes an extended rtalloc(9) KPI for IPv6, the necessary adjustments to the network stack, and user land support as in netstat. Sponsored by: Cisco Systems, Inc. Reviewed by: melifaro (basically) MFC after: 10 days
* Don't print a warning when using netstat to printtuexen2012-01-251-1/+2
| | | | | | | SCTP statistics when there is not SCTP in the kernel. This problem was reported by Sean Mahood. MFC after: 1 week.
* In ng_socket(4) expose less kernel internals to userland. This commitglebius2012-01-231-8/+2
| | | | breaks ABI, but makes probability of ABI breakage in future less.
* Fix warning when compiling with gcc46:eadler2012-01-101-2/+0
| | | | | | | error: variable 'ifnetfound' set but not used Approved by: dim MFC after: 3 days
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-034-8/+8
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Spelling fixes for usr.bin/uqs2011-12-301-1/+1
|
* o Convert IPv6 read-only stats sysctls to the read-write ones.maxim2011-12-191-7/+13
| | | | | | | | | o Teach netstat(1) -z to reset these stats sysctls. PR: bin/153206 Reviewed by: glebuis Sponsored by: NGINX, Inc. MFC after: 1 month
* Revert r228650, and work around the clang false positive with printfdim2011-12-172-1/+6
| | | | | | | formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to the Makefile instead. MFC after: 1 week
* In usr.bin/netstat/atalk.c, work around a clang false positive withdim2011-12-171-1/+1
| | | | | | printf format warnings and conditional operators. MFC after: 1 week
* Fix the following bugs related to the SCTP support of netstat:tuexen2011-07-221-113/+204
| | | | | | | | | | | | * Correctly handle -a. * -A isn't supported. * Show all closed 1-to-1 and 1-to-many style sockets. * Show all listening 1-to-many style sockets. * Use consistent formatting for -W. PR: 150642 Approved by: re@ MFC after: 4 weeks.
* Truncate link addresses like it is done for anytuexen2011-07-121-1/+1
| | | | | | other address type. MFC after: 4 weeks
* Teach netstat(1) about the new global netisr policy sysctl,rwatson2011-05-241-12/+53
| | | | | | | | net.isr.dispatch, and about per-protocol dispatch policies. MFC after: 3 weeks Reviewed by: bz Sponsored by: Juniper Networks, Inc.
* Fixed sockets display somewhat (-L, -T, -x, -Lx, with and without -A).ru2011-03-261-45/+37
| | | | | | (I didn't try to fix negative TCP timers with -x.) MFC after: 3 days
* - Merge in OFED 1.5.3 from projects/ofed/headjeff2011-03-213-8/+28
|
* Fix typo.brucec2011-03-131-1/+1
|
* While printing out the WSID and CPU ID only the first time it appears forrwatson2011-01-241-8/+2
| | | | | | | | | | each workstream, rather than on every protocol, is prettier, it makes machine-parsing of netstat -Q output a lot harder. Repeat the information and hope that the user forgives us slightly dense formatting. MFC after: 3 days Reported by: bz Sponsored by: Juniper Networks
* Fix off-by-one whitespace error in netstat -Q workstream listing.rwatson2011-01-241-4/+4
| | | | | | Reported by: bz MFC after: 3 days Sponsored by: Juniper Networks
* - Hide the internal scope address representation of the KAME IPv6ume2011-01-203-22/+36
| | | | | | | | stack from the output of `netstat -ani'. - The node-local multicast address in the output of `netstat -rn' should be handled as well. Spotted by: Bernd Walter <ticso__at__cicely7.cicely.de>
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-1111-44/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Fix typo.brucec2010-11-271-1/+1
|
* Restore the (state) and \n printout when not using -T.gnn2010-11-221-2/+3
| | | | | Pointed out by: brucec@ MFC after: 3 weeks
* When netstat was run with -i/-I and -w1 to produce running counters, the idroprstone2010-11-181-0/+1
| | | | | | | field printed an absolute value rather than the delta from the last value Approved by: emaste (mentor) MFC after: 1 week
* Add new, per connection, statistics for TCP, including:gnn2010-11-174-18/+39
| | | | | | | | | | Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks
* Remove superfluous cast in usr.bin/netstat/sctp.c.dim2010-10-081-1/+1
| | | | | | Found by: clang Submitted by: Norberto Lopes, nlopes dot ml at gmail dot com Approved by: rpaulo (mentor)
* Show hostcache statistics.ru2010-10-051-0/+3
| | | | Submitted by: Maxim Dounin
* Remove more extraneous ;s.emaste2010-07-151-1/+1
|
* Now fix functionality of 'netstat -f netgraph' that hasn't workedglebius2010-03-121-3/+3
| | | | | | | | | | | | starting from netgraph import in 1999. netstat(8) used pointer to node as node address, oops. That didn't work, we need the node ID in brackets to successfully address a node. We can't look into ng_node, due to inability to include netgraph/netgraph.h in userland code. So let the node make a hint for a userland, storing the node ID in its private data. MFC after: 2 weeks
* Prefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' inrwatson2010-03-011-1/+1
| | | | | | | netstat -Q. MFC after: 6 days Sponsored by: Juniper Networks
* Teach netstat -Q to work with -N and -M by adding libkvm versions of datarwatson2010-03-013-26/+278
| | | | | | | | | query routines. This code is necessarily more fragile in the presence of kernel changes than querying the kernel via sysctl (the default), but useful when investigating crashes or live kernel state via firewire. MFC after: 1 week Sponsored by: Juniper Networks
* Update date on netstat(1) for -Q.rwatson2010-02-221-1/+1
| | | | | Suggested by: bz MFC after: 1 week
OpenPOWER on IntegriCloud