aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/top
Commit message (Collapse)AuthorAgeFilesLines
* Changes to allow top to decide whether or not to show multiple threads perJulian Elischer2003-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> Notes: svn path=/head/; revision=117709
* Remove #include <sys/dkstat.h>Poul-Henning Kamp2003-02-161-1/+0
| | | | Notes: svn path=/head/; revision=111002
* Catch up to SMTX -> SLOCK changes.John Baldwin2002-10-021-5/+5
| | | | Notes: svn path=/head/; revision=104388
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-251-1/+1
| | | | Notes: svn path=/head/; revision=102412
* remove __PWarner Losh2002-03-221-4/+4
| | | | Notes: svn path=/head/; revision=92922
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.Mark Murray2002-02-081-2/+0
| | | | Notes: svn path=/head/; revision=90416
* Add new option HAVE_STRERROR to CFLAGS.David Malone2002-01-241-1/+1
| | | | Notes: svn path=/head/; revision=89759
* Protect this against the coming WARNS=2 default.Mark Murray2001-12-121-0/+2
| | | | Notes: svn path=/head/; revision=87713
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-101-1/+0
| | | | Notes: svn path=/head/; revision=84768
* Generate top.local.h and manpage dynamically, with sed(1) script.Ruslan Ermilov2001-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. Notes: svn path=/head/; revision=79636
* Cast size_t variables before printing them to cope with the case ofThomas Moestl2001-05-311-2/+2
| | | | | | | sizeof(size_t) != sizeof(int). Notes: svn path=/head/; revision=77553
* We don't need to include <sys/conf.h>Poul-Henning Kamp2001-05-231-1/+0
| | | | Notes: svn path=/head/; revision=77098
* Compensate for header dethreading.Mark Murray2001-05-011-0/+1
| | | | Notes: svn path=/head/; revision=76169
* Check the new kern.smp.active sysctl rather than the non-existentJohn Baldwin2001-04-271-1/+1
| | | | | | | smp.smp_active sysctl to determine if we are running on an SMP machine. Notes: svn path=/head/; revision=76079
* Correct the top memory stats display: convert page counts to kB.Thomas Moestl2001-03-201-0/+5
| | | | | | | | | Submitted by: Andrea Campi <andrea@webcom.it> Approved by: rwatson Pointy hat to: myself Notes: svn path=/head/; revision=74524
* Fix top(1) display for SMP systems where the username is longer than 14Will Andrews2001-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> Notes: svn path=/head/; revision=74142
* - An array of 4 32-bit ints for avenrun doesn't work on the alpha becauseAndrew Gallatin2001-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> Notes: svn path=/head/; revision=73164
* Remove directive to install top as group kmem. Remove directive toRobert Watson2001-02-231-2/+1
| | | | | | | install top with setgid bit. Notes: svn path=/head/; revision=72952
* Adapt the top utility to not use kmem_read to retrieve variables nowRobert Watson2001-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 Notes: svn path=/head/; revision=72951
* Adjust columns for wide nicenesses in 'top -S'.Mark Murray2001-02-181-4/+4
| | | | Notes: svn path=/head/; revision=72647
* Catch up to new priority interface.Jake Burkholder2001-02-121-6/+6
| | | | Notes: svn path=/head/; revision=72377
* Catch up to proc flag change.John Baldwin2001-01-241-1/+1
| | | | Notes: svn path=/head/; revision=71589
* Change the proc information returned from the kernel so that itKirk McKusick2000-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. Notes: svn path=/head/; revision=69896
* Make use of the full screen width to display p_comm rather than assuming aJohn Baldwin2000-11-291-3/+6
| | | | | | | hardcoded screen width of 80 chars. Notes: svn path=/head/; revision=69375
* Display the name of the mutex we are blocked on in the state field. ToJohn Baldwin2000-11-291-0/+6
| | | | | | | | | | differentiate mutex names from wait channel names, prefix mutex names with an asterisk. Submitted by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=69370
* Major update to the way synchronization is done in the kernel. HighlightsJason Evans2000-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 Notes: svn path=/head/; revision=65557
* Reduce max length of user names to 15 characters to reflect reality.David Nugent1999-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. Notes: svn path=/head/; revision=53281
* Fixed sorting on time. On i386's, time differences of more than 2147Bruce Evans1999-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. Notes: svn path=/head/; revision=53255
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Man pages for top refer to only 2.x, but not to 3.x and laterNick Hibma1999-06-142-4/+4
| | | | Notes: svn path=/head/; revision=47901
* Tidy up references to <sys/rlist.h> and support for the old swap managementPeter Wemm1999-05-111-2/+1
| | | | | | | that went away in January. Notes: svn path=/head/; revision=47018
* Fix the display of the "nice" value of processes like ntpd that use theJohn Hay1999-04-221-2/+2
| | | | | | | | | posix sched_setscheduler() to set their priority. Noticed by: Mark Allwright <mallwri@orion.didata.co.za> Notes: svn path=/head/; revision=45936
* Oops, the test for "no-cpu" was inverted.Bruce Evans1999-03-071-2/+2
| | | | | | | Submitted by: Seigo TANIMURA <tanimura@naklab.dnj.ynu.ac.jp> Notes: svn path=/head/; revision=44543
* The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpuBruce Evans1999-03-051-2/+2
| | | | | | | | | numbers as chars or use bogus casts in an attempt to unmisrepresnt them. In top, don't assume that 0xff is the only negative cpu number when cpu numbers are (mis)represented. Notes: svn path=/head/; revision=44487
* Don't dump core when p_stat is not in the expected range. This isBill Fenner1999-02-061-3/+9
| | | | | | | | | only likely to happen when you have a kernel<>userland mismatch, but it's really annoying when top dumps core and leaves the terminal in a mangled state; it's much nicer to print nicely formatted gibberish. Notes: svn path=/head/; revision=43720
* Make 'top' handle case w/ new swapper where no swap is configuredMatthew Dillon1999-02-061-2/+2
| | | | Notes: svn path=/head/; revision=43697
* Make top use new kvm_getswapinfo() call.Matthew Dillon1999-01-221-144/+19
| | | | Notes: svn path=/head/; revision=43053
* uptime display more in style with original codeDavid E. O'Brien1999-01-091-1/+19
| | | | Notes: svn path=/head/; revision=42447
* Removed unused nlist'ed variables stathz and hz. These used to be usedBruce Evans1998-11-261-26/+13
| | | | | | | | | | | to half compensate for broken scaling of p_pctcpu in the kernel, but the previous commit removed this compensation. %cpu values will be wrong by a factor of stathz/hz until the kernel is fixed. (The kernel gets it wrong by a factor of stathz/hz, and top got the compensation wrong by a factor of 100/stathz.) Notes: svn path=/head/; revision=41358
* Port top to the alpha.Doug Rabson1998-11-251-4/+4
| | | | | | | Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> Notes: svn path=/head/; revision=41325
* Some fixes for swap space accounting.Dmitrij Tejblum1998-09-111-2/+7
| | | | | | | Obtained from: pstat.c Notes: svn path=/head/; revision=39075
* Merge from stable: support for the o, order, commandWolfram Schneider1998-08-122-30/+178
| | | | Notes: svn path=/head/; revision=38278
* Add -t option ('t' in interactive mode) to make top(1) ignore itself.Dag-Erling Smørgrav1998-08-041-1/+4
| | | | | | | | | | | Attempts to contact the author of top(1) (William LeFebvre) have so far been unsuccessful. PR: 7253 Submitted by: Yours Truly Notes: svn path=/head/; revision=38090
* Round - not cut - the real cpu time.Wolfram Schneider1998-07-271-2/+3
| | | | Notes: svn path=/head/; revision=37885
* Make value of SIZE accurate.Dmitrij Tejblum1998-06-211-3/+3
| | | | | | | Obtained from: ps(1) Notes: svn path=/head/; revision=37100
* Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.Poul-Henning Kamp1998-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde Notes: svn path=/head/; revision=36441
* Fix top sorting of idle processes. top used p_cpticks as a tie-breakerPeter Wemm1998-02-141-3/+3
| | | | | | | | | | but that isn't suitable (it gets zeroed each second apparently). PR: bin/4957 Submitted-by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=33341
* For SMP, add a space between the state name and the CPU#.Steve Passe1997-10-051-3/+3
| | | | | | | Everything following bumps right 1 character. Notes: svn path=/head/; revision=30130
* YAMF22: (rev 1.3.2.2) Display realtime and idle priorities appropriately.Peter Wemm1997-09-281-2/+14
| | | | Notes: svn path=/head/; revision=29904
* Adapt to recent smp tree changes..Peter Wemm1997-08-271-2/+3
| | | | Notes: svn path=/head/; revision=28819