Commit Graph

55 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
ae34b6ff96 Add four new RCTL resources - readbps, readiops, writebps and writeiops,
for limiting disk (actually filesystem) IO.

Note that in some cases these limits are not quite precise. It's ok,
as long as it's within some reasonable bounds.

Testing - and review of the code, in particular the VFS and VM parts - is
very welcome.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5080
2016-04-07 04:23:25 +00:00
Enji Cooper
c281fdb153 Fix typos in error messages dealing with unknown groups/users
MFC after: 1 month
X-MFC with: r291447, r291452
Sponsored by: EMC / Isilon Storage Division
2015-12-01 19:37:24 +00:00
Edward Tomasz Napierala
508744b2b1 Fix rctl rule filters - eg the 'rctl -r :' case.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-12-01 14:02:14 +00:00
Edward Tomasz Napierala
5c859bfb63 Improve error reporting to clearly show problematic rules.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 13:14:45 +00:00
Edward Tomasz Napierala
4cf0d89598 Simplify rule retrieval and improve error handling.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:33:56 +00:00
Edward Tomasz Napierala
5e7a25553c Fix some memory management problems.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:21:02 +00:00
Edward Tomasz Napierala
f4e361a725 Handle asprintf(3) errors in a standards-compliant way.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:09:12 +00:00
Edward Tomasz Napierala
0971623e61 Rewrite the rctl(8) utility to make it possible to add multiple rules
in a single run.  This speeds up operation with large rulesets.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:01:36 +00:00
Edward Tomasz Napierala
478f7a726b User and group identifiers the rctl(8) utility receives from the kernel
are always in numeric form; don't try to resolve them by names.  This
speeds up rule listing with large rulesets by about 50%.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 11:30:17 +00:00
Edward Tomasz Napierala
18e1f46eae Make rctl(8) use more reasonable buffer size for retrieving the rules.
Reviewed by:	mjg@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-05 19:15:39 +00:00
Edward Tomasz Napierala
6ced1f7802 Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-05 17:26:56 +00:00
Edward Tomasz Napierala
d051ac804a Make it clear that 'swapuse' is swap reservation and not actual swap usage.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-14 15:37:19 +00:00
Joel Dahl
37cba721ff mdoc: add missing .El 2015-07-14 19:43:10 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Edward Tomasz Napierala
ba8f0eb8fc Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.

Differential Revision:	https://reviews.freebsd.org/D2407
Reviewed by:	emaste@, wblock@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-14 14:03:55 +00:00
Edward Tomasz Napierala
82224d7df8 Remove spurious period.
MFC after:	1 month
Sponsored by:	International OCD Foun^W^W^WThe FreeBSD Foundation
2015-04-29 17:01:28 +00:00
Edward Tomasz Napierala
aae2a24b49 Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:41:49 +00:00
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Edward Tomasz Napierala
aaa995f25c Fix typo.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-09-11 19:54:30 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin
2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Edward Tomasz Napierala
1de5b5eb55 Mention that rctl(8) was sponsored by the Foundation.
Sponsored by:	The FreeBSD Foundation
2014-02-16 08:42:52 +00:00
Bryan Drewery
c0a04e017b Rework rctl(8) manpage
- Note that kernel options are required
- Shift parameters around in SYNOPSIS to make it more clear that there are
  different modes
- For all literal symbols such as 'process' or 'loginclass' or 'wallclock',
  etc, make them into bold symbols with .Sy
- For each subject:subject-id:etc: use .Em to underline to make it more clear
  they relate to the rule syntax
- Document how devd(8) support works
- Move RSS warning to BUGS and replace RSS with 'memoryuse' since 'RSS' is not
  defined in the manpage
- Add more examples around listing existing rules
- Make rule syntax into a list to improve readability
- Add a list of subjects and their corresponding subject-id same as
  RESOURCES/ACTIONS have lists
- Note that rctl(8) takes affect on all current and future processes
- Note that amount can take human numbers
- Add reference to login.conf(5) in few places login class is mentioned

Reviewed by:	trasz
Approved by:	bapt (mentor)
MFC after:	1 week
2014-02-15 14:56:50 +00:00
Simon J. Gerraty
69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Joel Dahl
2063b2c09b Minor spelling and grammar fixes. 2013-04-11 19:05:24 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Joel Dahl
8ca5c3fae7 Remove superfluous paragraph macro. 2012-12-04 09:02:49 +00:00
Bryan Drewery
0a44395e2d - Move EXAMPLES descriptions to before the actual command
- Add mdoc macros for EXAMPLES

Reviewed by:	eadler
Approved by:	gjb
MFC after:	3 days
2012-12-04 00:53:20 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Edward Tomasz Napierala
92f798418c Add pcpu to the the rctl(8) manual page. 2012-10-26 16:03:13 +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
Edward Tomasz Napierala
aeb99b567a Improve description for "rctl -l".
MFC after:	2 weeks
2012-09-01 11:24:02 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Xin LI
5083afda56 The .Fx macro needs the version number be in its own word separated by
a space.  This change have no visible effect for rendering.
2012-04-22 07:55:56 +00:00
Joel Dahl
1844d4fe2d Remove superfluous paragraph macro. 2012-03-29 16:07:22 +00:00
Joel Dahl
288eac5aed mandoc complains loudly when <TAB>s are misused in columnated lists. Fix
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
2012-03-29 16:02:40 +00:00
Joel Dahl
126b754db4 Remove superfluous paragraph macro. 2012-03-25 09:19:25 +00:00
Edward Tomasz Napierala
a29460e077 Use proper "maxproc" name, not "nproc".
PR:		docs/162172
2012-03-01 10:21:10 +00:00
Glen Barber
dce762dd44 Formatting fixes:
hexdump/od.1:
 - Enclose tabbed content in quotes [1]

ar/ar.1:
 - Enclose tabbed content in quotes [1]

rctl/rctl.8:
 - Enclose tabbed content in quotes [1]
 - Start a sentence on a newline [2]

Reported by:		manlint [1], igor [2]
MFC after:		1 week
X-MFC-after:		9.0-RELEASE
2011-12-23 00:29:01 +00:00
Edward Tomasz Napierala
85a2f1b4f2 Rename resource names to match these in login.conf. 2011-07-14 19:18:17 +00:00
Ed Schouten
48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Ulrich Spörlein
b2e52ced25 mdoc: fix markup 2011-06-02 09:56:42 +00:00