Commit Graph

287 Commits

Author SHA1 Message Date
wiz d1cbb54293 Increase width of table column so it formats more nicely. 2012-04-15 21:20:16 +00:00
wiz 623d7ac414 Choose better argument name for `-U' (sync with man page).
From Bug Hunting in email.
2012-04-15 18:10:13 +00:00
wiz 463d14b148 - choose better argument name for `-U';
- add argument names for options in man page;
- improve wording, punctuation, capitalization.

From Bug Hunting in email.
2012-04-15 18:09:50 +00:00
matt da4f7877a7 Use C89 function definitions 2012-03-20 18:42:28 +00:00
wiz 7fd6e7037d Remove trailing whitespace. 2012-03-15 15:49:59 +00:00
christos 21ae83057a Fix obsolete example (that referred to letters in process state that are
not set anymore), and clarify their meaning.
2012-03-15 15:43:43 +00:00
dholland cc236b866a The 'lstart' column uses strftime %c, not %C. Noted by mrg. 2012-02-23 21:54:28 +00:00
wiz 6b6a89aacb Remove unused variable.
From cppcheck via Henning Petersen in PR 46002.
2012-02-13 12:55:28 +00:00
dholland 145f9b8221 Minor English improvements for -w, partly from Snader_LB. 2012-01-27 05:59:17 +00:00
joerg 5bb1ddccc2 Use __dead 2011-08-29 14:51:17 +00:00
christos fe8677c354 Document non-literal formats 2011-08-14 10:53:16 +00:00
dholland e9b3916bd6 When converting from pages to kilobytes, cast the return value of
getpagesize() to size_t. For some reason getpagesize() is defined to
return int, and several of the page counts we get come back from the
kernel as int32_t; in LP64 without the cast the byte count will be
computed in a 32-bit value and for large processes will overflow and
become negative... and then remain negative when divided by 1024 to
convert to kilobytes.

Fixes a problem I hit the other day where I saw negative RSS, which
turns out also to be PR 40642.

Note: other logic in here will break down when we first get >2TB
processes... and int32 page counts will break on >8TB processes. But
hopefully we won't see any of that for a few years yet.
2011-06-13 03:42:15 +00:00
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