drochner
85cbf55d16
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.
1999-11-09 15:06:30 +00:00
jdolecek
a5ae7c6ca4
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
1999-10-15 20:39:52 +00:00
jdolecek
e52880e76a
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
1999-10-15 20:01:33 +00:00
jdolecek
f848d2ec0c
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.
1999-10-15 19:31:24 +00:00
mrg
fdea8ae38f
skip "dty" just like we skip "tty", otherwise we just get "dt" in ps output for all dty's
1999-10-11 09:18:09 +00:00
chs
21eedb0ec1
the PMAP_NEW option is gone as the new interface is no longer optional.
1999-09-12 01:19:23 +00:00
veego
03fd106af5
According to the previous commit the new process state should be SDEAD and
...
not SDYING, so s/SDYING/SDEAD/.
1999-07-23 08:56:13 +00:00
thorpej
3586621927
Update for SDEAD.
1999-07-22 18:16:05 +00:00
thorpej
907831a0b3
KNF.
1999-05-09 19:23:38 +00:00
mrg
c0999a71b0
oops, fix merge botch in previous..
1999-05-03 00:20:07 +00:00
mrg
d5c7180e2b
limit session to 6 chars. from Geoff Wing <gcw@pobox.com> and fixes his PR#7506
1999-05-03 00:17:30 +00:00
christos
f3d0eddcde
Add support for printing wide sigset_t properly.
1999-04-16 13:34:32 +00:00
bgrayson
2721f671ab
- Be really paranoid. Any time we open a file that is in /proc, run
...
fstatfs() on the open file to verify that no intruder has mounted
something on portions of /proc. This will catch, for instance,
"mount_null /tmp /proc/1378". We already do 5 syscalls per
process, so one more won't hurt :) ... and safety is better than
performance when ps is otherwise broken.
- Also added a few close()'s at early returns, to avoid chewing up fd's.
1999-03-28 00:46:47 +00:00
bgrayson
05e0706ac9
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.
1999-03-27 21:38:08 +00:00
tron
0ee6a66c30
Add missing prototype so that this actually compiles.
1999-03-27 15:22:17 +00:00
bgrayson
be8534f744
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.
1999-03-26 22:36:02 +00:00
mrg
d2397ac5f7
completely remove Mach VM support. all that is left is the all the
...
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
garbled
f124765044
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
...
so we shouldn't override it with versions in the manpages. Many more to
come.
1999-03-22 18:25:43 +00:00
msaitoh
0a51b829fa
ps's information is sorted by controlling terminal and (among processes with
...
the same controlling terminal) by PID.
1999-03-17 20:59:55 +00:00
mycroft
f6590b22cd
Clean up SYNOPSIS formatting.
1999-03-07 11:02:05 +00:00
mycroft
7a981b1dc5
Fix formatting errors.
1999-03-07 10:48:31 +00:00
kim
26cc4401e8
Fixed segfaulting for "ps -T". There is no optarg with -T, so instructions
...
under label "tty:" need to use ttname instead.
1999-01-04 16:37:28 +00:00
tron
29fe5bf18a
The system namelist database is called "/var/db/kvm.db" not
...
"/var/db/kvm_netbsd.db". Fixes PR bin/6712 by Brian Grayson.
1999-01-02 16:11:43 +00:00
tv
8cfe18e8d3
Add CWARNFLAGS+=-Wno-format-y2k.
1998-08-25 15:13:16 +00:00
ross
17dbc471f0
Kill the CFLAGS+=-Wno-format-y2k which will go, for now, into bsd.sys.mk
...
It wasn't working anyway, although that could have been fixed by moving it
down below the .include <bsd.prog.mk> line.
It's not completely clear that this usage of %y is in fact y2k-safe, it
seems safer for now to have a single XXX option in bsd.sys.mk, and we need
to rev this anyway for -Wno-uninitialized
1998-08-25 07:43:20 +00:00
tv
19bef08688
This needs strftime()'s %y; use -Wno-format-y2k.
1998-08-21 19:39:41 +00:00
mycroft
975ed85295
Add a -U option to select by user/uid.
1998-07-28 18:54:02 +00:00
mycroft
37e6d2f31d
Look for the formats used by setproctitle(3) and login shells, and avoiding
...
outputting the redundant `(comm)'.
1998-07-28 18:41:59 +00:00
mycroft
ee9e50eacb
Be more retentive about use of NOTREACHED and noreturn.
1998-07-28 11:41:40 +00:00
mycroft
9dc385beb1
Delint.
1998-07-28 05:31:22 +00:00
mycroft
0e2f9ea923
__AUDIT__ cleanup.
1998-07-27 17:06:48 +00:00
mrg
80efe80bc9
- 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
1998-07-06 07:50:18 +00:00
fair
fe40034fae
change references to vadvise to madvise; remove reference to lisp(1)
1998-04-28 17:59:10 +00:00
kleink
15fbf68ce9
Need <time.h> for localtime(), time() and strftime() prototypes.
1998-04-01 14:19:27 +00:00
is
07a1b88ab8
Use the physmem variable to get at the physical memory size (instead of the
...
avail_end - avail_start difference which is only correct on machines with
contiguous memory).
1998-03-27 22:45:47 +00:00
bouyer
a394682ff6
Sync with reality: the uprocp keyword doesn't exist.
1998-03-24 18:34:12 +00:00
perry
ba7b5f16ff
add -DPMAP_NEW if PMAP_NEW is on in mk.conf
1998-02-18 03:54:58 +00:00
thorpej
047098bc5c
Add a "sid" keyword to print the session ID.
1998-02-17 21:37:56 +00:00
mrg
279ce528ce
add -DUVM to CPPFLAGS if defined(UVM)
1998-02-09 06:25:15 +00:00
mrg
79ddb78a38
remove old OLD BSD VM code.
1998-02-06 04:47:30 +00:00
gwr
54bd1bef90
Begone KERNBASE! (Just print kernel pointers as-is.)
1998-02-05 03:51:16 +00:00
perry
2850c7f9f7
add <sys/time.h> to fix compiler error
1998-02-03 03:16:01 +00:00
perry
0a9d9a55b9
RCS Id Police.
1998-01-09 07:00:57 +00:00
enami
3068d97149
Use .Nm "" instead of .Nm ps in SYNOPSIS.
1997-10-11 02:16:56 +00:00
lukem
76e13a0128
all but the first .Nm in SYNOPSIS need to be spelt out. [bin/4256]
1997-10-10 16:12:45 +00:00
lukem
a234ba3ffe
getopt returns -1 not EOF
...
cleanup manpage
1997-09-14 08:57:37 +00:00
mikel
2179735ae5
default swap device is /dev/drum, not nonexistent /dev/swap; from
...
<entropy@tardis.bernstein.com> in PR bin/4042
1997-08-27 05:43:20 +00:00
mikel
6e662001bc
use %c not %C for lstart; from tetsuya@secom-sis.co.jp via OpenBSD
1997-08-03 01:57:04 +00:00
christos
23edbe3557
Remove WARNS=1 from all the subdirectory Makefiles, and add it to Makefile.inc
...
now that all /bin has been cleaned.
1997-07-20 22:36:20 +00:00
christos
78295c8bc1
Fix compiler warnings
...
Add WARNS=1
1997-07-20 20:37:53 +00:00