summaryrefslogtreecommitdiffstats
path: root/contrib/top
Commit message (Collapse)AuthorAgeFilesLines
* MFC 284165:marcel2015-06-172-0/+0
| | | | | | Move contrib/top/top.X to contrib/top/top.xs and move contrib/top/top.local.H to contrib/top/top.local.hs. Change the makefile accordingly.
* MFC r265249,r265250,r265251:bdrewery2014-05-174-6/+82
| | | | | | | - 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.
* Bump MAX_COLS to 512 to take advantage of wider terminals.rpaulo2012-12-131-1/+1
|
* Add "pid" to the help menu (sort keys section).rpaulo2012-11-111-2/+2
|
* Add a new line to top that provides a brief summary of the ZFS ARC memoryjhb2012-06-274-0/+55
| | | | | | | | | | 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-182-3/+15
| | | | | | | | | | | | 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-114-8/+37
| | | | | | | While here, make -P a toggle similar to other options such as -I. Reviewed by: arundel MFC after: 1 week
* Note that -a, -C, -H, -j, and -z are also toggles.jhb2011-07-081-1/+6
| | | | | | PR: bin/158682 Reported by: arundel MFC after: 3 days
* Revert r214857 pursudant to 9.0-RELEASE cycle.delphij2011-06-202-11/+3
| | | | Requested by: jh
* - Document the -H option and 'H' key alongside other options and keysjhb2011-05-311-2/+12
| | | | | | | | | | | rather than at the bottom of the manpage. - Remove an obsolete comment about SWAIT being a stale state. It was resurrected for a different purpose in FreeBSD 5 to mark idle ithreads. - Add a comment documenting that the SLEEP and LOCK states typically display the name of the event being waited on with lock names being prefixed with an asterisk and sleep event names not having a prefix. MFC after: 1 week
* Add a new option to toggle the display of the system idle process (per-CPUjhb2011-05-314-7/+27
| | | | | | | | | | | 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
* Output an appropriate amount of padding to line up per-CPU state columnsjhb2011-02-011-7/+11
| | | | | | | | rather than using a terminal sequence to move the cursor when drawing the initial screen. Requested by: arundel MFC after: 3 days
* Add 'jid' as a possible sort order to the help screen.pluknet2010-11-121-2/+4
| | | | | | | PR: bin/150992 Submitted by: Frederic Culot <frederic at culot dot org> Approved by: avg (mentor) MFC after: 5 days
* Inverse display of top(1)'s table header when running in inactive mode.delphij2010-11-062-3/+11
| | | | MFC after: 2 weeks
* Since top displays the uptime including seconds, there is no need to add 30brucec2010-08-171-1/+0
| | | | | | | | | onto it, which may have been used for rounding purposes in other utilities. PR: bin/147934 Submitted by: Janne Snabb <snabb at epipe.com> Approved by: rrs (mentor) MFC after: 2 weeks
* Make these files compile with clang.rpaulo2010-07-221-0/+1
| | | | Submitted by: Dimitry Andric <dimitry at andric.com>
* Fix brokenness in top on big-endian 32-bit systems introduced whennwhitehorn2010-04-191-1/+1
| | | | | | | changing format_k2 to take a long long. Because itoa is defined as a K&R C function, without prototyping its arguments, format_k2 passed a 64-bit value, but itoa() received only the first word, showing '0' in all memory fields.
* Specify the parameter in the format_k2 prototype.brucec2010-04-011-1/+1
| | | | | | This fixes top on ARM, which assumes that format_k2 takes an int. Approved by: rrs (mentor)
* Change the 'amt' parameter in format_k2 from int to unsigned long longbrucec2010-03-131-1/+1
| | | | | | | | | to match the values passed in and prevent the SIZE field being corrupted when more than 2TB is allocated. PR: bin/129706 Approved by: rrs (mentor) MFC after: 1 week
* Let top(1) use MAXLOGNAME instead of UT_NAMESIZE.ed2009-12-251-3/+3
| | | | The maximum user login length should have nothing to do with <utmp.h>.
* Explicitly line up the CPU state labels with the calculated starting columnjhb2009-08-191-0/+2
| | | | | | | | | that takes into account the width of the largest CPU ID. On systems with > 10 CPUs the labels for the first 10 CPUs were not lined up properly otherwise. Approved by: re (kib) MFC after: 1 week
* Merge r183430 from vendor/top/dist to head/contrib/top, although withrwatson2009-03-101-0/+0
| | | | | | | | | record-only mergeinfo because an automated merge is confused by the flattening that took place: Move install to install-sh to prevent name-clashes. MFC after: 3 days
* Removed the no-op -p; documented -P.ru2008-06-212-7/+6
| | | | MFC after: 3 days
* system_info.cpustates isn't sparse, so a bitmask of available CPU statesru2008-04-111-1/+0
| | | | is redundant (I think it's a leftover from an older implementation).
* Add a -P flag to display per-cpu cpu usage stats.peter2008-01-185-39/+107
|
* 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-044-5/+5
| | | | | | | it is written this way in jail(8). Suggested by: brueffer Approved by: delphij (mentor, implicit)
* - Add documentation notes for the 'a' option, forgotten in the previousstas2007-05-032-0/+4
| | | | | | | | | commit. commands.c [1] top.X Suggested by: rafan [1]
* - 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-174-8/+38
| | | | | | | | | | 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-143-6/+28
| | | | | | | | | 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
* The sigconv.awk script generates a sigdesc.h header file, whichkeramida2006-12-011-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contains a sigdec[] vector of structures, but the generated output is missing braces around the initializer of each struct, which triggers warnings in WARNS=3: src/usr.bin/top/sigdesc.h:10: warning: missing braces around initializer src/usr.bin/top/sigdesc.h:10: warning: (near initialization for `sigdesc[0]') * Fix the sigconv.awk script to generate a header with initializers which look better. * Add rules to usr.bin/top/Makefile that rebuilds a new sigconv.h header which matches the correct signal set from the build-time version of `${DESTDIR}/usr/include/signal.h' (so sigconv.h doesn't get stale once changes are made to the header). * Remove the old sigconv.h header, now that it is autoupdated at build time. * Various Makefile style fixes (the committed Makefile was kindly submitted by Ruslan): - Reorder .PATH, PROG, SRCS and CFLAGS to match style.Makefile(5) - Split off the generated sources (sigdesc.h top.local.h) in an SRCS+= line of their own. - Add entries to CLEANFILES near the rules that generate the respective files. - Move the explicit rule which builds top.1 after the implicit rules which generate its dependencies. Reviewed by: ru, bde Submitted by: ru (Makefile) MFC after: 2 weeks
* Update the description of the `STATE' column for SMP systems,keramida2006-05-161-2/+6
| | | | | | | | | and add the missing `C' SMP-only column. PR: docs/29245 Submitted by: ada@bsd.org Patch by: Pawel Worach <pawel.worach@telia.com> MFC after: 3 days
* Re-add option -C to usage().ru2006-04-191-1/+1
|
* Document the -C option of top(1), which has been added to the sourcekeramida2006-04-191-1/+13
| | | | | | | | and the usage message of top, but not to the manpage. Pointy hat to: keramida Reminded by: ru MFC after: 1 week
* Bring SYNOPSIS in line with usage().ru2006-04-182-7/+8
|
* Typo.keramida2005-10-261-1/+1
| | | | | | PR: docs/88015 Submitted by: Marian Cerny <jojo@matfyz.cz> MFC after: 3 days
* The 'text' argument of u_header() is not used, so we don't need tokeramida2005-05-191-6/+0
| | | | | | trim_header() it. Noticed by: bde
* Properly trim the header line too, to fix wrap-around problems thatkeramida2005-05-181-1/+41
| | | | | | | | | | | | have been noticed by running top(1) in terminals that are too narrow (or on systems with usernames that were too long, pushing everything too far to the right). Note that this does *not* solve the wrap-around problem of the system statistics, which is an entirely different matter :-/ Tested on: i386, sparc64 (panther), amd64 (sledge) Approved by: davidxu (in principle)
* Merge the CPU and WCPU columns in a single %6.2f column, add a new 'C'keramida2005-05-183-7/+24
| | | | | | | | | | | 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-142-4/+6
| | | | | | | | | 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>
* Correct macro usage.brueffer2005-03-131-1/+1
| | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* This patch merges the sort fields for both pages, so you can (foralfred2004-08-162-7/+3
| | | | | | | | 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
* document the 'I' and 't' commands in the help screen in top(1).alfred2004-07-121-2/+3
| | | | Submitted by: Alex Vasylenko lxv omut.org
* Make 'S' in interactive mode toggle display of system processes.alfred2004-07-123-3/+11
|
* Build upon the nice work of Alfred and add sorting capabilities tokeramida2004-07-082-6/+13
| | | | | | the -m "io" mode of top. Approved by: alfred
OpenPOWER on IntegriCloud