CVS log for src/bin/ps/ps.c
Up to [cvs.NetBSD.org] / src / bin / ps
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.97: download - view: text, markup, annotated - select for diffs
Tue Sep 14 22:01:17 2021 UTC (3 years, 4 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
netbsd-10-base,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
HEAD
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +14 -19
lines
use emalloc and friends, add ktrace flag printing.
Revision 1.93.6.1: download - view: text, markup, annotated - select for diffs
Sun Jun 6 20:30:43 2021 UTC (3 years, 7 months ago) by cjep
Branches: cjep_sun2x
Diff to: previous 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93: +21 -7
lines
sync with head
Revision 1.96: download - view: text, markup, annotated - select for diffs
Fri Jun 4 22:39:41 2021 UTC (3 years, 7 months ago) by christos
Branches: MAIN
CVS tags: cjep_sun2x-base1
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +6 -13
lines
use parsenum like everywhere else in the code.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Fri Jun 4 08:17:53 2021 UTC (3 years, 7 months ago) by wiz
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +4 -4
lines
Sort options in usage.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Jun 4 06:28:42 2021 UTC (3 years, 7 months ago) by cjep
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +26 -5
lines
PR standards/11223
Add -G to take a single group argument heading towards POSIX.2 compliance.
Patch from jperkin and reviewed by simonb.
Revision 1.91.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 21 19:37:33 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.91.2.2: preferred, colored; branchpoint 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91.2.2: +2 -2
lines
Ooops, restore accidently removed files from merge mishap
Revision 1.91.2.2
Tue Apr 21 18:41:05 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
FILE REMOVED
Changes since revision 1.91.2.1: +2 -2
lines
Sync with HEAD
Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 07:45:06 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +7 -2
lines
Mostly merge changes from HEAD upto 20200411
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Sep 15 15:27:50 2019 UTC (5 years, 4 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
is-mlppp-base,
is-mlppp,
cjep_sun2x-base,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Branch point for: cjep_sun2x
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -2
lines
ps(1): Guard freeing the memory of pinfo with __NO_LEAKS.
No more leaks are detected by LSan/NetBSD as of the LLVM snapshot
(clang10svn) from 2019-09-15.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Wed Sep 11 17:02:53 2019 UTC (5 years, 4 months ago) by kamil
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +5 -2
lines
Plug memory leak in ps(1)
pinfo is allocated in setpinfo() with calloc(3).
Free it when no longer used, just before the program termination.
Detected with LSan.
Revision 1.89.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 16 01:57:31 2018 UTC (6 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89: +12 -12
lines
Sync with HEAD, resolve some conflicts
Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Apr 11 18:52:29 2018 UTC (6 years, 9 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9
Branch point for: phil-wifi
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3
lines
kvm_geterr() already contains errno, use errx.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Apr 11 18:52:05 2018 UTC (6 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +12 -12
lines
use EXIT_FAILURE instead of 1
Revision 1.88.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 3 22:11:36 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +3 -3
lines
Pull up following revision(s) (requested by kamil in ticket #515):
bin/ps/ps.c: revision 1.89
Fix an unitialized memory read bug in ps(1)
rawcpu of type int, is declared inside main(){} and it can be passed as
uninitialized to setpinfo().
The setpinfo() function has a switch checking the value of rawcpu:
if (!rawcpu)
pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu);
rawcpu is set to 1 with the command line argument "-C".
-C Change the way the CPU percentage is calculated by using a
"raw" CPU calculation that ignores "resident" time (this
normally has no effect).
Bug reproducible with an invocation: "ps u". It hides with "ps uC".
Initialize rawcpu by default to 0, before the getopt(3) machinery.
Detected with MSan running on NetBSD/amd64.
Sponsored by <The NetBSD Foundation>
Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Jan 12 23:01:14 2018 UTC (7 years ago) by kamil
Branches: MAIN
CVS tags: pgoyette-compat-base,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3
lines
Fix an unitialized memory read bug in ps(1)
rawcpu of type int, is declared inside main(){} and it can be passed as
uninitialized to setpinfo().
The setpinfo() function has a switch checking the value of rawcpu:
if (!rawcpu)
pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu);
rawcpu is set to 1 with the command line argument "-C".
-C Change the way the CPU percentage is calculated by using a
"raw" CPU calculation that ignores "resident" time (this
normally has no effect).
Bug reproducible with an invocation: "ps u". It hides with "ps uC".
Initialize rawcpu by default to 0, before the getopt(3) machinery.
Detected with MSan running on NetBSD/amd64.
Sponsored by <The NetBSD Foundation>
Revision 1.83.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:53:41 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +193 -29
lines
Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Dec 26 20:52:39 2016 UTC (8 years ago) by rin
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -4
lines
simplify logic; there must be no CPU usage when p_swtime is zero
Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Dec 2 21:59:03 2016 UTC (8 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +129 -8
lines
provide a tree like display with -d, from FreeBSD
Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon Nov 28 08:21:10 2016 UTC (8 years, 1 month ago) by rin
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +65 -17
lines
Calculate CPU usage (pcpu) once per process if it is required. This change
significantly improves performance for slow machines when output is sorted
by pcpu.
ok martin
Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Nov 28 08:18:27 2016 UTC (8 years, 1 month ago) by rin
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -9
lines
KNF
ok martin
Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Sep 5 01:00:07 2016 UTC (8 years, 4 months ago) by sevan
Branches: MAIN
CVS tags: pgoyette-localcount-20161104,
localcount-20160914
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -3
lines
Drop main() prototype.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Jun 16 22:31:08 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +4 -4
lines
remove \n from error messages
Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 19 23:45:11 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78: +37 -35
lines
Rebase to HEAD as of a few days ago.
Revision 1.80.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:41:18 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80: +36 -33
lines
Rebase.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Jun 28 17:32:27 2014 UTC (10 years, 6 months ago) by dholland
Branches: MAIN
CVS tags: tls-maxphys-base,
tls-earlyentropy-base,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +7 -3
lines
Don't print junk errnos. Avoids:
% ps -tfoo
ps: /dev/ttyfoo: Undefined error: 0
Exit 1
Revision 1.76.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:26:23 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.76.2.2: preferred, colored; branchpoint 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.2: +32 -34
lines
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Apr 20 23:31:40 2014 UTC (10 years, 9 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base9
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +31 -32
lines
Don't bother using variables whose value is never changed from the
initialization value.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Feb 19 20:42:14 2014 UTC (10 years, 11 months ago) by dsl
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -3
lines
Remove some pointless inclusions os sys/user.h
Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Jan 15 08:09:10 2014 UTC (11 years ago) by mlelstv
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -3
lines
Make ps -s use LTIME instead of TIME in the default output format.
Revision 1.76.4.1: download - view: text, markup, annotated - select for diffs
Sun Jun 24 18:45:22 2012 UTC (12 years, 6 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus
Diff to: previous 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76: +51 -38
lines
Pull up following revision(s) (requested by dholland in ticket #355):
bin/ps/ps.c: revision 1.78
Push logic to convert a ttyname to a device number into its own
function. Improve dealing with ptyfs by explicitly handling missing
pts/%d entries, if the kernel supports the pts device (PR 40813).
Revision 1.76.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:07:04 2012 UTC (12 years, 8 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.76.2.1: preferred, colored; branchpoint 1.76: preferred, colored
Changes since revision 1.76.2.1: +51 -38
lines
sync with head.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Mon May 7 13:14:31 2012 UTC (12 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
khorben-n900,
agc-symver-base,
agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +51 -38
lines
Push logic to convert a ttyname to a device number into its own
function. Improve dealing with ptyfs by explicitly handling missing
pts/%d entries, if the kernel supports the pts device (PR 40813).
Revision 1.76.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:01:37 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3
lines
sync with head
Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Apr 15 18:10:13 2012 UTC (12 years, 9 months ago) by wiz
Branches: MAIN
CVS tags: yamt-pagecache-base4
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3
lines
Choose better argument name for `-U' (sync with man page).
From Bug Hunting in email.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Mon Aug 29 14:51:18 2011 UTC (13 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base
Branch point for: yamt-pagecache,
netbsd-6
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3
lines
Use __dead
Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon May 31 03:18:33 2010 UTC (14 years, 7 months ago) by rmind
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -4
lines
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.
Revision 1.72.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:15:51 2009 UTC (15 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +4 -4
lines
Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Revision 1.71.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 1 00:25:20 2009 UTC (15 years, 9 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b
Diff to: previous 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71: +3 -3
lines
Pull up following revision(s) (requested by mrg in ticket #622):
bin/csh/csh.1: revision 1.46
bin/csh/func.c: revision 1.37
bin/ps/print.c: revision 1.111
bin/ps/ps.c: revision 1.74
bin/sh/miscbltin.c: revision 1.38
bin/sh/sh.1: revision 1.92 via patch
external/bsd/top/dist/machine/m_netbsd.c: revision 1.7
lib/libkvm/kvm_proc.c: revision 1.82
sys/arch/mips/mips/cpu_exec.c: revision 1.55
sys/compat/darwin/darwin_exec.c: revision 1.57
sys/compat/ibcs2/ibcs2_exec.c: revision 1.73
sys/compat/irix/irix_resource.c: revision 1.15
sys/compat/linux/arch/amd64/linux_exec_machdep.c: revision 1.16
sys/compat/linux/arch/i386/linux_exec_machdep.c: revision 1.12
sys/compat/linux/common/linux_limit.h: revision 1.5
sys/compat/osf1/osf1_resource.c: revision 1.14
sys/compat/svr4/svr4_resource.c: revision 1.18
sys/compat/svr4_32/svr4_32_resource.c: revision 1.17
sys/kern/exec_subr.c: revision 1.62
sys/kern/init_sysctl.c: revision 1.160
sys/kern/kern_exec.c: revision 1.288
sys/kern/kern_resource.c: revision 1.151
sys/sys/param.h: patch
sys/sys/resource.h: revision 1.31
sys/sys/sysctl.h: revision 1.184
sys/uvm/uvm_extern.h: revision 1.153
sys/uvm/uvm_glue.c: revision 1.136
sys/uvm/uvm_mmap.c: revision 1.128
usr.bin/systat/ps.c: revision 1.32
- - 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 :-)
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Mar 29 01:02:49 2009 UTC (15 years, 9 months ago) by mrg
Branches: MAIN
CVS tags: matt-premerge-20091211,
jym-xensuspend-nbase,
jym-xensuspend-base
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3
lines
- 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 :-)
Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Feb 14 08:04:10 2009 UTC (15 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3
lines
fix -Wsign-compare issues
Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Dec 28 19:50:22 2008 UTC (16 years ago) by christos
Branches: MAIN
Branch point for: jym-xensuspend
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +6 -5
lines
fix dev_t 64 bit issues.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Sep 26 13:02:42 2008 UTC (16 years, 3 months ago) by wiz
Branches: MAIN
CVS tags: netbsd-5-base,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
matt-mips64-base2
Branch point for: netbsd-5
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +5 -5
lines
Sync usage with man page.
Revision 1.70: download - view: text, markup, annotated - select for diffs
Fri Sep 26 08:09:31 2008 UTC (16 years, 3 months ago) by apb
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +8 -4
lines
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.
Revision 1.67.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:27:42 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.67.2.1: preferred, colored; branchpoint 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67.2.1: +4 -4
lines
Sync with wrstuden-revivesa-base-2.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Jul 20 00:52:40 2008 UTC (16 years, 6 months ago) by lukem
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -4
lines
Remove the \n and tabs from the __COPYRIGHT() strings.
Revision 1.67.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:26:44 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +6 -2
lines
Sync w/ -current. 34 merge conflicts to follow.
Revision 1.66.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:02:56 2008 UTC (16 years, 7 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.66.2.1: preferred, colored; branchpoint 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.1: +6 -2
lines
sync with head
Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon May 26 14:21:08 2008 UTC (16 years, 7 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-base4,
yamt-pf42-base3,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +6 -2
lines
PR/38755: murray armfield: /bin posix programs missing setprogname and/or
setlocale
Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:28:44 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -9
lines
sync with head.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:22:51 2008 UTC (16 years, 8 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base2,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -9
lines
Remove clause 3 and 4 from TNF licenses
Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:14:29 2008 UTC (16 years, 10 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65: +5 -4
lines
sync with head.
Revision 1.63.4.2: download - view: text, markup, annotated - select for diffs
Sun Mar 23 00:11:40 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.63.4.1: preferred, colored; branchpoint 1.63: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63.4.1: +7 -4
lines
sync with HEAD
Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Mar 10 03:44:11 2008 UTC (16 years, 10 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base,
matt-armv6-nbase,
keiichi-mipv6-base
Branch point for: yamt-pf42
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -4
lines
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...
Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Feb 10 17:48:00 2008 UTC (16 years, 11 months ago) by christos
Branches: MAIN
CVS tags: hpcarm-cleanup-base
Branch point for: keiichi-mipv6
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +4 -2
lines
Add a CPUID keyword; idea and some of the code from Anon Ymous
Revision 1.63.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:07:21 2007 UTC (17 years, 2 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +7 -7
lines
sync with HEAD
Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Oct 24 12:10:11 2007 UTC (17 years, 3 months ago) by yamt
Branches: MAIN
CVS tags: matt-armv6-base,
cube-autoconf-base,
cube-autoconf
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +7 -7
lines
make -s alter the default format rather than doing parsefmt.
it allows users to use -o to replace it later.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:49:57 2007 UTC (17 years, 11 months ago) by pavel
Branches: MAIN
CVS tags: matt-mips64-base,
matt-mips64,
hpcarm-cleanup
Branch point for: matt-armv6
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -2
lines
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.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Feb 9 22:08:48 2007 UTC (17 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +4 -4
lines
Sync with kernel changes introduced by merging the newlock2 branch.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Oct 2 17:54:35 2006 UTC (18 years, 3 months ago) by apb
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +32 -18
lines
* 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.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Sep 2 20:00:09 2006 UTC (18 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +22 -11
lines
factor out the code that does numeric parsing into a function and check for
errors properly.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun Jun 26 19:10:49 2005 UTC (19 years, 6 months ago) by christos
Branches: MAIN
CVS tags: abandoned-netbsd-4-base,
abandoned-netbsd-4
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +18 -15
lines
sprinkle a little const, and now everything compiles with WARNS=3
Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Jun 1 15:30:33 2005 UTC (19 years, 7 months ago) by lukem
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -2
lines
appease gcc -Wuninitialized
Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Feb 11 18:26:18 2005 UTC (19 years, 11 months ago) by christos
Branches: MAIN
CVS tags: netbsd-3-base,
netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0,
netbsd-3
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -3
lines
allow -t ttyp0 -t p0 -t /dev/ttyp0 -t /dev/pts/0
Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Nov 29 04:44:10 2004 UTC (20 years, 1 month ago) by atatat
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +6 -3
lines
Make ps understand "-tpts/4" by assuming that ptyfs is mounted on
/dev/pts and that the '/' immediately preceding the digits does not
need a 'p' in front of it (ick, kludge_oldps_options()).
Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Oct 29 19:53:29 2004 UTC (20 years, 2 months ago) by dsl
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +4 -4
lines
Add (unsigned char) cast to ctype function
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Mar 27 14:09:10 2004 UTC (20 years, 9 months ago) by simonb
Branches: MAIN
CVS tags: netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2-0,
netbsd-2
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +5 -5
lines
#define<TAB>
Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Mar 27 12:44:08 2004 UTC (20 years, 9 months ago) by simonb
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -3
lines
Wrap some long lines.
Consisently use (void) in front of printf(...);
A few more white-space nits.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Mar 27 12:09:28 2004 UTC (20 years, 9 months ago) by simonb
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +21 -28
lines
KNF, ANSFify, de-__P, unC++ify, white space nits.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jan 11 18:55:33 2004 UTC (21 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -3
lines
g/c SDEAD
Revision 1.50: download - view: text, markup, annotated - select for diffs
Thu Aug 7 09:05:24 2003 UTC (21 years, 5 months ago) by agc
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -7
lines
Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Mar 6 09:02:16 2003 UTC (21 years, 10 months ago) by dsl
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +119 -26
lines
- add keywords for utime, stime and ctime (output sss.ssssss if small)
- fiddle with keyword table - mainly to keep width under 80 cols)
- add -k keylist so sort output
- don't use logs to work out field width, get -MAXINT right
- user defined headers can be 1 char (actually they can be zero length)
so ?? in tty column isn't guaranteed to be wider than header
- use PRId64 to remove some long long casts
- use kvm_openfiles(NULL, NULL, NULL, KVN_NO_FILES, ..) unless core file
specified
(approved by christos)
Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Jan 18 10:52:17 2003 UTC (22 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +135 -25
lines
Merge the nathanw_sa branch.
Revision 1.46.2.11: download - view: text, markup, annotated - select for diffs
Tue Nov 12 20:31:58 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.46.2.10: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.10: +5 -4
lines
Catch up to -current.
Revision 1.46.2.10: download - view: text, markup, annotated - select for diffs
Thu Oct 24 23:36:41 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.9: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.9: +10 -11
lines
Small typo fix.
Treat SSTOP and SACTIVE the same way in pick_representative_lwp(), and
include LSSTOP in the state hierarchy.
Revision 1.46.2.9: download - view: text, markup, annotated - select for diffs
Fri Jul 26 00:01:48 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.8: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.8: +9 -4
lines
Consider LWPs in LSSUSPENDED as a worst-case for a representative LWP.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Jun 19 08:11:56 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: nathanw_sa_before_merge,
nathanw_sa_base,
fvdl_fs64_base
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +7 -33
lines
g/c procfs fallback code, it's redundant now that we use sysctl to get
process info
Revision 1.46.2.8: download - view: text, markup, annotated - select for diffs
Thu Jun 6 17:08:04 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.7: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.7: +3 -3
lines
Use the real process state when picking a representative LWP, not the
old-style state that was faked up for us by sysctl.
Revision 1.46.2.7: download - view: text, markup, annotated - select for diffs
Thu May 2 18:11:35 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.6: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.6: +14 -7
lines
Don't puke on zero-LWP processes (zombies).
Revision 1.46.2.6: download - view: text, markup, annotated - select for diffs
Wed Apr 24 04:29:59 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.5: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.5: +3 -3
lines
Note the presense of multiple LWPs or scheduler activations under "state".
Add a "lstate" that prints LWP-specific state and display it instead
of "state" under ps -s.
Revision 1.46.2.5: download - view: text, markup, annotated - select for diffs
Tue Apr 23 23:57:32 2002 UTC (22 years, 9 months ago) by wrstuden
Branches: nathanw_sa
Diff to: previous 1.46.2.4: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.4: +3 -3
lines
Add -s to synopsis.
Revision 1.46.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 23 22:00:36 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.3: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.3: +2 -4
lines
Don't need to free the kinfo_lwp pointer; libkvm does that.
Revision 1.46.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 23 21:59:20 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.2: +10 -10
lines
Don't shadow global symbol "sleep".
Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 23 20:41:14 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +640 -0
lines
Add support for handling multi-LWP processes by selecting one LWP as
"representative" of the process.
Also add a -s option that prints a line for each LWP.
While I'm here, remove the /proc fallback code.
Revision 1.46.2.1
Thu Dec 20 20:10:34 2001 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
FILE REMOVED
Changes since revision 1.46: +0 -566
lines
file ps.c was added on branch nathanw_sa on 2002-04-23 20:41:14 +0000
Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Dec 20 20:10:34 2001 UTC (23 years, 1 month ago) by soren
Branches: MAIN
CVS tags: netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001,
netbsd-1-6
Branch point for: nathanw_sa
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3
lines
Sync getopt() / man page with actual getopt options.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Nov 3 13:21:09 2001 UTC (23 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +5 -5
lines
fix minor WARNS=2
Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Jul 30 16:22:49 2001 UTC (23 years, 5 months ago) by wiz
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -4
lines
Remove duplicate `if'. Noted by Geoff C. Wing in bin/13551.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Jul 20 21:59:58 2001 UTC (23 years, 6 months ago) by matt
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +5 -3
lines
Add a small optimizetion in savevars(). break out of the loop once needcomm
is set since setting it multiple times only wastes cpu time.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Jun 14 19:04:49 2001 UTC (23 years, 7 months ago) by cyber
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3
lines
If there were no processes to list, it meant that our criteria failed
and didnt match anything. Dont make our caller think we succeeded.
Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 15:03:45 2000 UTC (24 years, 7 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +85 -29
lines
Sync w/ netbsd-1-5-base.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Jun 16 03:51:00 2000 UTC (24 years, 7 months ago) by simonb
Branches: MAIN
CVS tags: netbsd-1-5-base,
netbsd-1-5-RELEASE,
netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001,
netbsd-1-5-BETA2,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2,
netbsd-1-5
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3
lines
Don't check namelist when choosing to use the sysctl interface.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Jun 8 13:30:40 2000 UTC (24 years, 7 months ago) by simonb
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +53 -10
lines
Fix handling of "ps U<user>" where <user> ended it 't' - now if the
first argument doesn't start with a '-' and ends in 't', the 't' only
gets converted to a 'T' (for listing processes on the current tty)
if it doesn't contain any other command line option characters that
take an argument. Problem noticed by ITOH Yasufumi on tech-userlevel.
If the 'start' format was the last column, the width wouldn't be set
and started() output a zero length string instead of a string the right
length - fix header width calculations so the the last column is handled
the same all others. This only showed up for 'start' because started()
knew that the column header is the same width and the field itself...
Update copyrights.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Jun 7 04:58:01 2000 UTC (24 years, 7 months ago) by simonb
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +33 -20
lines
Calculate field widths on the fly so that all columns line up nicely
and make more effective use of screen real estate when some columns
(eg USER and VSZ) didn't need the full default width.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri May 26 03:04:28 2000 UTC (24 years, 8 months ago) by simonb
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +39 -101
lines
Use new sysctl/kvm interfaces. This will stop the "proc size mismatch"
errors when internal kernel structures change size. Also remove
the sgid bit - all live kernel data is accessed through the sysctl
interface.
Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Mon May 22 21:40:32 2000 UTC (24 years, 8 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1: +3 -5
lines
Pull up revision 1.37 (requested by abs):
Only check the terminal size via STDOUT, not STDERR or STDIN.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Apr 29 00:18:48 2000 UTC (24 years, 8 months ago) by abs
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -5
lines
If ps cannot get the terminal size from STDOUT, it tried STDERR and STDIN.
What this does to the POLS when a script that is parsing ps output just happens
to run in a narrow terminal cannot be described in polite company.
If STDOUT is not a tty, leave width at 80.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Apr 15 04:40:46 2000 UTC (24 years, 9 months ago) by simonb
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +15 -8
lines
Use tty "?" to select processes with no controlling tty and tty "-" to
select processes with a revoked controlling tty.
Idea from SunOS/Solaris, suggested by Alexis Rosen.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Apr 10 06:37:37 2000 UTC (24 years, 9 months ago) by chs
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -2
lines
make -M imply -K. the current system is not likely to be
a reasonable approximation of a crash dump.
Revision 1.28.4.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:27:11 1999 UTC (25 years ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +47 -20
lines
Pull up to last week's -current.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Dec 4 01:23:09 1999 UTC (25 years, 1 month ago) by hubertf
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3
lines
Document -U switch (displays processes belonging to given user/uid).
Reported in PR 8943 by WL <wliao@dura.spc.uchicago.edu>
Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Dec 3 02:16:41 1999 UTC (25 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -3
lines
"ps -e" only shows the environment for the processes owned by the
current user id or all process if run by root.
Fixes PR security/5967 from Todd Vierling.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Nov 9 15:06:31 1999 UTC (25 years, 2 months ago) by drochner
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -4
lines
Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 8 06:40:24 1999 UTC (25 years, 2 months ago) by cgd
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH002
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +43 -17
lines
pull up revs 1.29-1.31 from trunk (requested by jdolecek):
When using the procfs for extracting process information, extract process
start time, arguments, and session leadership status. Also, fall back to
procfs when kvm_openfiles() completely fails (e.g. when /dev/mem is not
readable). Fixes PR#7772.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Oct 15 20:39:52 1999 UTC (25 years, 3 months ago) by jdolecek
Branches: MAIN
CVS tags: comdex-fall-1999-base,
comdex-fall-1999
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -3
lines
command(): don't start using procfs_getargv() instead of kvm_getargv()
just because the latter returned a NULL - that may normally happen,
when the process is, for example, a kernel thread
procfs_getargv(): if the name is brackened in '(' and ')', just
return NULL immediately - the code in command() will DTRT
and the output will be same for procfs- and kvm- based lookup
in all cases
Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Oct 15 20:01:33 1999 UTC (25 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4
lines
getkinfo_kvm(): fix bug in previous - handled size_t i as if it would be signed
saveuser(): don't check kd - if we get here, kd is never NULL
Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Oct 15 19:31:25 1999 UTC (25 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +42 -17
lines
When using the procfs for extracting process information, extract
also process start time, process arguments and session leadership status.
The procfs fallback is also used when kvm_openfiles() completely fails
(e.g. when /dev/mem is not readable).
Solves PR 7772, though the final implementation is different.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Mar 27 21:38:08 1999 UTC (25 years, 10 months ago) by bgrayson
Branches: MAIN
CVS tags: netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH001
Branch point for: wrstuden-devbsize,
netbsd-1-4
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +22 -26
lines
Minor fixes:
1. Use statfs() to verify that /proc is a procfs.
2. Add -K option to disable /proc-based method.
3. Make warnings less verbose, but still accurate.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Mar 26 22:36:02 1999 UTC (25 years, 10 months ago) by bgrayson
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +41 -3
lines
Added experimental fallback /proc-based lookup. Warnings are printed when the
fallback method is used, as the results could be untrustworthy if an
intruder is present. It is highly likely that NetBSD-1.5 will have
an improved kvm interface for reading process information, at which
point this code can be garbage-collected. Also added a word to the
man page -x option description while I was here.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Jan 4 16:37:28 1999 UTC (26 years ago) by kim
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +7 -7
lines
Fixed segfaulting for "ps -T". There is no optarg with -T, so instructions
under label "tty:" need to use ttname instead.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Jul 28 18:54:02 1998 UTC (26 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +37 -36
lines
Add a -U option to select by user/uid.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jul 28 11:41:50 1998 UTC (26 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -5
lines
Be more retentive about use of NOTREACHED and noreturn.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Jul 28 05:31:26 1998 UTC (26 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +8 -3
lines
Delint.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Jul 27 17:06:48 1998 UTC (26 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +8 -5
lines
__AUDIT__ cleanup.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jul 6 07:50:18 1998 UTC (26 years, 6 months ago) by mrg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +14 -5
lines
- change setgid kmem programs (that lend themselves to this) so setegid(getgid())
and the top, and then set the effective gid back to kmem around the call to
kvm_openfiles(). this reduces the time group kmem is available.
- for those above that also allow this, setgid(getgid()) after the call to
kvm_openfiles() to fully revoke priviledges.
- some KNF
- use err(3) over fprintf(3) in some places
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Sep 14 08:57:38 1997 UTC (27 years, 4 months ago) by lukem
Branches: MAIN
CVS tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3
lines
getopt returns -1 not EOF
cleanup manpage
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Jul 20 20:37:57 1997 UTC (27 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +10 -9
lines
Fix compiler warnings
Add WARNS=1
Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Apr 21 05:28:43 1997 UTC (27 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -3
lines
note that strcpy is safe.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Feb 28 13:34:50 1997 UTC (27 years, 10 months ago) by pk
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -3
lines
Message buffer passed to kvm_openfiles() should _POSIX2_LINE_MAX long; PR#3266
Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Sep 27 02:59:53 1996 UTC (28 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -3
lines
Fix SEGV when kludging old-style options.
From Greg Stark <gsstark@mit.edu>, PR #2550.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu May 18 20:33:25 1995 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-PATCH001,
netbsd-1-2-BETA,
netbsd-1-2,
netbsd-1-1-base,
netbsd-1-1-RELEASE,
netbsd-1-1-PATCH001,
netbsd-1-1
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +12 -48
lines
Create and strvis(3) the argument and environment lists only as needed.
Do not keep extra copies around.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu May 18 14:37:03 1995 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +35 -29
lines
Gather the argument and environment lists when we actually want to print them.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Mar 21 09:08:10 1995 UTC (29 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -0
lines
convert to new RCS id conventions.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Sep 16 22:23:31 1994 UTC (30 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +12 -6
lines
Integrate `-c' option, from Arne Juul.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon May 9 03:31:29 1994 UTC (30 years, 8 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-0-base,
netbsd-1-0-RELEASE,
netbsd-1-0-PATCH1,
netbsd-1-0-PATCH06,
netbsd-1-0-PATCH05,
netbsd-1-0-PATCH04,
netbsd-1-0-PATCH03,
netbsd-1-0-PATCH02,
netbsd-1-0-PATCH0,
netbsd-1-0
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +154 -153
lines
clean up import
Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon May 9 03:29:25 1994 UTC (30 years, 8 months ago) by cgd
Branches: WFJ-920714,
CSRG
CVS tags: lite-2,
lite-1
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +159 -146
lines
new ps, to match libkvm
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu May 5 02:04:31 1994 UTC (30 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3
lines
update for changed flags
Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Oct 7 00:46:02 1993 UTC (31 years, 3 months ago) by cgd
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -1
lines
fix from Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>:
don't try to display the resident text size; we can't do that anymore
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Aug 1 18:59:06 1993 UTC (31 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2
lines
Add RCS identifiers.
Revision 1.7.2.2: download - view: text, markup, annotated - select for diffs
Mon Jul 19 11:02:11 1993 UTC (31 years, 6 months ago) by cgd
Branches: netbsd-0-9
Diff to: previous 1.7.2.1: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.1: +499 -0
lines
from Brian Somers <brian@awfulhak.demon.co.uk>:
The kvm entry isn't updated for command unless 'time' is given,
therefore
ps -o command
outputs blank lines [or, in NetBSD, seg faults]
ps -o time,command
works.
Revision 1.7.2.1
Mon Jul 19 11:02:10 1993 UTC (31 years, 6 months ago) by cgd
Branches: netbsd-0-9
FILE REMOVED
Changes since revision 1.7: +0 -499
lines
file ps.c was added on branch netbsd-0-9 on 1993-07-19 11:02:11 +0000
Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Jul 19 11:02:10 1993 UTC (31 years, 6 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-0-9-base,
netbsd-0-9-RELEASE,
netbsd-0-9-BETA,
netbsd-0-9-ALPHA2,
netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2
lines
from Brian Somers <brian@awfulhak.demon.co.uk>:
The kvm entry isn't updated for command unless 'time' is given,
therefore
ps -o command
outputs blank lines [or, in NetBSD, seg faults]
ps -o time,command
works.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Jul 11 17:34:29 1993 UTC (31 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +7 -6
lines
fix alien 'w' handling. you really don't want to know...
Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jun 1 01:38:32 1993 UTC (31 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -4
lines
add support and documentation for the 'e' option, to print out
the process environment.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Mar 23 00:26:40 1993 UTC (31 years, 10 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-alpha-1,
netbsd-0-8
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -1
lines
changed "Id" to "Header" for rcsids
Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Mar 22 08:04:00 1993 UTC (31 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -7
lines
added rcs ids to all files
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Mar 21 18:04:42 1993 UTC (31 years, 10 months ago) by cgd
Branches: MAIN
CVS tags: patchkit-0-2-2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +8 -0
lines
after 0.2.2 "stable" patches applied
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 10 months ago) by cgd
Branches: WFJ-920714,
CSRG
CVS tags: WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0
lines
initial import of 386bsd-0.1 sources
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 10 months ago) by cgd
Branches: MAIN
Initial revision
CVSweb <webmaster@jp.NetBSD.org>