Commit graph

6481 commits

Author SHA1 Message Date
David Malone 1bc99f1144 Move declarations of Procfd to a header file. 2004-01-07 14:29:45 +00:00
David Malone 9b83b9f75c Fix a printf format warning. 2004-01-07 14:27:30 +00:00
Jacques Vidrine d48ff1e438 Mark a function as `unused' in generated code. (Sometimes it is used,
sometimes it is not, depending upon the input grammar.)
2004-01-06 19:03:44 +00:00
Jacques Vidrine d179cf2207 Work around a `label defined but not used' warning in *generated* code. 2004-01-06 18:54:55 +00:00
Dag-Erling Smørgrav 60f4b54d8f When root tries to su to a non-existent user, pam_authenticate() will
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
2004-01-06 09:47:24 +00:00
Philippe Charnier 0a2956bbc0 Correct reference to a non existant man page. 2004-01-04 16:34:16 +00:00
Philippe Charnier ca802a8abe Avoid using .Nm at the start of the sentence. 2004-01-04 15:33:06 +00:00
Greg Lehey ca3692455f Remove inappropriate reference to USSR. 2004-01-01 23:32:07 +00:00
Andrey A. Chernov db785f7f72 Fix typo in prev commit 2003-12-31 18:01:31 +00:00
Andrey A. Chernov d784f97cd2 Remove incorrect holiday, add new one, fix another one 2003-12-31 18:00:01 +00:00
Bruce Evans 9e53fb7dc8 Use floating point instead of unsigned long longs in percentage
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
2003-12-29 08:25:32 +00:00
Bruce Evans aa54e1ecc5 Fixed missing declaration of pluralies(). This showed up as strange
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.
2003-12-29 04:41:38 +00:00
Bruce Evans 3e15599181 Fixed style bugs created in rev.1.27 by removing "__P(" and its closing ")"
without removing the space before it.
2003-12-29 04:34:36 +00:00
Alex Dupre ab05eab129 Add my birthdate (gifts are welcome :-)).
Approved by:	blackend (mentor)
2003-12-28 18:13:57 +00:00
Mike Silbersack 6171a2800d Teach netstat about the new sendfile statistics. 2003-12-28 08:59:41 +00:00
Martin Cracauer 5cdf6a132b Fix signal behaviour.
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:
2003-12-28 01:20:03 +00:00
Mike Silbersack 18258f6d7a Clean up the style of the previous commit, and fix a few
type mismatches as well.

Suggested by:	bde
2003-12-27 09:02:31 +00:00
Mike Silbersack 8db142fa03 Teach netstat to read and display the new sfbuf statistics. 2003-12-27 07:58:31 +00:00
Alfred Perlstein 1164d324ea Fix percentages by using long long to hold values for 'space',
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):
2003-12-26 18:47:41 +00:00
Maxim Konovalov 3de7e68ab4 More holidays in .ru, fixes, strip redundant prefix.
Submitted by:	osa
2003-12-26 13:04:13 +00:00
David Malone 67206e04f9 Remove an unused variable.
Add some missing constness.
2003-12-25 01:32:55 +00:00
Mike Silbersack ba2bc772d1 Make systat -net aware of compressed time_wait sockets. 2003-12-24 08:54:53 +00:00
Alfred Perlstein 7a744a48d2 I asked Bosko Milekic for help with 'peak' reporting, and he suggested
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.
2003-12-23 14:06:24 +00:00
Alfred Perlstein dbe0253a8b Restore old netstat -m output.
A new flag '-c' can be used to ask for the cache stats.
2003-12-23 13:24:03 +00:00
Maksim Yevmenkin 263a3a25b1 Fix a couple of stylistic issues
Reviewed by: imp (mentor), ru
Approved by: imp (mentor)
2003-12-22 22:50:21 +00:00
Maksim Yevmenkin 4b1493e53d Fix uncontrolled access to the buffer in rfcomm_sppd(1).
Fix typo in hcsecd(8) man page.

