summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Widen struct sockbuf's sb_timeo member to int from short. Withjdp2002-07-247-9/+9
| | | | | | | | | | | | | non-default but reasonable values of hz this member overflowed, breaking NFS over UDP. Also, as long as I'm plowing up struct sockbuf ... Change certain members from u_long/long to u_int/int in order to reduce wasted space on 64-bit machines. This change was requested by Andrew Gallatin. Netstat and systat need to be rebuilt. I am incrementing __FreeBSD_version in case any ports need to change.
* Add the tcps_sndrexmitbad statistic, keep track of late acks that causeddillon2002-07-191-0/+2
| | | | unnecessary retransmissions.
* Fix incorrect cast.kbyanc2002-07-161-1/+1
|
* fixed typo.suz2002-07-031-2/+2
| | | | | obtained from: KAME MFC after: 3 days
* Use calculated column widths for the routing table display when -W iskbyanc2002-06-051-55/+208
| | | | | | | | | supplied rather than arbitrarily larger widths. This (almost) guarantees that no columns will be truncated (routing table additions between the width calculation and display passes may create a row with column widths larger than those calculated). Sponsored by: NTT Multimedia Communications Labs
* Use %lu instead of %ld when printing rt_use (aka rt_rmx.rmx_pksent)silby2002-05-311-1/+1
| | | | | Submitted by: Andre Oppermann <oppermann@pipeline.ch> MFC after: 5 days
* Cast to kill warnings. De-register.markm2002-04-281-3/+3
|
* fix warnings; change variable/argument names that mask global names.markm2002-04-281-4/+4
|
* Remove GCC-specific flags and commented out cruft.markm2002-04-281-3/+0
|
* Some easy const fixes.markm2002-04-281-3/+3
|
* Print IFT_ETHER addresses with ether_ntoa(3) (with leading zeros).ru2002-04-061-13/+6
|
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-1/+1
| | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF.
* - Make ip_rtaddr() global, and use it to look up the correct sourceru2001-11-301-0/+5
| | | | | | | | | address in icmp_reflect(). - Two new "struct icmpstat" members: icps_badaddr and icps_noroute. PR: kern/31575 Obtained from: BSD/OS MFC after: 1 week
* Add syncache statistics to netstat.jlemon2001-11-221-0/+16
|
* Fix typo.murray2001-10-231-1/+1
| | | | | PR: docs/31388 Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>
* Print statistics for AF_IPX.mdodd2001-10-191-0/+2
| | | | Note that the IPX code doesn't update these correctly yet, but should.
* Fixed bugs from revision 1.27. Specifically:ru2001-10-111-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Restore the ability to look up network names in the networks(5) database by passing getnetbyaddr(3) shifted network numbers, but without duplicating the old bug that was fixed in 1.27 (we now only shift netnums with standard netmasks). For example: Before: $ netstat -r [...] 127.0.1/24 localhost UGSc 0 0 lo0 127.0.2/24 localhost UGSc 0 0 lo0 After: $ netstat -r [...] subnet1/24 localhost UGSc 0 0 lo0 subnet2/24 localhost UGSc 0 0 lo0 - Only try to lookup with the forged netmask if the mask was not explicitly specified, like it was before 1.27. For example: Before: $ netstat -r net-44.ampr.org/25 localhost UGSc 0 0 lo0 net-44.ampr.org/25 localhost UGSc 0 0 lo0 After: 44.108.2/25 localhost UGSc 0 0 lo0 44.108.2.128/25 localhost UGSc 0 0 lo0 - Make sure to null-terminate the resulting string. MFC after: 1 week
* The previous change also disaligned lines with AF_IPX and AF_NSru2001-10-091-10/+10
| | | | | addresses. Unshrink "Network" width to the previous value, and make sure everything is aligned again.
* Minor output formatting for 'netstat -i':mdodd2001-10-091-7/+7
| | | | | - Right align Mtu - Print AF_INET family with correct field width.
* Re-enable mbtypes statistics in the mbuf allocator. I disabled thesebmilekic2001-09-301-45/+31
| | | | | | | | | | | | | | | | | when I changed the allocator bits. This implements per-CPU mbtypes stats by keeping net number of decrements/increments of a given mbtype per-CPU and then summing all of the per-CPU mbtypes to produce the total net number of allocated mbufs of the given mbtype. Counters are carefully balanced to avoid/prevent underflows/overflows. mbtypes stats are re-enabled with the idea that we may occasionally (although very rarely) observe slight inconsistencies in the stat reporting. Most of the time, we should be fine, though. Also make appropriate modifications to netstat(1) and systat(1) to do the necessary reporting. Submitted by: Jiangyi Liu <jyliu@163.net>
* Implement the ``-f address_family'' filter for -i.ru2001-09-113-3/+14
| | | | Prodded by: Igor Podlesny <poige@morning.ru>
* Update usage() to match reality.ru2001-09-111-5/+12
|
* Yay!ru2001-09-071-236/+262
| | | | Make this manpage readable and match the reality.
* If -s -s is specified, don't show zero multicast routing statistics.ru2001-09-072-66/+48
|
* Deprecate the -l option in favour of more natural -W.ru2001-09-075-15/+11
| | | | | | | | The compatibility glue is still provided. (This change is not yet reflected in the manpage, nor in usage(). This will be fixed at a later time today, with the general manpage cleanup commit.)
* Don't print stray socket addresses (-A) with the listen queue display (-L).ru2001-09-071-23/+20
| | | | Also, print socket's protocol with the -L.
* SECURITY: Drop `setgid kmem' bit as early as possible.ru2001-08-311-0/+1
|
* -a is not an options (sic).dd2001-08-281-1/+1
|
* Mention what an asterisk means in the -i display.dd2001-08-281-0/+4
| | | | | PR: 30069 Submitted by: andrew@ugh.net.au
* Don't misuse the return from snprintf.brian2001-08-201-5/+7
| | | | MFC after: 2 weeks
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-1/+0
|
* Add a "X KBytes of wired memory reserved" metric that representsbmilekic2001-07-311-11/+14
| | | | | | | | | approximately the amount of memory allocated from the mbuf maps and sitting in the mbuf allocator's cache containers, and display in parantheses the percentage of said memory that is actually in use at the given time `netstat -m' is executed. Suggested by: mjacob
* - Do not handle the per-CPU containers in mbuf code as though the cpuidsbmilekic2001-07-261-11/+7
| | | | | | | | | | | | | | | | | were indices in a dense array. The cpuids are a sparse set and treat them as such, setting up containers only for CPUs activated during mb_init(). - Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse map, in accordance with the above. This allows us to properly boot with certain CPUs disactivated. However, if we later decide to re-activate said CPUs, we will barf until we decide to implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU containers to get configured on their activation. Reported by: mjacob Partially (sys/ diffs) Submitted by: mjacob
* Use sysctl to export multicast routing statsfenner2001-07-251-5/+13
|
* Remove whitespace at EOL.dd2001-07-151-13/+13
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-1/+1
|
* Make `rttrash' variable (#routes not in table but not freed) visibleru2001-06-293-5/+17
| | | | through ``netstat -rs''.
* Fixed bogon in revision 1.37. Don't bogusly print a radix node'sru2001-06-291-8/+3
| | | | | | | duped key marker (``=>'') for routes with non-positive rmx_expire metric, such as ethernet interface routes. MFC after: 1 week
* - create an entry of IPV6CTL_STATS sysctl.ume2001-06-282-9/+23
| | | | | | | | | - fix the problem that netstat doesn't show raw6 and icmp6 pcblist. - make netstat use sysctl to retreive stats of ipv6 and icmpv6 instead of kread. Obtained from: KAME MFC after: 1 week
* Add netstat(1) knob to reset net.inet.{ip|icmp|tcp|udp|igmp}.stats.ru2001-06-234-13/+37
| | | | | | For example, ``netstat -s -p ip -z'' will show and reset IP stats. PR: bin/17338
* - Fix space allocation for mbstat structurebmilekic2001-06-231-3/+5
| | | | | - Make sure to try hw.ncpu if kern.smp.cpus doesn't exist (i.e. on UP) to get number of CPUs.
* Honor -s -s (don't show zero stats) with -r, untangle SYNOPSIS further.ru2001-06-232-12/+25
| | | | (usage() still is not synchronized with SYNOPSIS, intentionally.)
* Introduce numerous SMP friendly changes to the mbuf allocator. Namely,bmilekic2001-06-223-67/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a modified allocation mechanism for mbufs and mbuf clusters; one which can scale under SMP and which offers the possibility of resource reclamation to be implemented in the future. Notable advantages: o Reduce contention for SMP by offering per-CPU pools and locks. o Better use of data cache due to per-CPU pools. o Much less code cache pollution due to excessively large allocation macros. o Framework for `grouping' objects from same page together so as to be able to possibly free wired-down pages back to the system if they are no longer needed by the network stacks. Additional things changed with this addition: - Moved some mbuf specific declarations and initializations from sys/conf/param.c into mbuf-specific code where they belong. - m_getclr() has been renamed to m_get_clrd() because the old name is really confusing. m_getclr() HAS been preserved though and is defined to the new name. No tree sweep has been done "to change the interface," as the old name will continue to be supported and is not depracated. The change was merely done because m_getclr() sounds too much like "m_get a cluster." - TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and systat(1) (see TODO below). - Fixed systat(1) to display number of "free mbufs" based on new per-CPU stat structures. - Fixed netstat(1) to display new per-CPU stats based on sysctl-exported per-CPU stat structures. All infos are fetched via sysctl. TODO (in order of priority): - Re-enable mbtypes statistics in both netstat(1) and systat(1) after introducing an SMP friendly way to collect the mbtypes stats under the already introduced per-CPU locks (i.e. hopefully don't use atomic() - it seems too costly for a mere stat update, especially when other locks are already present). - Optionally have systat(1) display not only "total free mbufs" but also "total free mbufs per CPU pool." - Fix minor length-fetching issues in netstat(1) related to recently re-enabled option to read mbuf stats from a core file. - Move reference counters at least for mbuf clusters into an unused portion of the cluster itself, to save space and need to allocate a counter. - Look into introducing resource freeing possibly from a kproc. Reviewed by (in parts): jlemon, jake, silby, terry Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha) Preliminary performance measurements: jlemon (and me, obviously) URL: http://people.freebsd.org/~bmilekic/mb_alloc/
* - Avoid hardcoded constant on icmp6 in/out histogram printingsumikawa2001-06-211-4/+8
| | | | | | | - Icmp6 histogram update for inverse neighbor solicit/advert. Obtained from: KAME MFC after: 2 weeks
* remove warningsassar2001-06-1513-93/+67
| | | | | remove superfluous declarations make things more consistent
* remove K&R supportassar2001-06-1515-338/+201
|
* revert removal of warning and K&R supportassar2001-06-1516-138/+294
| | | | Requested by: bde
* nflag -> numeric_port. nflag is no moreassar2001-06-151-1/+1
|
* Print symbolic names for appletalk ports. Also some very minor style 9 issues.imp2001-06-151-2/+15
| | | | | PR: bin/4157 Submitted by: Denny Gentry <denny1@home.com>
OpenPOWER on IntegriCloud