From owner-p4-projects@FreeBSD.ORG Wed Feb 2 21:03:04 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 06A1F1065673; Wed, 2 Feb 2011 21:03:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4BC106564A for ; Wed, 2 Feb 2011 21:03:03 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAA58FC18 for ; Wed, 2 Feb 2011 21:03:03 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p12L33xj034255 for ; Wed, 2 Feb 2011 21:03:03 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p12L33Uq034252 for perforce@freebsd.org; Wed, 2 Feb 2011 21:03:03 GMT (envelope-from trasz@freebsd.org) Date: Wed, 2 Feb 2011 21:03:03 GMT Message-Id: <201102022103.p12L33Uq034252@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 188469 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2011 21:03:04 -0000 http://p4web.freebsd.org/@@188469?ac=10 Change 188469 by trasz@trasz_victim on 2011/02/02 21:02:49 Improve the manual page even more. Affected files ... .. //depot/projects/soc2009/trasz_limits/usr.bin/rctl/rctl.8#7 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/usr.bin/rctl/rctl.8#7 (text+ko) ==== @@ -90,18 +90,16 @@ It can be either process, user, login class, or jail. .Pp Subject ID identifies the subject. It can be user name, -login class name, or a numerical UID, or JID. +numerical user ID, login class name, or numerical jail ID. .Pp Resource identifies the resource the rule controls. .Pp Action defines what will happen when a process exceeds the allowed amount. -It can be either deny, delay, log, sighup, sigint, sigkill, sigsegv, sigxcpu, -or sigxfsz. .Pp Amount defines how much of the resource a process can use before the defined action triggers. .Pp -The per field defines what entity the limit gets accounted for. +The per field defines what entity the amount gets accounted for. For example, rule "loginclass:users:vmem:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. @@ -117,9 +115,10 @@ .Pp A filter is a rule for which one of more fields other than per is left empty. For example, a filter that matches every rule could be written as ":::=/", -or, in short, ":". A filter that matches all the login classes would be -"loginclass:". A filter that matches all defined limits for maxprocesses -resource would be "::maxprocesses". +or, in short, ":". +A filter that matches all the login classes would be "loginclass:". +A filter that matches all defined rules for maxprocesses resource would be +"::maxprocesses". .Pp .Sh RESOURCES .Bl -column -offset 3n "msgqqueued" @@ -167,6 +166,22 @@ .Pp .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +.Dl rctl -a user:joe:vmem:deny=1g +.Pp +Prevent user "joe" from allocating more than 1GB of virtual memory. +.Pp +.Dl rctl -r : +.Pp +Remove all RCTL rules. +.Pp +.Dl rctl -hu jail:5 +.Pp +Display resource usage information for jail with JID 5. +.Pp +.Dl rctl -l process:512 +.Pp +Display all the rules applicable to process with PID 512. .Sh SEE ALSO .Xr jailstat 8 , .Xr userstat 8