Bug 129814 - [patch] support of per script nice(1) value in periodic.conf(5)
Summary: [patch] support of per script nice(1) value in periodic.conf(5)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2008-12-21 11:40 UTC by Artem Naluzhny
Modified: 2022-10-17 12:35 UTC (History)
0 users

See Also:


Attachments
file.diff (2.14 KB, patch)
2008-12-21 11:40 UTC, Artem Naluzhny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Naluzhny 2008-12-21 11:40:03 UTC
The patch adds support of per periodic(8) script nice(1) value the script will be run at. There are two features:

  * default_nice variable - default nice level
  * <basename>_<script>_nice variables - nice level for the specific script


Default behavior after the patch application is still the same - no nice level changes.


periodic.conf(5) example:

  default_nice=10
  daily_status_mail_rejects_enable="YES"
  daily_status_mail_rejects_nice=8
Comment 1 Garrett Cooper 2008-12-22 23:38:09 UTC
    Can you provide a concrete example of this so I don't have to go
reading through ~50 lines of bourne shell and put it in perspective of
periodic.conf(5)?
Thanks :),
-Garrett
Comment 2 Garrett Cooper 2008-12-22 23:38:48 UTC
    Nevermind.. I need to read more closely before I submit ><.
Sorry,
-Garrett
Comment 3 Garrett Cooper 2008-12-22 23:44:22 UTC
The only issue with this is that:

if [ -n "${_nice}" ]

and:

elif [ -n "${default_nice}" ]

don't check for valid number values. I'm not sure if we'd want to
throw in that logic or not (or if there's something else in our
rc-scripts that automatically checks for numbers in range)...

I'd ask (quickly) on hackers@ to see if the change makes sense for a
more widespread review.

Cheers,
-Garrett
Comment 4 Artem Naluzhny 2008-12-23 07:28:01 UTC
Hi,

On Tue, Dec 23, 2008 at 01:44, Garrett Cooper <yanefbsd@gmail.com> wrote:
> The only issue with this is that:
>
> if [ -n "${_nice}" ]
>
> and:
>
> elif [ -n "${default_nice}" ]
>
> don't check for valid number values. I'm not sure if we'd want to
> throw in that logic or not (or if there's something else in our
> rc-scripts that automatically checks for numbers in range)...
>
> I'd ask (quickly) on hackers@ to see if the change makes sense for a
> more widespread review.

Actually the same feature for rc.conf file has no integer value syntax
check and produces the same error message from nice(1):

  nice: qwerty: invalid nice value

-- 
Artem Naluzhnyy
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:57 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:35:56 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>