Commit Graph

10493 Commits

Author SHA1 Message Date
Navdeep Parhar
913f53dc29 Catch up with r238925. ktr_entries may not be a power of 2. 2012-10-30 21:10:06 +00:00
Edward Tomasz Napierala
92f798418c Add pcpu to the the rctl(8) manual page. 2012-10-26 16:03:13 +00:00
David E. O'Brien
6cff4e07c1 Add "-f" to also output filemon(4) information. 2012-10-26 15:56:28 +00:00
Eitan Adler
3952727d79 Prefer an example users born after myself might use.
Approved by:	bcr (mentor)
MFC after:	3 days
2012-10-26 15:21:23 +00:00
Simon J. Gerraty
93036677b5 Merge bmake-20121010
Approved by:	marcel (mentor)
2012-10-25 23:18:05 +00:00
Alfred Perlstein
504a74fa90 Show the number of times we block waiting for mbufs.
Machines can stall out because mbufs are low, however sometimes we won't
see "requests denied", instead we see user land processes or kernel threads
blocking waiting for mbufs because they set M_WAIT.  These consumers do not
see errors, only stalling.

Unfortunately until now, netstat did not export this information
so you could have experienced an mbuf shortage and have no way of
seeing it unless you happen to run netstat at the exact time of the
shortage and see "in use" = "max".

By exporting the number of times processes are blocked, we can
effectively see how often non-interrupt context threads are effectively
"denied".

MFC after: 2 weeks
2012-10-25 02:12:05 +00:00
David E. O'Brien
13f02f28c8 Don't include both <sys/param.h> & <sys/types.h>. 2012-10-23 23:36:29 +00:00
Eitan Adler
25c1da1567 Somehow this got replicated too many times
Approved by: cperciva (implicit)
2012-10-22 12:05:14 +00:00
Eitan Adler
2beb708522 Add a clean-room reimplementation of a script originally
found in openssh's contrib directory.

This version has more features and is better written.
I intend to submit this upstream as well.

Reviewed by:	bapt
Reviewed by:	des
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:57:00 +00:00
Eitan Adler
1d1d4a4727 Check the return error of set[ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.  Custom
security modules, or future implementations of the setuid and setgid
may fail.

PR:		bin/172289
PR:		bin/172290
PR:		bin/172291
Submittud by:	Erik Cederstrand <erik@cederstrand.dk>
Discussed by:	freebsd-security
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:31:22 +00:00
Eitan Adler
50e04779c4 Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by:	Erik Cederstrand
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:07:05 +00:00
Eitan Adler
398de06dcb Remove unused variable. Newer versions of gcc care.
Submitted by:	Sascha Wildner <saw@online.de>
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:59:59 +00:00
Eitan Adler
fbe37851ff Fix conditional expression: previously a bitvector would be operated
on by a logical not.

Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:59:44 +00:00
Eitan Adler
5d08632eba Mark bsdar_errc as __dead2 to help code analysis tools.
PR:		bin/172636
Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:06 +00:00
Marcel Moolenaar
c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Andreas Tobler
6f1a642726 Fix build. 2012-10-21 08:38:55 +00:00
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Ulrich Spörlein
cc4842a1c7 Apply local patches to mandoc and connect it to the build.
- adds a couple more library strings used in the tree
- changes some more to the current groff spelling
- changes page footer to match groff style
2012-10-20 10:06:38 +00:00
Ulrich Spörlein
e4d7d10517 Merge mandoc from vendor into contrib and provide the necessary Makefile glue.
It's not yet connected to the build.
2012-10-19 22:21:01 +00:00
Marcel Moolenaar
21eb01cbce Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-10-19 19:56:17 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Ed Schouten
39893d565a Add missing const keywords. 2012-10-19 14:29:03 +00:00
John Baldwin
b49af68ca0 Correct the order of the MFU and MRU labels. I had reversed them.
Submitted by:	Nikolay Denev  ndenev gmail
Pointy hat to:	jhb
MFC after:	3 days
2012-10-19 12:28:26 +00:00
Ed Schouten
9a41df2a0e Remove WARNS=6 lines.
WARNS=6 is already implied at this point.
2012-10-18 15:39:29 +00:00
Attilio Rao
2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
2012-10-18 12:04:56 +00:00
Attilio Rao
e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
2012-10-17 11:16:17 +00:00
David E. O'Brien
22ddf6d447 Obey the value of "MK_BMAKE". 2012-10-16 15:43:16 +00:00
Gabor Kovesdan
d38ae94bce - Remove GNU sort and the WITH_GNU_SORT knob 2012-10-13 18:40:39 +00:00
Ed Maste
b6eec535d3 Use CLOCK_UPTIME to get the uptime. 2012-10-12 15:03:28 +00:00
Joel Dahl
aee53c332e Remove contractions. 2012-10-07 20:01:41 +00:00
Andriy Gapon
09606b760a make: report :M or :N pattern in debug mode
MFC after:	12 days
2012-10-06 19:19:32 +00:00
Marcel Moolenaar
d4d90f10bc Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@juniper.net)
2012-10-06 19:19:21 +00:00
Martin Cracauer
93a2fe45a6 Allow time offsets to be negative, e.g. at 1530 - 15 minutes.
This is useful if you have been given some time for some event in some
format and you want your computer to do something to prepare for it.
Without having to do time arithmetic in a shellscript.

