FreeBSD Bugzilla – Attachment 87633 Details for
Bug 124248
[jail] [patch] add support for nice value for rc.d/jail + rc.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.32 KB, created by
Miroslav Lachman
on 2008-06-03 21:20:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Miroslav Lachman
Created:
2008-06-03 21:20:02 UTC
Size:
2.32 KB
patch
obsolete
>--- etc/defaults/rc.conf 2008-06-03 16:45:22.000000000 +0200 >+++ etc/defaults/rc.conf 2008-06-03 20:44:39.000000000 +0200 >@@ -605,6 +605,7 @@ > #jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail > #jail_example_fstab="" # fstab(5) for mount/umount > #jail_example_flags="-l -U root" # flags for jail(8) >+#jail_example_nice="5" # nice(1) for jail execution > > ############################################################## > ### Define source_rc_confs, the mechanism used by /etc/rc.* ## >--- etc/rc.d/jail 2008-05-29 00:21:09.000000000 +0200 >+++ etc/rc.d/jail 2008-06-03 21:03:55.000000000 +0200 >@@ -83,6 +83,7 @@ > [ -z "${_flags}" ] && _flags="-l -U root" > eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" > [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" >+ eval _nice=\"\${jail_${_j}_nice:-${jail_nice}}\" > > # Debugging aid > # >@@ -117,6 +118,7 @@ > debug "$_j exec stop: $_exec_stop" > debug "$_j flags: $_flags" > debug "$_j consolelog: $_consolelog" >+ debug "$_j nice: $_nice" > > if [ -z "${_hostname}" ]; then > err 3 "$name: No hostname has been defined for ${_j}" >@@ -350,7 +352,14 @@ > fi > fi > _tmp_jail=${_tmp_dir}/jail.$$ >- eval jail ${_flags} -i ${_rootdir} ${_hostname} \ >+ >+ if [ -z "${_nice}" ]; then >+ _nice_cmd="" >+ else >+ _nice_cmd="nice -n ${_nice}" >+ fi >+ >+ eval ${_nice_cmd} jail ${_flags} -i ${_rootdir} ${_hostname} \ > ${_ip} ${_exec_start} > ${_tmp_jail} 2>&1 > > if [ "$?" -eq 0 ] ; then >--- usr/src/share/man/man5/rc.conf.5 2008-06-03 20:47:19.000000000 +0200 >+++ usr/src/share/man/man5/rc.conf.5 2008-06-03 20:35:26.000000000 +0200 >@@ -3312,6 +3312,13 @@ > .Va jail_ Ns Ao Ar jname Ac Ns Va _exec_stop > for every jail in > .Va jail_list . >+.It Va jail_nice >+.Pq Vt int >+Unset by default. >+When set, use as default value for >+.Va jail_ Ns Ao Ar jname Ac Ns Va _nice >+for every jail in >+.Va jail_list . > .It Va jail_ Ns Ao Ar jname Ac Ns Va _rootdir > .Pq Vt str > Unset by default. >@@ -3412,6 +3419,11 @@ > .Dq Li /bin/sh /etc/rc.shutdown > by default. > This is the command executed at jail shutdown. >+.It Va jail_ Ns Ao Ar jname Ac Ns Va _nice >+.Pq Vt int >+Unset by default. >+When set, sets the nice value to alter priority of processes in jail. >+The higher the nice value the lower its scheduling priority. > .It Va jail_set_hostname_allow > .Pq Vt bool > If set to
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124248
: 87633