summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* Print link level address on vlan interfaces using ether_ntoa(), to makeglebius2004-07-281-0/+1
| | | | | | | | | | output on bare ethernet and vlan interfaces the same. PR: bin/69674 Submitted by: Pawel Malachowski <pawmal-posting@freebsd.lublin.pl> Reviewed by: ru Approved by: julian (mentor) MFC after: 1 week
* Use the length modifier 'll' instead of 'q' to print long longs.stefanf2004-07-281-6/+6
|
* Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).charnier2004-07-2614-78/+82
| | | | | Use warnx() instead of warn() when error message is not of any interest. Add prototypes.
* Add SACK statistics to netstat.ps2004-06-291-0/+10
|
* Make netstat(1) more closely follow documented behaviour. If a TCPbms2004-06-161-1/+2
| | | | | | | | | | | socket in LISTEN state happens to be bound to an interface, it will show up in netstat(1) output even without the -a switch. As the definition of "sockets used by server processes" is a difficult one to qualify with regards to UDP, do not change the output behaviour for UDP sockets. PR: bin/26359
* Add missing dot and newline in a message.fjoe2004-06-021-1/+1
| | | | | Submitted by: Igor Sysoev <is (at) rambler-co.ru> MFC after: 3 days
* Bring in mbuma to replace mballoc.bmilekic2004-05-314-200/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mbuma is an Mbuf & Cluster allocator built on top of a number of extensions to the UMA framework, all included herein. Extensions to UMA worth noting: - Better layering between slab <-> zone caches; introduce Keg structure which splits off slab cache away from the zone structure and allows multiple zones to be stacked on top of a single Keg (single type of slab cache); perhaps we should look into defining a subset API on top of the Keg for special use by malloc(9), for example. - UMA_ZONE_REFCNT zones can now be added, and reference counters automagically allocated for them within the end of the associated slab structures. uma_find_refcnt() does a kextract to fetch the slab struct reference from the underlying page, and lookup the corresponding refcnt. mbuma things worth noting: - integrates mbuf & cluster allocations with extended UMA and provides caches for commonly-allocated items; defines several zones (two primary, one secondary) and two kegs. - change up certain code paths that always used to do: m_get() + m_clget() to instead just use m_getcl() and try to take advantage of the newly defined secondary Packet zone. - netstat(1) and systat(1) quickly hacked up to do basic stat reporting but additional stats work needs to be done once some other details within UMA have been taken care of and it becomes clearer to how stats will work within the modified framework. From the user perspective, one implication is that the NMBCLUSTERS compile-time option is no longer used. The maximum number of clusters is still capped off according to maxusers, but it can be made unlimited by setting the kern.ipc.nmbclusters boot-time tunable to zero. Work should be done to write an appropriate sysctl handler allowing dynamic tuning of kern.ipc.nmbclusters at runtime. Additional things worth noting/known issues (READ): - One report of 'ips' (ServeRAID) driver acting really slow in conjunction with mbuma. Need more data. Latest report is that ips is equally sucking with and without mbuma. - Giant leak in NFS code sometimes occurs, can't reproduce but currently analyzing; brueffer is able to reproduce but THIS IS NOT an mbuma-specific problem and currently occurs even WITHOUT mbuma. - Issues in network locking: there is at least one code path in the rip code where one or more locks are acquired and we end up in m_prepend() with M_WAITOK, which causes WITNESS to whine from within UMA. Current temporary solution: force all UMA allocations to be M_NOWAIT from within UMA for now to avoid deadlocks unless WITNESS is defined and we can determine with certainty that we're not holding any locks when we're M_WAITOK. - I've seen at least one weird socketbuffer empty-but- mbuf-still-attached panic. I don't believe this to be related to mbuma but please keep your eyes open, turn on debugging, and capture crash dumps. This change removes more code than it adds. A paper is available detailing the change and considering various performance issues, it was presented at BSDCan2004: http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf Please read the paper for Future Work and implementation details, as well as credits. Testing and Debugging: rwatson, brueffer, Ketrien I. Saihr-Kesenchedra, ... Reviewed by: Lots of people (for different parts)
* Bumped document date.ru2004-05-191-2/+2
| | | | Fixed the grammar nit.
* Output style nit.ru2004-05-121-1/+1
|
* Add the bad reset statistic (corresponds to tcp_input.c rev 1.235)silby2004-04-261-0/+1
|
* Replace ROUNDUP/ADVANCE with SA_SIZEluigi2004-04-131-7/+1
|
* Show link-level multicast packet counters with the -a option.ru2004-04-121-2/+14
|
* Fixed alignment of multicast addresses when printing that gotru2004-04-121-2/+4
| | | | broken in previous revision.
* Sort SRCS in Makefile and document -g option additions.bms2004-03-252-2/+3
| | | | Nudged by: ru
* Output style: Get rid of an unnecessary newline.bms2004-03-251-1/+0
|
* Teach netstat(1) how to print the multicast group memberships presentbms2004-03-254-2/+154
| | | | | | within the running system. Sponsored by: Ralf the Wonder Llama
* More cleanups:ru2004-03-181-20/+20
| | | | | | | | - 0 should have been -1 in previous commit (just to stay consistent), - Spell null pointers as NULL, not 0, - Fixed the comment about pr_usesysctl to not confuse it with boolean. Pointed by: bde
* NULL -> 0.ru2004-03-171-1/+1
|
* Do not print a warning about net.inet.pim.stats if errno isdes2004-03-121-1/+2
| | | | | | | ENOENT, because that means we do not have PIM in the kernel. Submitted by: hmp MFC after: 1 week
* Fixed misspellings of 0 as NULL.bde2004-03-111-3/+3
|
* printed statistics about source address selection rules.ume2004-02-051-0/+25
| | | | Obtained from: KAME
* stops program if kvm_read fails.ume2004-02-051-2/+3
| | | | Obtained from: KAME
* - support hmac-ripemd160.ume2004-02-051-1/+10
| | | | | | - support AES XCBC MAC/AES counter mode. Obtained from: KAME
* print stats on SPD cache lookups.ume2004-02-051-0/+5
| | | | Obtained from: KAME
* - %d is 12 chars, not 10. use NI_MAX* where appropriate.ume2004-02-051-67/+52
| | | | | | | | - goodbye RC5. - use %llu directly. - KNF. Obtained from: KAME
* Use floating point instead of unsigned long longs in percentagebde2003-12-291-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | calculations. Long longs should never be used, since they break compiling with C90 compilers and don't necessarily work any better than longs for avoiding overflow. Print percentages with another digit of precision since they can be small and this is easy to do now that the format is floating point. Restored some more of the old -m output: Print the percentage of allocated memory that is in use. This is the amount of memory in active mbufs and mbuf clusters relative to the total amount of memory soft-allocated for mbufs and mbuf clusters. Print the percentage of allocated memory that is wired (cached). The old mbuf allocator never freed memory so printing this value wasn't useful. A previous version of netstat for the new allocator printed the in-use amount as a percentage of the wired amount. Fixed some nearby style bugs (excessive parenthesization and a redundant return). Reviewed by: alfred
* Fixed missing declaration of pluralies(). This showed up as strangebde2003-12-292-0/+3
| | | | | | | | | printf format warnings for inet6.c (pluralies() was implicit int, but the context requires a "char *"). Added WARNS?=2 to the Makefile so that such errors don't come back. Added NO_WERROR?= to the Makefile because I haven't checked that setting WARNS doesn't uncover more bugs except on i386's.
* Fixed style bugs created in rev.1.27 by removing "__P(" and its closing ")"bde2003-12-291-75/+75
| | | | without removing the space before it.
* Teach netstat about the new sendfile statistics.silby2003-12-281-0/+4
|
* Clean up the style of the previous commit, and fix a fewsilby2003-12-271-7/+5
| | | | | | type mismatches as well. Suggested by: bde
* Teach netstat to read and display the new sfbuf statistics.silby2003-12-271-0/+12
|
* Fix percentages by using long long to hold values for 'space',alfred2003-12-261-9/+12
| | | | | | | | | | overflow was breaking a bunch of the stats, specifically the percentage displayed for wired memory. Fix the output for current/peak/max lines, I forgot to output the types. 161/320/51200 (current/peak/max): -to- 639/25696/51200 mbufs in use (current/peak/max):
* I asked Bosko Milekic for help with 'peak' reporting, and he suggestedalfred2003-12-231-2/+2
| | | | | | | | using the old 'cached' value but reporting it as 'cached'. I've decided to report the 'cached' as 'peak', why? Well because it is the peak, the peak of what is actually allocated. 'cached' doesn't make sense to me as a user.
* Restore old netstat -m output.alfred2003-12-234-31/+76
| | | | A new flag '-c' can be used to ask for the cache stats.
* Fix some minor nits in netstat whereby large interface names would bebms2003-11-283-7/+25
| | | | | | | | | truncated. In environments where many tunnel or vlan interfaces are created, interface names have high numbers which overflow the field width. PRs: bin/52349, bin/35838 Submitted by: Mike Tancsa, Scot W. Hetzel Approved by: re (rwatson)
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-312-19/+8
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Print the correct ICMP statistics for "no return routes".ru2003-10-231-1/+1
|
* remove unneeded include of route.hsam2003-10-031-0/+1
| | | | Supported by: FreeBSD Foundation
* 1. Add support for printing PIM-related statistics withhsu2003-08-075-1/+136
| | | | | | | | | netstat -s -p pim 2. Print information about the bandwidth meters installed in the kernel with netstat -g Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* * Use sysctlbyname(3) to print statistics about the MFC andhsu2003-08-051-6/+24
| | | | | | | | | | | | | | multicast VIF tables. This change is needed for consistency with the rest of the netstat/mroute.c implementation, and because in some cases "netstat -g" may fail to report the multicast forwarding information (e.g., if we run a multicast router on PicoBSD). * Remove "DVMRP" from the head comment of file netstat/mroute.c, because the printed multicast-related statistics are not DVMRP-specific anymore. Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* Revert last delta.ru2003-05-211-10/+3
| | | | | | | | The -l option is deprecated (hence undocumented in usage() and SYNOPSIS), as was threatened in the commitlog accompanying rev. 1.10 of main.c. Approved by: re (blanket)
* Make the mb_alloc low-watermark sysctl-tunable read-only and makebmilekic2003-05-151-0/+4
| | | | | | | | netstat(1) not display it for now because its effects are not yet completely implemented and we're about to cut 5.2-RELEASE. This is temporary. Approved by: re (scottl, rwatson)
* Back out support for RFC3514.mdodd2003-04-021-1/+0
| | | | RFC3514 poses an unacceptale risk to compliant systems.
* Implement support for RFC 3514 (The Security Flag in the IPv4 Header).mdodd2003-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt) This fulfills the host requirements for userland support by way of the setsockopt() IP_EVIL_INTENT message. There are three sysctl tunables provided to govern system behavior. net.inet.ip.rfc3514: Enables support for rfc3514. As this is an Informational RFC and support is not yet widespread this option is disabled by default. net.inet.ip.hear_no_evil If set the host will discard all received evil packets. net.inet.ip.speak_no_evil If set the host will discard all transmitted evil packets. The IP statistics counter 'ips_evil' (available via 'netstat') provides information on the number of 'evil' packets recieved. For reference, the '-E' option to 'ping' has been provided to demonstrate and test the implementation.
* Document the undcumnt -l option (that's a lowercase `el').keramida2003-03-261-3/+10
| | | | | PR: 48466 Submitted by: Peter Philipp <dot.bomb@freenet.de>
* Kill #ifdef NS and some leftover #ifdef ISO code. Re-pack the nlist[]peter2003-03-056-1397/+34
| | | | array, it isn't likely to find any ARPAnet IMP drivers in FreeBSD.
* o Allow "buckets" in mb_alloc to be differently sized (according tobmilekic2003-02-203-41/+64
| | | | | | | | | | | | | | | | compile-time constants). That is, a "bucket" now is not necessarily a page-worth of mbufs or clusters, but it is MBUF_BUCK_SZ, CLUS_BUCK_SZ worth of mbufs, clusters. o Rename {mbuf,clust}_limit to {mbuf,clust}_hiwm and introduce {mbuf,clust}_lowm, which currently has no effect but will be used to set the low watermarks. o Fix netstat so that it can deal with the differently-sized buckets and teach it about the low watermarks too. o Make sure the per-cpu stats for an absent CPU has mb_active set to 0, explicitly. o Get rid of the allocate refcounts from mbuf map mess. Instead, just malloc() the refcounts in one shot from mbuf_init() o Clean up / update comments in subr_mbuf.c
* - Determine the size of buffers with sizeof() instead of usingrobert2003-02-101-7/+7
| | | | | plain magic numbers - one of them was apparently wrong but unharmful. - Remove empty line.
* o Typo/Grammar fixesmtm2003-01-143-10/+18
| | | | | | | | o Added mini-function to correctly handle singular/plural of words ending in 'ly' Approved by: markm (mentor) Not objected to by: -audit
* Warns cleanups for netstat:dwmalone2002-09-0515-195/+194
| | | | | | | | | | | 1) Include arpa/inet.h for ntohs. 2) Constness fixes. 3) Fix shadowing except for "sin" which shouldn't be in scope. 4) Remove register keyword. 5) Add missing initialsers to user defined structs. 5) Make prototype of netname6 globally visable. 6) Use right macros for printing syncache stats (even though entrie isn't a word).
OpenPOWER on IntegriCloud