Commit Graph

28 Commits

Author SHA1 Message Date
christos cc349219b4 PR/45739: Moritz Wilhelmy: top(1) segfaults on WINCH with unknown terminal 2011-12-24 22:29:48 +00:00
njoly e7df974e10 Adjust UID header position, to be aligned with the datas. 2011-10-08 08:45:37 +00:00
christos 1d62298ca7 Swap the command and the thread name in the thread view and let the command
be as long as it wants. (Vladimir Kirillov)
2011-04-15 02:05:53 +00:00
christos 8d7359cabb PR/43562: Witold Jan Wnuk: top: CPU percentages overlap labels 2010-07-03 13:18:57 +00:00
is adbe495929 Avoid steps and other artefacts in head for more than 9 CPUs. 2010-06-30 11:08:12 +00:00
rmind c0c9bed8ab Fix previous, so it builds on some ports. 2010-05-31 18:14:59 +00:00
rmind 8b95f823bf Fix ps(1) and top(1) to show reasonable CPU numbers i.e. cpu_index() provided
by the kernel, instead of CPU order number, which is generally random.
2010-05-31 03:18:33 +00:00
christos 58f9040724 implement fullcmd mode. Now we need to modernize the machine specific code
to handle displays > 80 columns to make this work effectively.
2010-05-12 22:09:36 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
njoly f4e46459c3 Make process CPU value drop the decimal part when reaching 100%, like
WCPU.
2009-07-27 16:26:48 +00:00
christos 97773de03d PR/41358: YAMAMOTO Takashi: top -n is broken, don't return -1 early if
!smartterminal
2009-05-05 18:52:13 +00:00
christos 213e7ef10b WARNS=4 2009-05-05 18:49:49 +00:00
njoly aaad3eb0f6 Drop the process WCPU decimal part when it reaches 100.0% (threaded
application on SMP system), to make it stay in the 5 expected columns.

ok by christos.
2009-04-24 19:07:45 +00:00
mrg fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
ad 5e99d26fbe Adjust weight of SIDL down so idle kthreads don't eat up all of the
thread display
2009-03-08 16:26:03 +00:00
oster ab54f8ad2b On a multi-cpu/core machine, running 'top' and pressing '1' resulted
in n-1 blank lines at the bottom of the display.  On the same machine,
running 'top -1' and pressing '1' resulted in a garbled display that
would just get progressively worse.  Invert the values returned by
display_setmulti() to correct both issues.
2009-02-27 17:38:14 +00:00
tsutsui 791606eb62 Sync usage with man page. 2008-12-13 09:05:56 +00:00
christos 809d48d0cb back emalloc out, I don't want it. 2008-12-12 23:10:08 +00:00
christos 56a682bfb8 - handle memory allocations gracefully using e-functions instread of
core-dumping.
- if the display is too small bail out.
2008-12-12 23:09:08 +00:00
gmcgarry 5a8a518ea5 Both legs of conditional operator must return the same type. 2008-08-29 00:36:27 +00:00
cube c32922f166 Make sure format_next_{proc,lwp} return a pointer to a buffer at least
MAX_COLS long otherwise a '\0' might be printed in a random place of
memory.
2008-08-02 23:20:16 +00:00
christos 3e1a92fedd PR/39200: Geoff Wing: Fix memory stomping on multi-cpu machines. 2008-07-24 15:10:34 +00:00
christos 1fb97e154d - fix p for threads
- more sane ordering for thread command, username, and pid
2008-07-21 19:29:36 +00:00
christos 14f5b40f23 put back -p, add sort order for pid, username, command. XXX: should add reverse
sorting order too.
2008-07-20 18:52:06 +00:00
christos d6a52d8265 add -1 to usage 2008-07-20 00:11:04 +00:00
christos a8f5847fc4 allow fractional second values like lunix does. 2008-07-16 14:27:26 +00:00
christos 2b60e3f28a add build glue and local fixes 2008-07-16 00:36:14 +00:00
christos 10dd2532a5 import latest top 2008-07-16 00:20:32 +00:00