The syntax matches what the at(1) usually used on Linux supports.
2012-10-05 17:54:27 +00:00
Eitan Adler
8e0079a07a Implement the Sun/GNU extension of using a default
prefix when no arguments are supplied.

Reviewed by:	jilles
Approved by:	cperciva
MFC after:	1 week
2012-10-02 00:30:26 +00:00
Eitan Adler
bf38ffc95f add SG state type
PR:		bin/171664
Submitted by:	Jan Beich jbeich@tormail.org
Approved by:	cperciva
MFC after:	1 week
2012-10-02 00:30:20 +00:00
Kevin Lo
e81fdb14a9 Add missing va_end. 2012-09-29 16:19:01 +00:00
Kevin Lo
ba670ce023 Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-09-28 07:51:30 +00:00
Matthew D Fleming
b424efd5b1 Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t.
Original code by:	Gleb Kurtsou
2012-09-27 23:31:19 +00:00
Jilles Tjoelker
bedab466ce find: Do not pass fd to save current directory to child processes.
This removes one of the two wrongly passed file descriptors. The other one
appears to be from fts(3).

MFC after:	1 week
2012-09-26 20:16:15 +00:00
Kevin Lo
d1f1954b23 Teach getent(1) to look up a hostname and find IPv6 addresses.
PR:	bin/161548
Submitted by:	matthew
2012-09-26 09:29:48 +00:00
Jilles Tjoelker
5677eef9a7 kdump: Pretty-print signal codes.
MFC after:	1 week
2012-09-22 12:40:00 +00:00
David E. O'Brien
e279d5688e yes(1) actually comes from V7.
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-09-17 23:04:15 +00:00
Alexander V. Chernikov
8b3daf895a Make systat(1) accept fractional number of seconds.
Make old alarm(3)-based code use select(2).

MFC after:	2 weeks
2012-09-17 13:36:47 +00:00
Edward Tomasz Napierala
d8c4c83314 Remove references to userstat(1) and jailstat(1). Those tools were never
merged from the Perforce branch.  They might be brought in when %CPU limits
go into the tree.

PR:		docs/171240
MFC after:	2 weeks
2012-09-16 23:25:13 +00:00
Andrey Zonov
5695afded4 - Make truss thread-aware.
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-09-16 14:38:01 +00:00
Peter Jeremy
e6f5b72e5d - Add myself as a new src committer.
- Sort jhb's mentees
- Add grog's (ex-)mentor

Approved by:	jhb (co-mentor), grog (co-mentor)
2012-09-16 06:44:58 +00:00
Konstantin Belousov
2a43855795 Handle AT_TIMEKEEP in procstat(1) -x [1]. Remove the AT_COUNT switch
case, since AT_COUNT is not an aux vector, it is the counter of total
number of defined vectors.

PR:	bin/171662 [1]
MFC after:	1 week
2012-09-16 05:52:54 +00:00
Jilles Tjoelker
7cbda73825 sh: Prefer internal nextopt() to libc getopt().
This reduces code duplication and code size.

/usr/bin/printf is not affected.

Side effect: different error messages when certain builtins are passed
invalid options.
2012-09-15 21:56:30 +00:00
Eitan Adler
96240c89f0 Correct double "the the"
Approved by:	cperciva
MFC after:	3 days
2012-09-14 21:28:56 +00:00
Eitan Adler
eae8be706e Bump date missed in r202756
PR:		docs/171624
Submitted by:	bdrewery
Approved by:	gabor
MFC after:	3 days
2012-09-14 17:50:42 +00:00