aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat
Commit message (Collapse)AuthorAgeFilesLines
* 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
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79535
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).Ruslan Ermilov2001-07-061-3/+3
| | | | Notes: svn path=/head/; revision=79366
* Make sure to try hw.ncpu if kern.smp.cpus doesn't exist (i.e. on UP) whenBosko Milekic2001-06-231-1/+2
| | | | | | | getting number of CPUs. Notes: svn path=/head/; revision=78664
* Introduce numerous SMP friendly changes to the mbuf allocator. Namely,Bosko Milekic2001-06-221-22/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/ Notes: svn path=/head/; revision=78592
* Replace a use of the hw.nintr sysctl as it has just gone away, castThomas Moestl2001-06-013-6/+11
| | | | | | | | size_t variables when passing them to a printf-like function, and some minor cleanups. Notes: svn path=/head/; revision=77583
* Display -tcp w/o load average so that all statistics fits on a 80x25 screen.Ruslan Ermilov2001-05-312-3/+3
| | | | Notes: svn path=/head/; revision=77515
* Show TCP checksum failures with -tcp display.Ruslan Ermilov2001-05-311-0/+3
| | | | | | | | PR: bin/27786 Submitted by: Brooks Davis <brooks@one-eyed-alien.net> Notes: svn path=/head/; revision=77514
* Mark error() as __printflike() and fix a non-exploitable format stringKris Kennaway2001-05-252-2/+2
| | | | | | | | | error. MFC after: 1 week Notes: svn path=/head/; revision=77206
* Fix the error buffer passed to kvm_openfiles to have a length ofThomas Moestl2001-05-251-2/+4
| | | | | | | | | | _POSIX2_LINE_MAX as required. While being there, wrap an overly long line. MFC after: 3 days Notes: svn path=/head/; revision=77205
* Removed -I${.CURDIR}/.../sys from CFLAGS.Ruslan Ermilov2001-05-181-1/+0
| | | | Notes: svn path=/head/; revision=76812
* Compensate for header dethreading.Mark Murray2001-05-011-0/+1
| | | | Notes: svn path=/head/; revision=76169
* numdirtybuffers is an int, not a long.Andrew Gallatin2001-03-291-1/+1
| | | | Notes: svn path=/head/; revision=74978
* Get rid of setgid kmem for systat, and while being there, fix some bugsThomas Moestl2001-03-2310-151/+397
| | | | | | | | | | | | | | and compiler warnings. The data for network statistics are still obtained via the kvm interface if systat was started with the needed privileges, otherwise sysctls are used. The reason for this is that with really many open sockets, the sysctl method is probably slower, but it systat -netstat is probably not really usable in either mode under these conditions. Approved by: rwatson Notes: svn path=/head/; revision=74671
* Don't attempt to parse %cAndrey A. Chernov2001-03-211-2/+7
| | | | Notes: svn path=/head/; revision=74595
* Count and show incoming UDP datagrams with no checksum.Ruslan Ermilov2001-03-131-18/+20
| | | | Notes: svn path=/head/; revision=74209
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-2/+8
| | | | Notes: svn path=/head/; revision=71895
* Catch up to new proc flags.John Baldwin2001-01-241-1/+1
| | | | Notes: svn path=/head/; revision=71588
* My bad, committed the submitted patch rather than the fixed patch.Poul-Henning Kamp2000-12-301-2/+3
| | | | Notes: svn path=/head/; revision=70526
* Use macro API to <sys/queue.h>Poul-Henning Kamp2000-12-301-31/+16
| | | | | | | | Submitted by: "Jason" <jsmethers@pdq.net> Reviewed by: phk Notes: svn path=/head/; revision=70523
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-191-1/+1
| | | | Notes: svn path=/head/; revision=70197
* o Fix up includes which built due to excessive nested including in theRobert Watson2000-12-171-6/+5
| | | | | | | | | | | | base system, but not in BruceBSD. o Fix up style violations of various sorts. o Remove redundant normalization of hertz variable, as the sysctl handler does this work (unlike when kread was used). Submitted by: bde Notes: svn path=/head/; revision=70118
* Change the proc information returned from the kernel so that itKirk McKusick2000-12-121-10/+6
| | | | | | | | | | | | | | | no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced. Notes: svn path=/head/; revision=69896
* Correct int/long type mismatch in the proper place this time. freevnodesAndrew Gallatin2000-12-021-2/+2
| | | | | | | | | | | | | | and numvnodes are longs in the kernel. They should remain longs in systat, what really needs to change is that they should be using SYSCTL_LONG rather than SYSCTL_INT. I also changed wantfreevnodes to SYSCTL_LONG because I happened to notice it. I wish there was a way to find all of these automatically.. Pointed out by: bde Notes: svn path=/head/; revision=69529
* fix another int/long type mismatch. This one was causing pigs toAndrew Gallatin2000-12-011-1/+1
| | | | | | | die with an fpe on alpha because fscale wasn't properly initted Notes: svn path=/head/; revision=69493
* fix int/long type mismatches found on alphaAndrew Gallatin2000-12-011-4/+4
| | | | Notes: svn path=/head/; revision=69492
* o Make systat/vmstat.c use sysctl() to retrieve cp_time, bufspace,Robert Watson2000-11-251-29/+50
| | | | | | | | | | | | | maxvnodes, numvnodes, freevnodes, nchstats, and numdirtybuffers. o Make the hw.ncpu error checking code a little more rigorous by sanity checking the returned data size. o Didn't fix machine-dependent non-sysctl-exported variables: intrnames, eintrnames, intrcnt, eintrcnt, as these variables are defined and exported from machine-dependent kernel code in assembly. This should probably be fixed somehow. Notes: svn path=/head/; revision=69143
* o make systat/pigs.c use syctl() to retrieve cp_time, fscale, and ccpuRobert Watson2000-11-251-27/+32
| | | | | | | instead of using kmem. Notes: svn path=/head/; revision=69142
* o Make systat/iostat.c use sysctl() to retrieve cp_time instead ofRobert Watson2000-11-251-23/+9
| | | | | | | kmem. Notes: svn path=/head/; revision=69141
* o Make systat use sysctl() to retrieve hz and stathz, instead ofRobert Watson2000-11-251-19/+14
| | | | | | | using kmem. Notes: svn path=/head/; revision=69140
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-3/+3
| | | | Notes: svn path=/head/; revision=68963
* Remove obsolete /dev/drum referencesChris D. Faulhaber2000-10-291-2/+1
| | | | | | | Reviewed by: alex, asmodai, billf Notes: svn path=/head/; revision=67870
* Remove unneded -ltermcapAndrey A. Chernov2000-09-161-2/+3
| | | | Notes: svn path=/head/; revision=65910
* Quick Fix: swap.c doesn't appear to actually need <sys/conf.h>, so removePeter Wemm2000-08-241-1/+0
| | | | | | | | it to try and get world building again. (sys/conf.h now depends on sys/types.h) Notes: svn path=/head/; revision=65062
* Fix systat to use the kern.ipc.mbtypes sysctl instead of referencing aAlfred Perlstein2000-07-151-34/+44
| | | | | | | | | | | | structure member that doesn't exist anymore. Use getsysctlbyname for kern.ipc.mbstat instead of sysctl. Use netstat's method of displaying values from mtnames. Submitted by: Ian Dowse <iedowse@maths.tcd.ie> Missed by PR: 19809 Notes: svn path=/head/; revision=63226
* Duh! get the scaling right.Poul-Henning Kamp2000-06-011-3/+3
| | | | Notes: svn path=/head/; revision=61148
* Rescale the IOstat bars, modern disks are faster than old disks.Poul-Henning Kamp2000-06-011-2/+2
| | | | Notes: svn path=/head/; revision=61147
* Don't include <sys/buf.h>Poul-Henning Kamp2000-05-053-3/+0
| | | | Notes: svn path=/head/; revision=60049
* #include <errno.h> where needed. Kill extern int errno;.Warner Losh2000-04-141-1/+1
| | | | | | | Minor warnings in tip corrected. Notes: svn path=/head/; revision=59217
* Remove more single-space hard sentence breaks.Sheldon Hearn2000-03-021-1/+2
| | | | Notes: svn path=/head/; revision=57695
* s/curses/ncurses/Nik Clayton2000-03-011-1/+1
| | | | | | | | PR: docs/17061 Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de> Notes: svn path=/head/; revision=57665