| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
the PRI_ITHD case (instead of just printing the digit '1').
Submitted by: Cyrille Lefevre
|
|
|
|
|
| |
an invalid <dev> is specified. Aside: It turns out that the S_ISCHR()
check is true for almost every device that we have (not just tty's).
|
|
|
|
|
|
|
|
| |
rev 1.18, but not documented in the man page) caused a failed chdir.
Otherwise, one can easily overwrite files.
Submitted by: Robert Nagy <robert@openbsd.org>
Obtained from: OpenBSD
|
|
|
|
|
|
| |
up checking the wrong variable for NULL.
Submitted by: bde
|
|
|
|
| |
in addition to "/dev/ttyp0" or "p0" and "/dev/console" or "co".
|
|
|
|
|
|
| |
using it's own version of the same basic algorithm.
Submitted by: part by Cyrille Lefevre, part of it done by me
|
|
|
|
|
|
|
| |
(aka "command") will display "<defunct>", as does the output from "comm"
for those processes. Also do better checking for malloc() failures.
Submitted by: Cyrille Lefevre
|
|
|
|
| |
Submitted by: Cyrille Lefevre
|
|
|
|
|
|
| |
is scaled in the same way that "pri" (scheduling priority) is scaled.
Submitted by: Cyrille Lefevre
|
|
|
|
| |
Submitted by: Cyrille Lefevre
|
|
|
|
| |
Submitted by: Cyrille Lefevre
|
|
|
|
|
|
| |
line after the empty variable declarations.
Reviewed by: md5
|
|
|
|
|
|
|
|
| |
the [acm]time are the same. I was going to use Scott's patch, but I
couldn't get the style quite right, so I used a patch of my own.
Submitted by: Scott Mitchell <scott+freebsd at fishballoon.org>
MFC after: 3 weeks
|
| |
|
|
|
|
| |
other files that I am not ready to commit yet...
|
|
|
|
|
| |
PR: bin/65803
Submitted by: Cyrille Lefevre
|
|
|
|
|
|
|
|
|
|
| |
threads, put the command name in square brackets instead of parenthesis.
This matches NetBSD, and also seems to be what linux does. The sentence
which is added to the man page is taken straight from NetBSD.
PR: bin/65803
Submitted by: Cyrille Lefevre
Obtained from: NetBSD
|
|
|
|
|
|
|
| |
kvm_getprocs() will provide useful information if it can, or *it*
will provide a zero value if it can not find something appropriate.
Submitted by: bde
|
|
|
|
|
|
|
|
| |
emulation environment the process is in. "emul" as a keyword is picked
up from OpenBSD.
PR: bin/65803
Submitted by: Cyrille Lefevre
|
|
|
|
|
|
|
|
|
|
|
| |
Any [standard output] field need not be meaningful in all
implementations. In such a case a hyphen ('-') should be
output in place of the field value
So have the `-O label' option print out the string " -" if the
process has no label.
Approved by: Silence from rwatson and green (when asked in March...)
|
|
|
|
|
|
|
|
|
|
| |
and number-of-threads tied to a process. Result can be seen by typing,
e.g.: ps -HO lwp,nlwp
These new options are not documented yet. More options will be coming,
and I will update the man page after I get farther along.
PR: bin/65803 (though adjusted to fit our present source)
Submitted by: Cyrille Lefevre
|
|
|
|
|
|
|
| |
when copying per-process info before starting to sort the list. This way,
sort-by-CPU or sort-by-memory will only calculate values once-per-process,
instead of twice-per-comparison. Also take advantage of this to simplify
the pscomp() routine.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have no entries to print (either due to an empty directory or an
error). This makes the -l and -s options more consistent, like
Solaris and (Debian) Linux. To make this happen, tweak two
optimizations on the second call to display():
- Don't skip display() altogether, even if list == NULL.
- Don't skip the call to the printfn in display() if we
need to print the total.
PR: 45723
|
|
|
|
|
| |
if there are no entries, these functions may be called to print the
total number of blocks (0) for consistency's sake.
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
| |
Inspired by: SUSv3
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
instances of 64-bit arithmetic were costing 775 bytes, and the
inlining offered no benefit. Moreover, ambiguity as to the argument
types led to the introduction of a bug (see rev 1.56).
Also, remove some casts that are now clearly redundant.
Inspired by: 67467
|
|
|
|
|
|
| |
PR: bin/67392
Submitted by: Matthew Emmerton <matt@gsicomp.on.ca>
MFC in: 1 week
|
|
|
|
|
| |
his eyes at quite so much... (actually someone else pointed this out
to me a long time ago, but apparently I never fixed it)
|
|
|
|
|
|
| |
is to drop a call to setuid() which has not been needed for years.
Noticed by: bde
|
|
|
|
|
| |
remove the #ifdef for it for now. I might add the feature for real at
some later date, there isn't much reason for the #ifdef for now.
|
|
|
|
| |
Noticed by: bde
|
|
|
|
|
|
|
| |
process id, instead of using pid==0. Ie, `ps -p 12,' and `ps -p ,12'
are now errors (instead of being treated like `ps -p 0 -p 12').
Noticed by: Cyrille Lefevre on freebsd-arch
|
|
|
|
|
|
|
|
| |
is treated like `ps -t p0', instead of changing it to `ps -T p0'.
Note that `ps t' is still changed to `ps -T', since that is one of
the main reasons for this kludge processing...
Noticed by: Jilles Tjoelker on freebsd-arch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more special situations. This is the code which process `ps blah',
when "blah" does not include a leading '-'.
This change also removes a long-undocumented BACKWARD_COMPATIBILITY
compile-time option, where:
ps -options arg1 arg2
(with no '-' on "arg1" and "arg2") was treated as:
ps -options -N arg1 -M arg2
This also changes `ps' to check for any additional arguments after
processing all the '-'-options, and attempt to use those arguments as
a pid or pidlist. If an extra argument is not a valid pidlist, then
`ps' will print an error and exit. This seems a more generally useful
extension of the kludge-option processing than the -N/-M behavior, and
has fewer confusing side-effects.
Reviewed by: freebsd-arch
|
|
|
|
| |
Reminded by: jhb
|
| |
|
| |
|
|
|
|
| |
Approved by: das (mentor)
|
|
|
|
|
|
|
| |
(session-pointer) info which was dropped from `ps' earlier in 5.x.
PR: bin/59423
Submitted by: Jilles Tjoelker
|
|
|
|
|
|
|
|
| |
same as `ps -tpt', instead of being changed into `ps -tpT'.
PR: bin/52489
Submitted by: Jilles Tjoelker
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
(if trying to match only one real-group or one session-id), now that
those options are implemented in src/sys/kern/kern_proc.c (v1.203).
PR: bin/65803 (a very tiny piece of the PR)
Submitted by: Cyrille Lefevre
|
| |
|
| |
|
| |
|
|
|
|
| |
Minor markup tweaks.
|
| |
|