[Pkg-awstats-devel] Bug#580693: awstats: Option to use "nice" to lower the priority of cron scripts

Ken Neighbors debian3 at ken.nsds.com
Fri May 7 20:34:39 UTC 2010


Package: awstats
Version: 6.9.5~dfsg-2
Severity: wishlist
Tags: patch


Again with inspiration from /etc/default/rsync and /etc/init.d/rsync, I
set up an option in /etc/default/awstat called AWSTATS_NICE.  It sets
the niceness level for awstats.pl and awstats_buildstaticpages.pl run
from update.sh and buildstatic.sh.  Default value is 10.

Note that unlike /etc/init.d/rsync, I did not include error checking for
this value.  Here is some code from /etc/init.d/rsync you might consider
(or just let me know if you'd like me to create a patch that includes
this type of error-checking on AWSTATS_NICE):

     case "x$RSYNC_NICE" in
         x[0-9])         RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";;
         x[1-9][0-9])    RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";;
         x)              ;;
         *)              log_warning_msg "Value of RSYNC_NICE in $RSYNC_DEFAULTS_FILE must be a value between 0 and 19 (inclusive);"
                         log_warning_msg "ignoring RSYNC_NICE now."
                         ;;
     esac

Note: the included patch was generated in comparison to the resulting
files from my previous patches (580672 and 580692).
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580672
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580692

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable'), (50, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages awstats depends on:
ii  perl                     5.10.0-19lenny2 Larry Wall's Practical Extraction 

Versions of packages awstats recommends:
ii  libnet-xwhois-perl            0.90-3     Whois Client Interface for Perl5

Versions of packages awstats suggests:
pn  apache2 | httpd            <none>        (no description available)
pn  libgeo-ipfree-perl         <none>        (no description available)
pn  libnet-dns-perl            <none>        (no description available)
pn  libnet-ip-perl             <none>        (no description available)
ii  liburi-perl                1.35.dfsg.1-1 Manipulates and accesses URI strin

-- no debconf information
-------------- next part --------------
# AWStats configuration options

# This variable controls the scheduling priority for updating AWStats
# datafiles and for generating static html reports.  Normal priority
# is 0 and a lower priority is 10.  See "man nice" for more info.
AWSTATS_NICE=10

# This variable controls whether to create static html reports every
# night in /var/cache/awstats/.  Set to "yes" or "no".
AWSTATS_ENABLE_BUILDSTATICPAGES="no"

# This variable control the language of all static html reports.  Set
# one to appropriate two-letter language code (default to en).
#AWSTATS_LANG=ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-debian-update.sh
Type: text/x-shellscript
Size: 642 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-awstats-devel/attachments/20100507/b75ad050/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-debian-buildstatic.sh
Type: text/x-shellscript
Size: 1038 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-awstats-devel/attachments/20100507/b75ad050/attachment-0001.bin>


More information about the Pkg-awstats-devel mailing list