summaryrefslogtreecommitdiffstats
path: root/contrib/top/top.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r265249,r265250,r265251:bdrewery2014-05-171-6/+57
| | | | | | | - Add -J command/flag to filter by jail name/jid. This will automatically display the JID as well (the -j command/flag). - Add a hint for 'u' and 'J' command that '+' displays all. - Add J command to help.
* Add a new line to top that provides a brief summary of the ZFS ARC memoryjhb2012-06-271-0/+6
| | | | | | | | | | usage on hosts using ZFS. The new line displays the total amount of RAM used by the ARC along with the size of MFU, MRU, anonymous (in flight), headers, and other (miscellaneous) sub-categories. The line is not displayed on systems that are not using ZFS. Reviewed by: avg, fs@ MFC after: 3 days
* In batch mode, exit after receiving SIGINT, instead of immediatekib2012-03-071-0/+4
| | | | | | | output of the next display. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
* Fix a race in top non-interactive mode. Use plain sleep(3) call insteadkib2012-02-271-15/+1
| | | | | | | | of arming timer and then pausing. If SIGALRM is delivered before pause(3) is entered, top hangs. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
* Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'jhb2011-07-181-1/+1
| | | | | | | | | | | | to the maximum number of CPUs to ensure that lcpustates[] array is always allocated to the maximum size. Previously, if top was started without per-CPU stats it would allocate a smaller lcpustates[] array. When per-CPU stats were then enabled, it would overflow the array and trash the cpustates_columns[] array causing the CPU stats to be printed in the wrong locations. Approved by: re (kib) MFC after: 1 week
* Tweak the interactive description of CPU vs WCPU.jhb2011-07-181-2/+2
| | | | | | PR: bin/158819 Submitted by: arundel Approved by: re (kib)
* Add a leading space to the status messages output after toggling thejhb2011-07-111-2/+2
| | | | | | | | | | 'C' and 'H' flags at runtime. This matches messages output for other toggles which leave the first column in the message blank to hold the cursor. PR: bin/158775 Submitted by: arundel MFC after: 3 days
* Allow per-CPU statistics to be toggled at runtime via the 'P' key.jhb2011-07-111-4/+15
| | | | | | | While here, make -P a toggle similar to other options such as -I. Reviewed by: arundel MFC after: 1 week
* Add a new option to toggle the display of the system idle process (per-CPUjhb2011-05-311-6/+18
| | | | | | | | | | | idle threads). The process is displayed by default (subject to whether or not system processes are displayed) to preserve existing behavior. The system idle process can be hidden via the '-z' command line argument or the 'z' key while top is running. When it is hidden, top more closely matches the behavior of FreeBSD <= 4.x where idle time was not accounted to any process. MFC after: 2 weeks
* Removed the no-op -p; documented -P.ru2008-06-211-6/+2
| | | | MFC after: 3 days
* Add a -P flag to display per-cpu cpu usage stats.peter2008-01-181-1/+10
|
* Improve -u (limit uid lookups) behavior.obrien2008-01-091-1/+1
| | | | | Submitted by: David Frascone <dave@frascone.com> PR: 119490
* - s/jail id/jail ID/, acronyms should be in uppercase in general. Also,rafan2007-05-041-1/+1
| | | | | | | it is written this way in jail(8). Suggested by: brueffer Approved by: delphij (mentor, implicit)
* - Add new 'a' and 'j' options into usagerafan2007-04-191-1/+1
| | | | | Approved by: delphij (mentor, implicit) Forgotten by: stas ('a') and rafan ('j')
* - Add a new 'j' switch and runtime option to toggle display jail id forrafan2007-04-171-4/+19
| | | | | | | | | | each process. - While I'm here, keep help message sorted by keys PR: 98489, 98975 Submitted by: clsung Approved by: delphij (mentor) MFC after: 2 weeks
* - Add new 'a' switch and runtime option that allows 'top' to display processstas2007-04-141-5/+16
| | | | | | | | | titles extracted from argv vector instead of the real executable names. This is useful when you want to watch applications that set their status information via setproctitle(3). Approved by: alfred MFC after: 2 weeks
* Re-add option -C to usage().ru2006-04-191-1/+1
|
* Bring SYNOPSIS in line with usage().ru2006-04-181-3/+4
|
* Merge the CPU and WCPU columns in a single %6.2f column, add a new 'C'keramida2005-05-181-7/+22
| | | | | | | | | | | command that toggles between the two and update the ORDER_PCTCPU() macro to sort correctly by the visible "cpu" value. This saves 6 more columns in 80-column terminals, making things a lot better for the COMMAND column. Tested on: i386, sparc64 (panther), amd64 (sledge) Approved by: davidxu (in principle)
* - Add a THR column to the process listing, that shows the number ofkeramida2005-04-141-3/+5
| | | | | | | | | threads a process has. The THR column is disabled and disappears when 'H' is hit, because then every thread gets its own output line. - Allow sorting processes by "threads". Approved by: davidxu Inspired by: Jiawei Ye <leafy7382@gmail.com>
* This patch merges the sort fields for both pages, so you can (foralfred2004-08-161-6/+2
| | | | | | | | 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
* Make 'S' in interactive mode toggle display of system processes.alfred2004-07-121-3/+7
|
* Build upon the nice work of Alfred and add sorting capabilities tokeramida2004-07-081-5/+8
| | | | | | the -m "io" mode of top. Approved by: alfred
* Correct a misleading (cut'n'pasted) comment.des2004-07-051-1/+1
|
* New feature, provide a display that shows the amount of IO processesalfred2004-07-011-10/+41
| | | | | | 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.
* Changes to allow top to decide whether or not to show multiple threads perjulian2003-07-171-5/+18
| | | | | | | process. Option -H enables it and it is toggled at the interactive screen by 'H'. Submitted by: Jung-uk Kim <jkim@niksun.com>
* Resolve conflicts (our -t option, we'd fixed a bug in a slightly different way).dwmalone2002-01-241-13/+38
|
* Make top exit if its tty vanishes.dwmalone2001-11-041-2/+8
| | | | | | | PR: 30939, 30581 Submitted by: Edwin Groothuis <edwin@mavetju.org> Submitted by: Andrew L. Neporada <andr@dgap.mipt.ru> MFC after: 2 weeks
* Don't do unsafe activities inside signal handlers. Just set a flag andkris2001-08-061-44/+54
| | | | | | | return. Obtained from: OpenBSD Reviewed by: audit
* Fix another possible bufer overflow in top.imp2000-11-031-1/+1
| | | | PR: bin/22496
* display.c: sprintf -> snprintfimp2000-10-041-1/+3
| | | | | | | | | top.c: fix from NetBSD/OpenBSD: make sure that new_message() is called with a format. Add $FreeBSD$ While I'm here. These files are already off the vendor branch.
* uptime display more in style with original codeobrien1999-01-091-0/+1
|
* Add -t option ('t' in interactive mode) to make top(1) ignore itself.des1998-08-041-5/+19
| | | | | | | | Attempts to contact the author of top(1) (William LeFebvre) have so far been unsuccessful. PR: 7253 Submitted by: Yours Truly
* Apply the FreeBSD-local patches.joerg1997-03-231-2/+13
| | | | Obtained from: The ports collection.
* This is the long-awaited import of top into the base system (actually,joerg1997-03-231-0/+996
the src/contrib/top part right now). This tools is simply too system- dependant to maintain it in the ports collection.
OpenPOWER on IntegriCloud