summaryrefslogtreecommitdiffstats
path: root/usr.bin/top
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r319866, r319867allanjude2017-06-152-9/+4
| | | | | | | top: Change the way the ZFS ARC compression ratio is calculated remove overhead statistics, already included in other counters Approved by: re (gjb)
* MFC r315170:ngie2017-05-301-2/+2
| | | | | | | | | | | r315170 (by imp): Adopt SRCTOP in usr.bin Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Silence on: arch@ (twice)
* MFC r308474, r308691, r309203, r309365, r309703, r309898, r310720,markj2017-05-232-9/+8
| | | | | r308489, r308706: Add PQ_LAUNDRY and remove PG_CACHED pages.
* MFC r315435:allanjude2017-05-182-10/+51
| | | | | | | | | | | | 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
* MFC r311710:ngie2017-01-131-4/+4
| | | | | | | Style fixes - Delete trailing whitespace - Use nitems(mib) instead of hardcoding the mib length
* MFC r309676vangyzen2016-12-151-6/+9
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFH (r305414): add a toggle to show approximate swap usage.des2016-10-221-8/+55
|
* Use MIN() macro from sys/param.h.araujo2016-04-271-1/+1
| | | | MFC after: 2 weeks.
* DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-02-241-8/+0
| | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division
* Rename variable to reflect the condition.kib2016-02-091-4/+4
| | | | | Suggested by: jhb Sponsored by: The FreeBSD Foundation
* Rename P_KTHREAD struct proc p_flag to P_KPROC.kib2016-02-091-4/+4
| | | | | | | | I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL() definition. Suggested by: jhb Sponsored by: The FreeBSD Foundation
* Update dependencies after r291406 added libelf to libkvm.bdrewery2015-12-011-0/+1
| | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division
* new dependssjg2015-06-161-1/+0
|
* Add META_MODE support.sjg2015-06-132-1/+33
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-5/+4
| |\
| * \ Merge from head@274682sjg2014-11-191-2/+2
| |\ \
| * \ \ Merge head from 7/28sjg2014-08-192-15/+102
| |\ \ \
| * | | | Updated dependenciessjg2014-05-161-1/+0
| | | | |
| * | | | Updated dependenciessjg2014-05-101-0/+3
| | | | |
| * | | | Merge from headsjg2014-05-082-17/+31
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-051-6/+6
| |\ \ \ \ \
| * \ \ \ \ \ sync from headsjg2013-04-121-2/+9
| |\ \ \ \ \ \
| * | | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | | |
| * | | | | | | Do no assume ${DESTDIR}/usr/include is always validsjg2013-02-201-1/+2
| | | | | | | |
| * | | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | | |
| * | | | | | | Sync with HEAD.obrien2013-02-081-15/+16
| |\ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| | \ \ \ \ \ \ \
| *---. \ \ \ \ \ \ \ Sync from headsjg2012-11-042-22/+87
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+30
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | | | Move contrib/top/top.X to contrib/top/top.xs and movemarcel2015-06-081-2/+2
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contrib/top/top.local.H to contrib/top/top.local.hs. This fixes a build breakage when src is on a case- insensitive file system -- we never properly create top.x nor top.local.h. Change the makefile accordingly. MFC after: 3 days
* | | | | | | | | | Print size_t's with %zu rather than "%zd.kevlo2015-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: bde
* | | | | | | | | | Convert to usr.bin/ to LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | | | Replace a magic number with the proper definition. This change actuallyjkim2014-10-291-2/+2
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes broken state field after r273266, i.e., "CPU-1" was displayed in place of "RUN".
* | | | | | | | Cap the percent CPU of individual threads at 100% to fix some of thejhb2014-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more obvious imprecision in the previous top changes. Specifically, top uses a delta of clock_gettime() calls right after invoking the kern.proc sysctl to fetch the process/thread list to compute the time delta between the fetches. However, the kern.proc sysctl handler does not run in constant time. It can spin on locks, be preempted by an interrupt handler, etc. As a result, the time between the gathering of stats for individual processes or threads between subsequent kern.proc handlers can vary. If a "slow" kern.proc run is followed by a "fast" kern.proc run, then the threads/processes at the start of the "slow" run will have a longer time delta than the threads/processes at the end. If the clock_gettime() time delta is not itself skewed by preemption, then the delta may be too short for a given thread/process resulting in a higher percent CPU than actual. However, there is no good way to calculate the exact amount of overage, nor to know which threads to subtract the overage from. Instead, just punt and fix the definitely-wrong case of an individual thread having more than 100% CPU. Discussed with: zonk
* | | | | | | | Rework the notion of CPU used in top. In particular, for subsequentjhb2014-05-301-13/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | displays after a pause, use the difference in runtime divided by the length of the pause as the percentage of CPU used instead of the value calculated by the kernel. In addition, when determing if a process or thread is idle or not, treat any process or thread that has used any runtime or performed any context switches during the interval as busy. Note that the percent CPU is calculated as a double and stored in an array to avoid recalculating the value multiple times in the comparison method used to sort processes in the CPU display. Tested by: Jamie Landeg-Jones <jamie@dyslexicfish.net> Reviewed by: emaste (earlier version) MFC after: 1 week
* | | | | | | | Fix a couple of size_t != int warnings.jhb2014-05-271-2/+2
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Fix width/alignment of JID column. Make it support up to the maximumbdrewery2014-05-031-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7-wide JIDs. On a system using jails for common tasks the JID can quickly increase. MFC after: 2 weeks
* | | | | | | Add -J command/flag to filter by jail name/jid. This will automaticallybdrewery2014-05-022-2/+8
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | display the JID as well (the -j command/flag). 0 displays host. + displays all. MFC after: 2 weeks Relnotes: yes
* | | | | | Bump the CPU/WCPU column width by one so that it fits values from 100% upjhb2013-06-111-6/+6
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to 999.99% CPU. It still won't be aligned if you have a multithreaded process using more than 1000% CPU (e.g. idle process on an idle 12-way system), but 100% is a common case. Submitted by: Jeremy Chadwick (partial) MFC after: 1 week
* | | | | Fix the 'C' field for a running thread to match the behavior describedjhb2013-03-111-2/+9
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the manpage by having it display the current CPU (ki_oncpu) rather than the previously used CPU (ki_lastcpu). ki_lastcpu is still used for all other thread states. Reported by: Chris Ross <cross+freebsd@distal.com> MFC after: 1 week
* | | | Use the correct size when allocating the cmdbuf string.rpaulo2012-11-191-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmdlengthdelta is the size of the header and we were using it to allocate a buffer to store the command line. This would mean that the cmdbuf could be too short. In practice this was never noticed unless you usually run top -a. On a stock FreeBSD system you can see the problem by running sendmail and then running top -a on a big terminal window. In practice this doubles to size available to cmdbuf since the header is around 65-68 bytes. Reviewed by: adrian
* | | | Add the PID column to the list of sort keys.rpaulo2012-11-111-1/+1
| |/ / |/| |
* | | Correct the order of the MFU and MRU labels. I had reversed them.jhb2012-10-191-1/+1
| |/ |/| | | | | | | | | Submitted by: Nikolay Denev ndenev gmail Pointy hat to: jhb MFC after: 3 days
* | Fix two layout bugs in the previous change:jhb2012-07-021-1/+3
| | | | | | | | | | | | | | - Properly increase y_mem when per-CPU stats are enabled. - Update y_arc for per-CPU stats being enabled/disabled. MFC after: 3 days
* | Add a new line to top that provides a brief summary of the ZFS ARC memoryjhb2012-06-272-21/+84
| | | | | | | | | | | | | | | | | | | | 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
* | Clarify that the cached file data pages included in the "Wired" countjhb2012-06-271-1/+1
|/ | | | | | | in top are the BIO-level cached data (i.e. "Buf"), since the previous phrase was a bit ambiguous with the "Cache" count. MFC after: 3 days
* Fix string buffer overflow when preparing the line of output.kib2012-04-181-2/+2
| | | | | | PR: bin/161739 Submitted by: Jeremy Chadwick <freebsd jdc parodius com> MFC after: 1 week
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-10/+10
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Spelling fixes for usr.bin/uqs2011-12-301-1/+1
|
* Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'jhb2011-07-181-5/+3
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud