normally succeed (because root can su to anyone), but pam_acct_mgmt()
will most likely fail, causing su to log a confusing "pam_acct_mgmt:
error in service module" message. To avoid this, call getpwnam()
before pam_acct_mgmt().
Sponsored by: registrar.no
calculations. Long longs should never be used, since they break compiling
with C90 compilers and don't necessarily work any better than longs for
avoiding overflow.
Print percentages with another digit of precision since they can be small
and this is easy to do now that the format is floating point.
Restored some more of the old -m output:
Print the percentage of allocated memory that is in use. This is the
amount of memory in active mbufs and mbuf clusters relative to the
total amount of memory soft-allocated for mbufs and mbuf clusters.
Print the percentage of allocated memory that is wired (cached). The
old mbuf allocator never freed memory so printing this value wasn't
useful. A previous version of netstat for the new allocator printed
the in-use amount as a percentage of the wired amount.
Fixed some nearby style bugs (excessive parenthesization and a redundant
return).
Reviewed by: alfred
printf format warnings for inet6.c (pluralies() was implicit int, but
the context requires a "char *").
Added WARNS?=2 to the Makefile so that such errors don't come back.
Added NO_WERROR?= to the Makefile because I haven't checked that setting
WARNS doesn't uncover more bugs except on i386's.
In my last change I made sure that the signal as reported from a truss
exit is the same as if truss wasn't between parent and trussed
program. I was smart enough to not have it coredump on SIGQUIT but it
didn't ocur to me SIGSEGV might cause a coredump, too :-)
So get rid of SIGQUIT extra hack and limit coredumpsize to zero
instead.
Tested: still works, correct signal reported. No more codedumps from
SIGSEGV in the trussed proces. This file compiles cleanly on AMD64
(sledge).
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
overflow was breaking a bunch of the stats, specifically the
percentage displayed for wired memory.
Fix the output for current/peak/max lines, I forgot to output the types.
161/320/51200 (current/peak/max):
-to-
639/25696/51200 mbufs in use (current/peak/max):
using the old 'cached' value but reporting it as 'cached'.
I've decided to report the 'cached' as 'peak', why? Well because
it is the peak, the peak of what is actually allocated. 'cached'
doesn't make sense to me as a user.
terminates. Without this patch, 'make -j1 buildworld' takes about 30%
longer than 'make -B buildworld' on my 2.4 GHz P4; the difference is
probably even larger on faster systems. With this patch, there is no
perceptible difference in wall time between the two.
Submitted by: bde
MFC after: 3 days
- Replace overly-complicated (and buggy) -a logic with a much simpler
version: -a causes all interrupts to be displayed, otherwise only
those that have occurred are displayed. This removes the need for
any MD code.
- Instead of just making sure intrcnt is large enough, figure out the
exact size it needs to be. We derive nintr from this number, and we
don't want to risk printing garbage. Note that on sparc64, we end up
printing garbage anyway because the names of non-existent interrupts
are left uninitialized by the kernel.
Tested on: alpha, i386, sparc64
- sort the -E switch into the right place.
- add previously missing -p pid in usage (from the last few commits).
- add -E to usage.
- consistently use trfile in the man page.
I knew I shouldn't have touched the man page. If I commit to a man page,
it just makes people suspicious. :-)
o nintr and inamlen must by of type size_t, not int,
o Remove now unnecessary casts,
o Handle the aflag differently, because the intr. names have a
fixed width and almost always have trailing spaces.
The use of libkvm for post-mortem analysis is still supported (though it
could use more testing). We can now remove vmstat's setgid bit.
While I'm here, hack the interrupt listing code to not display interrupts
that haven't occurred unless the -a option was given on the command line,
and document this change.
truncated. In environments where many tunnel or vlan interfaces are created,
interface names have high numbers which overflow the field width.
PRs: bin/52349, bin/35838
Submitted by: Mike Tancsa, Scot W. Hetzel
Approved by: re (rwatson)