Up to [cvs.NetBSD.org] / src / bin / ps
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.78 / (download) - annotate - [select for diffs], Mon May 7 13:14:31 2012 UTC (12 months, 2 weeks ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
tls-maxphys-nbase,
tls-maxphys-base,
tls-maxphys,
khorben-n900,
agc-symver-base,
agc-symver,
HEAD
Changes since 1.77: +51 -38
lines
Diff to previous 1.77 (colored)
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.77 / (download) - annotate - [select for diffs], Sun Apr 15 18:10:13 2012 UTC (13 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.76: +3 -3
lines
Diff to previous 1.76 (colored)
Choose better argument name for `-U' (sync with man page). From Bug Hunting in email.
Revision 1.76 / (download) - annotate - [select for diffs], Mon Aug 29 14:51:18 2011 UTC (20 months, 3 weeks ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base
Branch point for: yamt-pagecache,
netbsd-6
Changes since 1.75: +3 -3
lines
Diff to previous 1.75 (colored)
Use __dead
Revision 1.75 / (download) - annotate - [select for diffs], Mon May 31 03:18:33 2010 UTC (2 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Changes since 1.74: +2 -4
lines
Diff to previous 1.74 (colored)
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.74 / (download) - annotate - [select for diffs], Sun Mar 29 01:02:49 2009 UTC (4 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: matt-premerge-20091211,
jym-xensuspend-nbase,
jym-xensuspend-base
Changes since 1.73: +3 -3
lines
Diff to previous 1.73 (colored)
- 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) - annotate - [select for diffs], Sat Feb 14 08:04:10 2009 UTC (4 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.72: +3 -3
lines
Diff to previous 1.72 (colored)
fix -Wsign-compare issues
Revision 1.72 / (download) - annotate - [select for diffs], Sun Dec 28 19:50:22 2008 UTC (4 years, 4 months ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.71: +6 -5
lines
Diff to previous 1.71 (colored)
fix dev_t 64 bit issues.
Revision 1.71 / (download) - annotate - [select for diffs], Fri Sep 26 13:02:42 2008 UTC (4 years, 7 months ago) by wiz
Branch: 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
Changes since 1.70: +5 -5
lines
Diff to previous 1.70 (colored)
Sync usage with man page.
Revision 1.70 / (download) - annotate - [select for diffs], Fri Sep 26 08:09:31 2008 UTC (4 years, 7 months ago) by apb
Branch: MAIN
Changes since 1.69: +8 -4
lines
Diff to previous 1.69 (colored)
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.69 / (download) - annotate - [select for diffs], Sun Jul 20 00:52:40 2008 UTC (4 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2
Changes since 1.68: +4 -4
lines
Diff to previous 1.68 (colored)
Remove the \n and tabs from the __COPYRIGHT() strings.
Revision 1.68 / (download) - annotate - [select for diffs], Mon May 26 14:21:08 2008 UTC (4 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4,
yamt-pf42-base3,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base
Changes since 1.67: +6 -2
lines
Diff to previous 1.67 (colored)
PR/38755: murray armfield: /bin posix programs missing setprogname and/or setlocale
Revision 1.67 / (download) - annotate - [select for diffs], Mon Apr 28 20:22:51 2008 UTC (5 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.66: +2 -9
lines
Diff to previous 1.66 (colored)
Remove clause 3 and 4 from TNF licenses
Revision 1.66 / (download) - annotate - [select for diffs], Mon Mar 10 03:44:11 2008 UTC (5 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base,
matt-armv6-nbase,
keiichi-mipv6-base
Branch point for: yamt-pf42
Changes since 1.65: +5 -4
lines
Diff to previous 1.65 (colored)
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) - annotate - [select for diffs], Sun Feb 10 17:48:00 2008 UTC (5 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: hpcarm-cleanup-base
Branch point for: keiichi-mipv6
Changes since 1.64: +4 -2
lines
Diff to previous 1.64 (colored)
Add a CPUID keyword; idea and some of the code from Anon Ymous
Revision 1.64 / (download) - annotate - [select for diffs], Wed Oct 24 12:10:11 2007 UTC (5 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: matt-armv6-base,
cube-autoconf-base,
cube-autoconf
Changes since 1.63: +7 -7
lines
Diff to previous 1.63 (colored)
make -s alter the default format rather than doing parsefmt. it allows users to use -o to replace it later.
Revision 1.63 / (download) - annotate - [select for diffs], Sat Feb 17 22:49:57 2007 UTC (6 years, 3 months ago) by pavel
Branch: MAIN
CVS Tags: matt-mips64-base,
matt-mips64,
hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.62: +2 -2
lines
Diff to previous 1.62 (colored)
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) - annotate - [select for diffs], Fri Feb 9 22:08:48 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.61: +4 -4
lines
Diff to previous 1.61 (colored)
Sync with kernel changes introduced by merging the newlock2 branch.
Revision 1.61 / (download) - annotate - [select for diffs], Mon Oct 2 17:54:35 2006 UTC (6 years, 7 months ago) by apb
Branch: 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
Changes since 1.60: +32 -18
lines
Diff to previous 1.60 (colored)
* 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) - annotate - [select for diffs], Sat Sep 2 20:00:09 2006 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.59: +22 -11
lines
Diff to previous 1.59 (colored)
factor out the code that does numeric parsing into a function and check for errors properly.
Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 26 19:10:49 2005 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base,
abandoned-netbsd-4
Changes since 1.58: +18 -15
lines
Diff to previous 1.58 (colored)
sprinkle a little const, and now everything compiles with WARNS=3
Revision 1.58 / (download) - annotate - [select for diffs], Wed Jun 1 15:30:33 2005 UTC (7 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.57: +3 -2
lines
Diff to previous 1.57 (colored)
appease gcc -Wuninitialized
Revision 1.57 / (download) - annotate - [select for diffs], Fri Feb 11 18:26:18 2005 UTC (8 years, 3 months ago) by christos
Branch: 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
Changes since 1.56: +4 -3
lines
Diff to previous 1.56 (colored)
allow -t ttyp0 -t p0 -t /dev/ttyp0 -t /dev/pts/0
Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 29 04:44:10 2004 UTC (8 years, 5 months ago) by atatat
Branch: MAIN
Changes since 1.55: +6 -3
lines
Diff to previous 1.55 (colored)
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) - annotate - [select for diffs], Fri Oct 29 19:53:29 2004 UTC (8 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.54: +4 -4
lines
Diff to previous 1.54 (colored)
Add (unsigned char) cast to ctype function
Revision 1.54 / (download) - annotate - [select for diffs], Sat Mar 27 14:09:10 2004 UTC (9 years, 1 month ago) by simonb
Branch: 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
Changes since 1.53: +5 -5
lines
Diff to previous 1.53 (colored)
#define<TAB>
Revision 1.53 / (download) - annotate - [select for diffs], Sat Mar 27 12:44:08 2004 UTC (9 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.52: +4 -3
lines
Diff to previous 1.52 (colored)
Wrap some long lines. Consisently use (void) in front of printf(...); A few more white-space nits.
Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 27 12:09:28 2004 UTC (9 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.51: +21 -28
lines
Diff to previous 1.51 (colored)
KNF, ANSFify, de-__P, unC++ify, white space nits.
Revision 1.51 / (download) - annotate - [select for diffs], Sun Jan 11 18:55:33 2004 UTC (9 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.50: +2 -3
lines
Diff to previous 1.50 (colored)
g/c SDEAD
Revision 1.50 / (download) - annotate - [select for diffs], Thu Aug 7 09:05:24 2003 UTC (9 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.49: +3 -7
lines
Diff to previous 1.49 (colored)
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) - annotate - [select for diffs], Thu Mar 6 09:02:16 2003 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.48: +119 -26
lines
Diff to previous 1.48 (colored)
- 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) - annotate - [select for diffs], Sat Jan 18 10:52:17 2003 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.47: +135 -25
lines
Diff to previous 1.47 (colored)
Merge the nathanw_sa branch.
Revision 1.47 / (download) - annotate - [select for diffs], Wed Jun 19 08:11:56 2002 UTC (10 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge,
nathanw_sa_base,
fvdl_fs64_base
Changes since 1.46: +7 -33
lines
Diff to previous 1.46 (colored)
g/c procfs fallback code, it's redundant now that we use sysctl to get process info
Revision 1.46 / (download) - annotate - [select for diffs], Thu Dec 20 20:10:34 2001 UTC (11 years, 5 months ago) by soren
Branch: 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
Changes since 1.45: +3 -3
lines
Diff to previous 1.45 (colored)
Sync getopt() / man page with actual getopt options.
Revision 1.45 / (download) - annotate - [select for diffs], Sat Nov 3 13:21:09 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.44: +5 -5
lines
Diff to previous 1.44 (colored)
fix minor WARNS=2
Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 30 16:22:49 2001 UTC (11 years, 9 months ago) by wiz
Branch: MAIN
Changes since 1.43: +2 -4
lines
Diff to previous 1.43 (colored)
Remove duplicate `if'. Noted by Geoff C. Wing in bin/13551.
Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 20 21:59:58 2001 UTC (11 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.42: +5 -3
lines
Diff to previous 1.42 (colored)
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) - annotate - [select for diffs], Thu Jun 14 19:04:49 2001 UTC (11 years, 11 months ago) by cyber
Branch: MAIN
Changes since 1.41: +3 -3
lines
Diff to previous 1.41 (colored)
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.41 / (download) - annotate - [select for diffs], Fri Jun 16 03:51:00 2000 UTC (12 years, 11 months ago) by simonb
Branch: 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
Changes since 1.40: +3 -3
lines
Diff to previous 1.40 (colored)
Don't check namelist when choosing to use the sysctl interface.
Revision 1.40 / (download) - annotate - [select for diffs], Thu Jun 8 13:30:40 2000 UTC (12 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.39: +53 -10
lines
Diff to previous 1.39 (colored)
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) - annotate - [select for diffs], Wed Jun 7 04:58:01 2000 UTC (12 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.38: +33 -20
lines
Diff to previous 1.38 (colored)
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) - annotate - [select for diffs], Fri May 26 03:04:28 2000 UTC (12 years, 11 months ago) by simonb
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.37: +39 -101
lines
Diff to previous 1.37 (colored)
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.37 / (download) - annotate - [select for diffs], Sat Apr 29 00:18:48 2000 UTC (13 years ago) by abs
Branch: MAIN
Changes since 1.36: +3 -5
lines
Diff to previous 1.36 (colored)
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) - annotate - [select for diffs], Sat Apr 15 04:40:46 2000 UTC (13 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.35: +15 -8
lines
Diff to previous 1.35 (colored)
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) - annotate - [select for diffs], Mon Apr 10 06:37:37 2000 UTC (13 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.34: +3 -2
lines
Diff to previous 1.34 (colored)
make -M imply -K. the current system is not likely to be a reasonable approximation of a crash dump.
Revision 1.34 / (download) - annotate - [select for diffs], Sat Dec 4 01:23:09 1999 UTC (13 years, 5 months ago) by hubertf
Branch: MAIN
CVS Tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221
Changes since 1.33: +3 -3
lines
Diff to previous 1.33 (colored)
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) - annotate - [select for diffs], Fri Dec 3 02:16:41 1999 UTC (13 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.32: +4 -3
lines
Diff to previous 1.32 (colored)
"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) - annotate - [select for diffs], Tue Nov 9 15:06:31 1999 UTC (13 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.31: +4 -4
lines
Diff to previous 1.31 (colored)
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.31 / (download) - annotate - [select for diffs], Fri Oct 15 20:39:52 1999 UTC (13 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: comdex-fall-1999-base,
comdex-fall-1999
Changes since 1.30: +4 -3
lines
Diff to previous 1.30 (colored)
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) - annotate - [select for diffs], Fri Oct 15 20:01:33 1999 UTC (13 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.29: +4 -4
lines
Diff to previous 1.29 (colored)
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) - annotate - [select for diffs], Fri Oct 15 19:31:25 1999 UTC (13 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.28: +42 -17
lines
Diff to previous 1.28 (colored)
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) - annotate - [select for diffs], Sat Mar 27 21:38:08 1999 UTC (14 years, 1 month ago) by bgrayson
Branch: MAIN
CVS Tags: netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH001
Branch point for: wrstuden-devbsize,
netbsd-1-4
Changes since 1.27: +22 -26
lines
Diff to previous 1.27 (colored)
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) - annotate - [select for diffs], Fri Mar 26 22:36:02 1999 UTC (14 years, 1 month ago) by bgrayson
Branch: MAIN
Changes since 1.26: +41 -3
lines
Diff to previous 1.26 (colored)
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) - annotate - [select for diffs], Mon Jan 4 16:37:28 1999 UTC (14 years, 4 months ago) by kim
Branch: MAIN
Changes since 1.25: +7 -7
lines
Diff to previous 1.25 (colored)
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) - annotate - [select for diffs], Tue Jul 28 18:54:02 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +37 -36
lines
Diff to previous 1.24 (colored)
Add a -U option to select by user/uid.
Revision 1.24 / (download) - annotate - [select for diffs], Tue Jul 28 11:41:50 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +3 -5
lines
Diff to previous 1.23 (colored)
Be more retentive about use of NOTREACHED and noreturn.
Revision 1.23 / (download) - annotate - [select for diffs], Tue Jul 28 05:31:26 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +8 -3
lines
Diff to previous 1.22 (colored)
Delint.
Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 27 17:06:48 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +8 -5
lines
Diff to previous 1.21 (colored)
__AUDIT__ cleanup.
Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 6 07:50:18 1998 UTC (14 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.20: +14 -5
lines
Diff to previous 1.20 (colored)
- 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) - annotate - [select for diffs], Sun Sep 14 08:57:38 1997 UTC (15 years, 8 months ago) by lukem
Branch: 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
Changes since 1.19: +3 -3
lines
Diff to previous 1.19 (colored)
getopt returns -1 not EOF cleanup manpage
Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 20 20:37:57 1997 UTC (15 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.18: +10 -9
lines
Diff to previous 1.18 (colored)
Fix compiler warnings Add WARNS=1
Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 21 05:28:43 1997 UTC (16 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.17: +4 -3
lines
Diff to previous 1.17 (colored)
note that strcpy is safe.
Revision 1.17 / (download) - annotate - [select for diffs], Fri Feb 28 13:34:50 1997 UTC (16 years, 2 months ago) by pk
Branch: MAIN
Changes since 1.16: +4 -3
lines
Diff to previous 1.16 (colored)
Message buffer passed to kvm_openfiles() should _POSIX2_LINE_MAX long; PR#3266
Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 27 02:59:53 1996 UTC (16 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +3 -3
lines
Diff to previous 1.15 (colored)
Fix SEGV when kludging old-style options. From Greg Stark <gsstark@mit.edu>, PR #2550.
Revision 1.15 / (download) - annotate - [select for diffs], Thu May 18 20:33:25 1995 UTC (18 years ago) by mycroft
Branch: 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
Changes since 1.14: +12 -48
lines
Diff to previous 1.14 (colored)
Create and strvis(3) the argument and environment lists only as needed. Do not keep extra copies around.
Revision 1.14 / (download) - annotate - [select for diffs], Thu May 18 14:37:03 1995 UTC (18 years ago) by mycroft
Branch: MAIN
Changes since 1.13: +35 -29
lines
Diff to previous 1.13 (colored)
Gather the argument and environment lists when we actually want to print them.
Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 21 09:08:10 1995 UTC (18 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.12: +6 -0
lines
Diff to previous 1.12 (colored)
convert to new RCS id conventions.
Revision 1.12 / (download) - annotate - [select for diffs], Fri Sep 16 22:23:31 1994 UTC (18 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +12 -6
lines
Diff to previous 1.11 (colored)
Integrate `-c' option, from Arne Juul.
Revision 1.11 / (download) - annotate - [select for diffs], Mon May 9 03:31:29 1994 UTC (19 years ago) by cgd
Branch: 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
Changes since 1.10: +154 -153
lines
Diff to previous 1.10 (colored)
clean up import
Revision 1.10 / (download) - annotate - [select for diffs], Thu May 5 02:04:31 1994 UTC (19 years ago) by cgd
Branch: MAIN
Changes since 1.9: +3 -3
lines
Diff to previous 1.9 (colored)
update for changed flags
Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 7 00:46:02 1993 UTC (19 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.8: +5 -1
lines
Diff to previous 1.8 (colored)
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) - annotate - [select for diffs], Sun Aug 1 18:59:06 1993 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +2 -2
lines
Diff to previous 1.7 (colored)
Add RCS identifiers.
Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 19 11:02:10 1993 UTC (19 years, 10 months ago) by cgd
Branch: 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
Changes since 1.6: +2 -2
lines
Diff to previous 1.6 (colored)
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) - annotate - [select for diffs], Sun Jul 11 17:34:29 1993 UTC (19 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.5: +7 -6
lines
Diff to previous 1.5 (colored)
fix alien 'w' handling. you really don't want to know...
Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 1 01:38:32 1993 UTC (19 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.4: +9 -4
lines
Diff to previous 1.4 (colored)
add support and documentation for the 'e' option, to print out the process environment.
Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 23 00:26:40 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1,
netbsd-0-8
Changes since 1.3: +1 -1
lines
Diff to previous 1.3 (colored)
changed "Id" to "Header" for rcsids
Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 22 08:04:00 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -7
lines
Diff to previous 1.2 (colored)
added rcs ids to all files
Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2
Changes since 1.1: +8 -0
lines
Diff to previous 1.1 (colored)
after 0.2.2 "stable" patches applied
Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (20 years, 2 months ago) by cgd
Branch: MAIN
Initial revision