aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat
Commit message (Collapse)AuthorAgeFilesLines
* Fix an overflow when calculating the number of kilobytes from thePaul Saab2005-02-211-1/+1
| | | | | | | | | number of pages. Obtained from: Yahoo! Notes: svn path=/head/; revision=142175
* simply ignore unknown address family.Hajimu UMEMOTO2005-02-191-3/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=142095
* teach IPv6 to `systat -netstat'.Hajimu UMEMOTO2005-02-191-29/+122
| | | | | | | | Tested by: kuriyama MFC after: 1 week Notes: svn path=/head/; revision=142093
* Sort sections.Ruslan Ermilov2005-01-181-11/+11
| | | | Notes: svn path=/head/; revision=140420
* Consistently use __inline instead of __inline__ as the former is an empty macroStefan Farfeleder2004-07-041-1/+1
| | | | | | | in <sys/cdefs.h> for compilers without support for inline. Notes: svn path=/head/; revision=131575
* Deal with double whitespace.Ruslan Ermilov2004-07-031-6/+6
| | | | Notes: svn path=/head/; revision=131507
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-40/+79
| | | | Notes: svn path=/head/; revision=131491
* Removed trailing whitespace.Ruslan Ermilov2004-07-021-1/+1
| | | | Notes: svn path=/head/; revision=131472
* Bring in mbuma to replace mballoc.Bosko Milekic2004-05-311-41/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=129906
* Include <sys/proc.h> for the definition of PS_INMEM instead ofBruce Evans2004-04-141-3/+2
| | | | | | | | | depending on namespace pollution in <sys/user.h>. Reduced nearby include messes. Notes: svn path=/head/; revision=128230
* Fix the easy warnings:David Malone2004-03-096-40/+27
| | | | | | | | | | | | 1) Avoid shadowing index. 2) Constness. 3) Missing prototype for ifcmd. 4) Missing include of string.h. 5) Avoid shadowing error function. 6) ANSI definition for main. Notes: svn path=/head/; revision=126775
* Demangled vendor ids. Fixed misplaced FreeBSD id.Bruce Evans2004-02-251-6/+9
| | | | Notes: svn path=/head/; revision=126229
* Backed out rev.1.6. A bogus include was added to work around breakage ofBruce Evans2004-02-251-2/+0
| | | | | | | | | <netinet/tcp_var.h>'s prerequisites. Prerequistes should not grow for userland headers, and <netinet/tcp_var.h> is unfortunately still needed in userland. Notes: svn path=/head/; revision=126227
* Put libdevstat before libkvm, because the former depends on the latter.Ruslan Ermilov2004-02-041-2/+2
| | | | Notes: svn path=/head/; revision=125431
* Make systat -net aware of compressed time_wait sockets.Mike Silbersack2003-12-241-3/+11
| | | | Notes: svn path=/head/; revision=123800
* Copy cur's snap_time to last when refreshing statistics. Fixes problemTim J. Robbins2003-11-011-0/+2
| | | | | | | | | | | where MB/s and tps statistics would always be zero, presumably because they were being averaged out over the time between now and when the system booted instead of a few seconds. PR: 58683 Notes: svn path=/head/; revision=121836
* Use 'k' as suffix for KiloPoul-Henning Kamp2003-10-241-1/+1
| | | | | | | Pointed out by: several. Notes: svn path=/head/; revision=121485
* When a numeric field overflows its width, try formatting the number inPoul-Henning Kamp2003-10-202-6/+5
| | | | | | | | 'kilo' or 'mega' with appropriate suffix instead of filling the field with stars. Notes: svn path=/head/; revision=121291
* Add ip6 and icmp6 displays to systat.David Malone2003-08-017-1/+632
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=118318
* Let libdevstat calculate the device-busy % instead of home-rolling.Poul-Henning Kamp2003-04-091-13/+5
| | | | Notes: svn path=/head/; revision=113282
* Run a revision of the devstat interface:Poul-Henning Kamp2003-03-152-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel: Change statistics to use the *uptime() timescale (ie: relative to boottime) rather than the UTC aligned timescale. This makes the device statistics code oblivious to clock steps. Change timestamps to bintime format, they are cheaper. Remove the "busy_count", and replace it with two counter fields: "start_count" and "end_count", which are updated in the down and up paths respectively. This removes the locking constraint on devstat. Add a timestamp argument to devstat_start_transaction(), this will normally be a timestamp set by the *_bio() function in bp->bio_t0. Use this field to calculate duration of I/O operations. Add two timestamp arguments to devstat_end_transaction(), one is the current time, a NULL pointer means "take timestamp yourself", the other is the timestamp of when this transaction started (see above). Change calculation of busy_time to operate on "the salami principle": Only when we are idle, which we can determine by the start+end counts being identical, do we update the "busy_from" field in the down path. In the up path we accumulate the timeslice in busy_time and update busy_from. Change the byte_* and num_* fields into two arrays: bytes[] and operations[]. Userland: Change the misleading "busy_time" name to be called "snap_time" and make the time long double since that is what most users need anyway, fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same timescale as the kernel fields. Change devstat_compute_etime() to operate on struct bintime. Remove the version 2 legacy interface: the change to bintime makes compatibility far too expensive. Fix a bug in systat's "vm" page where boot relative busy times would be bogus. Bump __FreeBSD_version to 500107 Review & Collaboration by: ken Notes: svn path=/head/; revision=112288
* mdoc(7) police: Scheduled sweep.Ruslan Ermilov2003-02-241-2/+1
| | | | Notes: svn path=/head/; revision=111447
* Add #include <sys/resource.h>Poul-Henning Kamp2003-02-163-0/+3
| | | | Notes: svn path=/head/; revision=111007
* Remove #include <sys/dkstat.h>Poul-Henning Kamp2003-02-164-4/+0
| | | | Notes: svn path=/head/; revision=111002
* Make 'sysctl vm.vmtotal' work properly using updated patch from Hiten.Matthew Dillon2003-01-111-1/+1
| | | | | | | | | | (the patch in the PR was stale). PR: kern/5689 Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=109097
* Add "ifstat" display:Poul-Henning Kamp2003-01-048-2/+785
| | | | | | | | | | | | | | | | | | ifstat Display the network traffic going through active interfaces on the system. Idle interfaces will not be displayed until they receive some traffic. For each interface being displayed, the current, peak and total statistics are displayed for incoming and outgoing traffic. By default, the ifstat display will automatically scale the units being used so that they are in a human-read- able format. The scaling units used for the current and peak traffic columns can be altered by the scale command. Submitted by: Trent Nelson <trent@arpa.com> Notes: svn path=/head/; revision=108684
* When we close a display, mark it as not-initialized so that we willPoul-Henning Kamp2003-01-041-0/+1
| | | | | | | | | properly open it again next time. Submitted by: Trent Nelson <trent@arpa.com> Notes: svn path=/head/; revision=108683
* Back out rev 1.20; getbsize(3)'s original interface has been restored.Mike Barcroft2002-12-301-3/+1
| | | | | | | Approved by: markm Notes: svn path=/head/; revision=108454
* english(4) police.Jens Schweikhardt2002-12-271-2/+2
| | | | Notes: svn path=/head/; revision=108317
* Adjust for getbsize argument type change.Mark Murray2002-10-231-1/+3
| | | | Notes: svn path=/head/; revision=105812
* Remove unneeded function prototypes.Mark Murray2002-10-231-3/+0
| | | | Notes: svn path=/head/; revision=105807
* Widen struct sockbuf's sb_timeo member to int from short. WithJohn Polstra2002-07-241-4/+4
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=100591
* ^Z suspends any and all programs that don't do anything special aboutGiorgos Keramidas2002-07-151-3/+0
| | | | | | | | | it. There's really no reason to explicitly mention it here. Suggested by: Mark Valentine <mark@thuvia.demon.co.uk> Notes: svn path=/head/; revision=100025
* ^Z doesn't "stop" systat, but it "suspends" it.Giorgos Keramidas2002-07-151-1/+1
| | | | | | | | PR: docs/40489 Submitted by: Dave McCammon <davemac11@yahoo.com> Notes: svn path=/head/; revision=100010
* debug.{numvnodes,freevnodes} moved to vfs.Dag-Erling Smørgrav2002-06-061-2/+2
| | | | Notes: svn path=/head/; revision=97970
* Replace /kernel with /boot/kernel/kernel.Josef Karthauser2002-05-091-2/+2
| | | | | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org> Notes: svn path=/head/; revision=96247
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95124
* Remove previously unneeded and now incorrect cast of user_from_uid()David Malone2002-04-131-7/+7
| | | | | | | | to a char *. Fix up vendor ID. Notes: svn path=/head/; revision=94610
* unifdef __STDC__Warner Losh2002-03-231-16/+1
| | | | Notes: svn path=/head/; revision=93058
* remove __PWarner Losh2002-03-227-111/+111
| | | | Notes: svn path=/head/; revision=92922
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.Mark Murray2002-02-081-1/+0
| | | | Notes: svn path=/head/; revision=90416
* WARNS=2 fixes with NO_WERROR set, as there are some header issuesMark Murray2001-12-1222-404/+437
| | | | | | | with namelists. use __FBSDID(). Notes: svn path=/head/; revision=87715
* Remove the 'irq' string from the irqN part of the "interrupts" display.Mark Murray2001-12-011-2/+10
| | | | | | | This allows us to see the irq number when device names ate too long. Notes: svn path=/head/; revision=87172
* Add #include <net/route.h> in order to get this to compile.Jonathan Lemon2001-11-221-0/+2
| | | | | | | | Spotted by: David Wolfskill Forgotten by: me Notes: svn path=/head/; revision=86784
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-101-1/+0
| | | | Notes: svn path=/head/; revision=84768
* Remove greatly outdated comment that systat(1) takes 2-10% of the CPU time.Maxim Sobolev2001-10-091-1/+0
| | | | | | | This isn't true nowadays. Notes: svn path=/head/; revision=84722
* Re-enable mbtypes statistics in the mbuf allocator. I disabled theseBosko Milekic2001-09-301-32/+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> Notes: svn path=/head/; revision=84153
* Convert systat(1) to use the new devstat interface.Kenneth D. Merry2001-09-063-53/+46
| | | | | | | Submitted by: "Sergey A. Osokin" <osa@freebsd.org.ru> Notes: svn path=/head/; revision=83131
* - Do not handle the per-CPU containers in mbuf code as though the cpuidsBosko Milekic2001-07-261-8/+5
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=80399
* Remove whitespace at EOL.Dima Dorfman2001-07-151-8/+8
| | | | Notes: svn path=/head/; revision=79755