summaryrefslogtreecommitdiffstats
path: root/usr.bin/top
Commit message (Collapse)AuthorAgeFilesLines
* This patch merges the sort fields for both pages, so you can (foralfred2004-08-161-37/+57
| | | | | | | | example) view io stats while sorting by process size. Also adds voluntary and involuntary context-switch stats to the io page because there was lots of room. Submitted by: Dan Nelson dnelson at allantgroup.com
* Comment some of the 'io' functions.alfred2004-08-011-0/+29
|
* Adjust the show_self code (the test got inadvertantly reversed a couple ofdes2004-07-121-3/+3
| | | | | | revisions ago) Submitted by: Alex Vasylenko <lxv@omut.org>
* Cache a pointer to the old proc (as well as negative cache) to makealfred2004-07-121-2/+13
| | | | | | computing the io statistics over and over not as expensive. This is a bit of a cop out, as I should just allocate a struct with the computed values, but this will do for now.
* Build upon the nice work of Alfred and add sorting capabilities tokeramida2004-07-081-3/+77
| | | | | | the -m "io" mode of top. Approved by: alfred
* Additional preemptive unsigned -> signed casts.des2004-07-051-4/+4
|
* ki_pctcpu is unsigned, so we cast to long before subtracting.des2004-07-051-1/+1
|
* Unhealthy amount of manual code cleanup. Some long lines still remain.des2004-07-051-187/+143
|
* Apply consistent indentation. Long lines will be fixed in a separatedes2004-07-051-544/+543
| | | | commit.
* Protoize.des2004-07-051-45/+19
|
* Sort out the #include mess. In particular, do not #include "os.h", sincedes2004-07-051-18/+10
| | | | all it does is provide broken prototypes for standard library functions.
* Mechanical whitespace cleanup.des2004-07-051-26/+25
|
* My previous commit fixed uid filtering, but broke io mode. Unravel thedes2004-07-051-35/+49
| | | | process filtering logic to prevent this from happening again.
* Fix selecting processes by uid, which was broken in the previous commit.des2004-07-051-1/+1
|
* Tell what percentage of the total IO a process is doing.alfred2004-07-011-5/+37
| | | | TODO: Show system totals.
* New feature, provide a display that shows the amount of IO processesalfred2004-07-011-3/+140
| | | | | | are doing. Toggle this mode by hitting "m" or passing the command line option "-m io" to top(1). This allows one to identify disk bandwidth hogs much easier.
* style, remove register.alfred2004-06-301-87/+69
|
* Do not use KERN_PROC_PROC with kvm_getproc(3); instead, if only processgreen2004-06-061-4/+17
| | | | | | | | | | | (and not thread) scope is to be displayed, use KERN_PROC_ALL and accrue CPU% ourselves, as the kernel makes no attempt to do so. Of course, this doesn't make most stats any less bogus when displaying threaded processes, but at least the CPU time is added up and not just always 0.00%. There are still issues with SCHED_ULE in top(1) that cause other processes to display 0.00% CPU when they in fact have used more.
* Changes to allow top to decide whether or not to show multiple threads perjulian2003-07-172-1/+7
| | | | | | | process. Option -H enables it and it is toggled at the interactive screen by 'H'. Submitted by: Jung-uk Kim <jkim@niksun.com>
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Catch up to SMTX -> SLOCK changes.jhb2002-10-021-5/+5
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* remove __Pimp2002-03-221-4/+4
|
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.markm2002-02-081-2/+0
|
* Add new option HAVE_STRERROR to CFLAGS.dwmalone2002-01-241-1/+1
|
* Protect this against the coming WARNS=2 default.markm2001-12-121-0/+2
|
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-101-1/+0
|
* Generate top.local.h and manpage dynamically, with sed(1) script.ru2001-07-122-72/+16
| | | | | | The generated manpage will now describe the actual behavior of top(1) WRT how many processes it displays. This also eliminates all troff(1) warnings.
* Cast size_t variables before printing them to cope with the case oftmm2001-05-311-2/+2
| | | | sizeof(size_t) != sizeof(int).
* We don't need to include <sys/conf.h>phk2001-05-231-1/+0
|
* Compensate for header dethreading.markm2001-05-011-0/+1
|
* Check the new kern.smp.active sysctl rather than the non-existentjhb2001-04-271-1/+1
| | | | smp.smp_active sysctl to determine if we are running on an SMP machine.
* Correct the top memory stats display: convert page counts to kB.tmm2001-03-201-0/+5
| | | | | | Submitted by: Andrea Campi <andrea@webcom.it> Approved by: rwatson Pointy hat to: myself
* Fix top(1) display for SMP systems where the username is longer than 14will2001-03-121-1/+3
| | | | | | | | characters. This should avoid unattractive wrapping for people who are stuck in an 80x24 screen. :-) PR: 22270 Submitted by: William Carrel <williamc@go2net.com>
* - An array of 4 32-bit ints for avenrun doesn't work on the alpha becausegallatin2001-02-271-15/+7
| | | | | | | | | | fscale is a (64-bit) long. So just use a struct loadavg. This fixes the recent failure of top on alphas: top: sysctl(vm.loadavg...) failed: Cannot allocate memory - use size_t for sizeof() so as to fix a few int/long warnings on alpha Reviewed by: Thomas Moestl <tmoestl@gmx.net>
* Remove directive to install top as group kmem. Remove directive torwatson2001-02-231-2/+1
| | | | install top with setgid bit.
* Adapt the top utility to not use kmem_read to retrieve variables nowrwatson2001-02-231-167/+44
| | | | | | | | available via sysctl(). As a result, top should now be able to run without setgid kmem. Submitted by: Thomas Moestl <tmoestl@gmx.net> Reviewed by: freebsd-audit
* Adjust columns for wide nicenesses in 'top -S'.markm2001-02-181-4/+4
|
* Catch up to new priority interface.jake2001-02-121-6/+6
|
* Catch up to proc flag change.jhb2001-01-241-1/+1
|
* Change the proc information returned from the kernel so that itmckusick2000-12-121-47/+43
| | | | | | | | | | | | 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.
* Make use of the full screen width to display p_comm rather than assuming ajhb2000-11-291-3/+6
| | | | hardcoded screen width of 80 chars.
* Display the name of the mutex we are blocked on in the state field. Tojhb2000-11-291-0/+6
| | | | | | | differentiate mutex names from wait channel names, prefix mutex names with an asterisk. Submitted by: Dan Nelson <dnelson@emsphone.com>
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-071-3/+3
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Reduce max length of user names to 15 characters to reflect reality.davidn1999-11-171-2/+2
| | | | | This also prevents the line-wrap and messed up display that occurs when there happens to be one or more names with 15 chars.
* Fixed sorting on time. On i386's, time differences of more than 2147bde1999-11-171-9/+9
| | | | | | | | | | | | seconds caused overflow. Use a type-safe but slightly slower comparison. Comparisons for other fields are still fragile. Fixed rounding of cputime (don't do extra work to get it slightly wrong by first converting without rounding to milliseconds). Removed dead code for setting cputime. Fixed comments about cputime.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Man pages for top refer to only 2.x, but not to 3.x and latern_hibma1999-06-142-4/+4
|
* Tidy up references to <sys/rlist.h> and support for the old swap managementpeter1999-05-111-2/+1
| | | | that went away in January.
* Fix the display of the "nice" value of processes like ntpd that use thejhay1999-04-221-2/+2
| | | | | | posix sched_setscheduler() to set their priority. Noticed by: Mark Allwright <mallwri@orion.didata.co.za>
OpenPOWER on IntegriCloud