Commit Graph

275 Commits

Author SHA1 Message Date
dholland f2815da66c fix typo, from Randolf Richardson in PR 44559 2011-02-13 08:34:00 +00:00
christos da9c1e1b4d fix previous. 2011-01-22 21:09:51 +00:00
christos 055b26bb55 Make printing of lwp flags similar to the process one, identifying (O)nproc
(K)ernel threads and scheduler (a)ctivations.
2011-01-22 20:55:58 +00:00
njoly c45af2045a Do not check pcpu value against 100.0 but rather 99.95, to properly
deal with value rounding. From apb@.
2010-07-28 17:39:54 +00:00
njoly 0697f9d213 Make %cpu drop the decimal part when reaching 100%, to stay in the 5
expected columns.
2010-07-27 12:40:48 +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
joerg a6a5384f08 Don't break lines in .It, there be dragons in groff. 2010-05-14 17:37:06 +00:00
joerg 26590112cf Use .In instead of .Aq Pa for header files 2010-03-22 18:35:09 +00:00
wiz 467a0fa1ae Bump date for uarea swap-out removal. 2009-10-21 22:18:37 +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
wiz 27ce49cc21 Bump date for previous. 2009-08-03 22:22:10 +00:00
dsl 666a334b2e Remove reference to P_SYSTRACE.
Fixes PR/41426
(leave defn in sys/sysctl.h since the bit shouldn't be reused!)
2009-08-03 20:00:39 +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
joerg ddf187c649 Fix number of columns in .Bl. Escape %C. 2009-03-13 11:13:46 +00:00
lukem 990d25a96c fix -Wsign-compare issues 2009-02-14 08:02:04 +00:00
drochner cbbbda3b17 make sure the table stays aligned even if no groups are to be displayed
with the "groupnames" option
2009-02-03 17:37:02 +00:00
drochner 8b7f84e12c make sure the table stays aligned even if no groups are to be displayed
with the "groups" option
2009-02-03 17:33:42 +00:00
christos a5c6617db7 fix dev_t 64 bit issues. 2008-12-28 19:50:22 +00:00
wiz fddd6ca288 Improve wording. 2008-10-19 17:04:49 +00:00
christos cca36888f5 Use 'O' for LSONPROC like solaris instead of bundling LSIDL, LSRUN, LSONPROC
to 'R'
2008-10-19 02:39:08 +00:00
wiz 2869cb061b Sync usage with man page. 2008-09-26 13:02:42 +00:00
wiz 6ea06b6e0e Sort options.
Remove systrace reference.
2008-09-26 12:59:17 +00:00
apb b35fbd4594 Add "ps -A" option. This displays information about all processes,
like BSD "ps -ax" or SYSV "ps -ef".  It's specified in SUSv3.

Also make some minor clarifications to the man page.
2008-09-26 08:09:31 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
christos 9655f5c24c PR/38755: murray armfield: /bin posix programs missing setprogname and/or
setlocale
2008-05-26 14:21:08 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dholland 0a890e1609 ps -t? needs to imply -x. Otherwise the non-x logic filters all the results
out. Thanks to der Mouse for prompting me to fix it...
2008-03-10 03:44:11 +00:00
christos da86f0e587 Add a CPUID keyword; idea and some of the code from Anon Ymous 2008-02-10 17:47:59 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
lukem bcf893f432 use __RCSID() 2007-12-12 22:55:42 +00:00
ad bb6c89afbf Kill another use of PZERO. 2007-11-06 00:44:46 +00:00
yamt ea03f830b4 make -s alter the default format rather than doing parsefmt.
it allows users to use -o to replace it later.
2007-10-24 12:10:11 +00:00
apb 6fc16fbc88 Document "emul" keyword. Fixes PR 36935.
Also sort list of keywords, and bump date.
2007-09-09 10:35:32 +00:00
yamt 37ac06be56 add a keyword "lname", to print l_name. 2007-09-01 16:54:39 +00:00
dsl bd8009e530 Don't call P_ZOMBIE(struct kinfo_proc2), it's p_stat field contains
lwp states, not process states!
Since the times are filled with zeros for zombie processes the check
before assuming teh process time is zero is moot - delete it.
Fix the other chact to test the p_realstat.
Fixer PR kern/36295
2007-07-28 17:05:50 +00:00
yamt 7893935666 remove descriptions of some states. ('A', 'S', '>')
- they are wrong.  (madvise is not vadvise)
- they don't exist anymore.
2007-06-25 00:24:01 +00:00
pavel f5e7ca2447 Revert the changes done after newlock2 merge, except for the removal of
the now unused LSDEAD state. The current kernel headers are now
source-compatible with pre-newlock2 kernel headers again.

Approved by Andrew Doran.
2007-02-17 22:49:56 +00:00
ad 8966ad6a93 Further changes to use compat process flags mapped by sysctl. To be
revisited soon.
2007-02-10 18:20:12 +00:00
ad 401499f30e Sync with kernel changes introduced by merging the newlock2 branch. 2007-02-09 22:08:48 +00:00
christos d0a868f481 Add support for printing the emulation of the process. 2006-10-29 22:32:53 +00:00
christos 3fccf7e09e c99 initializers 2006-10-16 00:31:47 +00:00
wiz 9dedcd8f8b Remove trailing whitespace.
Remove a partially duplicated sentence.
2006-10-09 21:31:29 +00:00
apb e7fd82468c Make it clear that multiple sort keys may be specified.
Closes PR 34271.
2006-10-07 10:22:21 +00:00
wiz 103401b052 Avoid .No if easily possible. 2006-10-03 02:15:16 +00:00
apb 9ff8e2d57f Add some markup missed in previous. 2006-10-02 20:54:27 +00:00
apb 7c5fcf623a Set the width in the correct data structure. (Fix error in previous.) 2006-10-02 18:43:13 +00:00
apb b9f435a549 Document changes to -o and -O options, and improve markup. 2006-10-02 17:57:01 +00:00
apb d9463bc15b * When all columns are given null customised headers, the blank header
line is not printed at all.  This is specified in P1003.1-2004
  (SUSv3), and is useful.

* Customised headers may contain embedded space, commas and equals
  signs.  To specify multiple customised headers, use multiple -o or -O
  options.  This is specified (for "-o", not for "-O") in P1003.1-2004
  (SUSv3), and is useful.

* When a column is given a null (blank) customised header, it keeps its
  default minimum width.  This is specified in P1003.1-2004 (SUSv3), and
  seems harmless.

* Fix a bug that made it impossible to print the same keyword multiple
  times, with different customised headers each time.  (Previously, the
  last customised header was used for all instances of the keyword.)

* Make the behaviour of "-O" more useful.  The first -O option adds
  the default keywords only if there have not yet been any formatting
  options, and multiple -O options now insert their keywords in adjacent
  positions.  Now {ps -j -O %cpu} is like {ps -j} with one extra column;
  Previously, it would have had all the columns implied by "-j", plus
  all the default columns, plus the extra column specified by "-O".

* Convert from home-grown linked lists to SIMPLEQ lists.

Discussed in tech-userlevel.
2006-10-02 17:54:35 +00:00
christos 10ed3a58a9 factor out the code that does numeric parsing into a function and check for
errors properly.
2006-09-02 20:00:09 +00:00
christos eb903308f2 Coverity CID 1559: Fix memory leak. 2006-03-18 05:33:31 +00:00