summaryrefslogtreecommitdiffstats
path: root/contrib/top/display.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r315435:allanjude2017-05-181-0/+54
| | | | | | | | | | | | Add ZFS compressed ARC stats to top(1) MFC r316314: top(1) read the wrong amount of data from sysctl MFC r318448: Explain the new fields in top(1) related to ZFS compressed ARC Remove the laundry field during the merge, does not exist in stable/11
* Silence top(1) compiler warningsngie2016-05-221-8/+36
| | | | | | | | | | | | | | | | | The contrib/top code is no longer maintained upstream (last pulled 16 years ago). The K&R-style followed by the code spews -Wimplicit-int and -Wreturn-type warnings, amongst others. This silences 131 warnings with as little modification as possible by adding necessary return types, definitions, headers, and header guards, and missing header includes. The 5 warnings that remain are due to undeclared ncurses references. I didn't include curses.h and term.h because there are several local functions and macros that conflict with those definitions. MFC after: 3 weeks Reviewed by: cem, ngie Submitted by: Randy Westlund <rwestlun@gmail.com> Differential Revision: https://reviews.freebsd.org/D6468
* Add a new line to top that provides a brief summary of the ZFS ARC memoryjhb2012-06-271-0/+45
| | | | | | | | | | 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
* Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'jhb2011-07-181-2/+14
| | | | | | | | | | | | 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
* Allow per-CPU statistics to be toggled at runtime via the 'P' key.jhb2011-07-111-4/+17
| | | | | | | While here, make -P a toggle similar to other options such as -I. Reviewed by: arundel MFC after: 1 week
* Revert r214857 pursudant to 9.0-RELEASE cycle.delphij2011-06-201-10/+2
| | | | Requested by: jh
* 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
* Inverse display of top(1)'s table header when running in inactive mode.delphij2010-11-061-2/+10
| | | | 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
* 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
* Add a -P flag to display per-cpu cpu usage stats.peter2008-01-181-17/+69
|
* 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)
* Fix a bug where you couldn't start top in a very small window. Nowdwmalone2002-08-111-0/+2
| | | | | | | | | you can start it in a small window, but it doesn't always display anything sensible. Resizing the window does work though. The patch is a slightly simpler one than Sheldon's in the PR. PR: 21075
* Resolve conflicts.dwmalone2002-01-241-4/+4
|
* 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-42/+35
|
* Display uptime in upper right corner.obrien1998-12-191-0/+43
| | | | | Submitted by: Andy Farkas <andyf@speednet.com.au> Obtained from: freebsd-current list
* Apply the FreeBSD-local patches.joerg1997-03-231-2/+43
| | | | Obtained from: The ports collection.
* This is the long-awaited import of top into the base system (actually,joerg1997-03-231-0/+1129
the src/contrib/top part right now). This tools is simply too system- dependant to maintain it in the ports collection.
OpenPOWER on IntegriCloud