Submitted by: Guido Falsi <mad@madpilot.net>
Reviewed by: imp (mentor)
Approved by: imp (mentor)
2003-12-19 18:15:56 +00:00
Scott Long d11fc0ae6f Change the select timeout from 100ms to 2 seconds now that SIGCHILD is
handled.
2003-12-19 11:18:37 +00:00
Maxim Konovalov cf8bfa740b Add a bunch of Russian holidays.
PR:		docs/50013
Submitted by:	osa
2003-12-15 11:51:26 +00:00
Dag-Erling Smørgrav 4358431405 Install a SIGCHLD handler so select(2) will be interrupted when a child
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
2003-12-13 15:26:27 +00:00
Bruce Evans 06849fd97a Fixed misplacement of __FBSDID(). Backed out editing of vendor id lines.
Just wrap them in #if 0...#endif.
2003-12-11 10:58:29 +00:00
Dag-Erling Smørgrav 56f9b09632 Revert part of revision 1.74 after bde reminded me of a detail I'd
forgotten about how sysctl works.  This removes a potential (though
not very likely) race that 1.74 introduced.
2003-12-11 07:46:08 +00:00
Dag-Erling Smørgrav 1b62c2410d Whitespace cleanup. 2003-12-10 22:19:19 +00:00
Dag-Erling Smørgrav dc4ed4fe11 Remove debugging printf 2003-12-10 22:14:32 +00:00
Dag-Erling Smørgrav eb23b4e6cd Document the simpler -a semantics. 2003-12-10 22:12:06 +00:00
Dag-Erling Smørgrav 7d268144f1 Fix a couple of issues in the interrupt code:
- 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
2003-12-10 22:11:51 +00:00
Dag-Erling Smørgrav 3c455bcacc s/u_(int|long)\>/unsigned \1/ 2003-12-10 21:43:10 +00:00
David Malone e38926c160 Fix a couple of warnings (const a function parameter and change some
ints to size_ts to better match the types of variables they are used
with).

Glanced at by:	des
2003-12-10 19:24:11 +00:00
Maxim Konovalov 89dff38285 Use .St -susv2 rather than "The Single UNIX specification".
Submitted by:	osa
2003-12-10 10:52:48 +00:00
Peter Wemm 24b648094d First pass at attempted debrucification:
- 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. :-)
2003-12-08 22:47:59 +00:00
Marcel Moolenaar 7e00080caa Unbreak vmstat -i on ia64:
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.
2003-12-08 07:57:57 +00:00
Maxime Henrion ec912781bb The uuidgen(1) program is WARNS=6 clean, so flag it as such.
Tested on:	i386, sparc64
2003-12-07 21:34:56 +00:00
Dag-Erling Smørgrav c51633823d Finish the transition from libkvm to sysctl that I started a while ago.
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.
2003-12-07 17:46:14 +00:00
Peter Wemm ec13191464 Add a -E (elapsed time) flag to kdump. This is like -T, except it is
relative to start of the dump.

Approved by:  re (scottl)
2003-12-07 01:06:32 +00:00
Greg Lehey 6edf37b0f2 Add Japan's real entry into the Second World War.
http://www.abcmalaysia.com/tour_malaysia/kltn_japivsn.htm
2003-12-06 22:49:30 +00:00
Bruce M Simpson 25d295e1ed Fix some minor nits in netstat whereby large interface names would be
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)
2003-11-28 17:34:23 +00:00
Christian Brueffer 5bd361ab30 Grammar, spelling and punctuation sweep.
Approved by:	re (rwatson)
2003-11-26 08:38:32 +00:00
David E. O'Brien 144ca80367 /rescue/b{,un}zip exists, so build this dynamically now. 2003-11-17 05:19:37 +00:00
Tim J. Robbins 3bfa61d221 Update cross references after utf2/euc move. 2003-11-15 02:49:53 +00:00
Marcel Moolenaar 4e92419dcd Do not ignore any possible errors that fseeko() may have. The fact
is that fseeko() fails in very predictable and frequent ways on ia64.
This is because the offset is actually an address in the process'
address space, which on ia64 can be larger than long (for lseek) or
off_t (for fseeko). The crux is the signedness. The register stack
and memory stack are in region 4 on ia64. This means that the sign bit
is 1. The large positive virtual address is wrongly interpreted as
a negative file offset.

There's no quick fix. Even if you get around the API by using a
SEEK_SET up to LONG_MAX and follow it up with a SEEK_CUR for the
remainder, the kernel simply cannot deal with it. and the second
seek will just fail.

Therefore, this change does not actually fix the root cause. It just
makes sure we're not spitting out all kinds of garbage or that the
get_struct() function in particular does not cause truss(1) to exit.
This, I might add, invariably happened way too soon for truss(1) to
be of any use on ia64...
2003-11-13 09:04:24 +00:00
John-Mark Gurney 25d136776e make minimum column size for interrupt name be the heading (depends upon
Total being shorter than interrupt)..

Pointed out by:	bde
2003-11-09 20:39:56 +00:00