Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84532 - sysstat installs an app-specific crontab, should be smarter
Summary: sysstat installs an app-specific crontab, should be smarter
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 11:32 UTC by Christopher DeMarco
Modified: 2007-01-22 07:47 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher DeMarco 2005-03-08 11:32:25 UTC
Bugs 71161 and 43386 show the default crontab created by the ebuild changing - first it's a generic crontab entry, then a shell script for cron.daily.  These are both wrong ;)

Current sysstats ebuild creates a crontab in /etc/cron.d... but fcron doesn't use cron.d.  

sysstats ebuild *should* create a cron entry for each of (vixie|f|d|ana)cron, which will be in /etc/cron.d, /etc/cron.daily, or /etc/crontab, depending on the application.  All I can vouch for is that fcron == crontab.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




cdemarco@celery ~ $ sudo emerge info
Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1,
2.6.10-gentoo-r6_cmd0 i686)
=================================================================
System uname: 2.6.10-gentoo-r6_cmd0 i686 Intel(R) Pentium(R) III Mobile CPU    
 1133MHz
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 21:44:24)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://www.zentek-international.com/mirrors/gentoo/
http://mirror.clarkson.edu/pub/distributions/gentoo/
http://gentoo.binarycompass.org"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib acl alsa apm arts avi berkdb bitmap-fonts crypt cups curl
divx4linux dvd emboss encode esd f77 fam ffmpeg flac font-server foomaticdb
fortran gdbm gif gnome gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg
kde libg++ libwww live mad mikmod motif mozilla mp3 mpeg mpeg2 mysql ncurses
network nls offensive ogg oggvorbis opengl oss pam pda pdflib perl png ppds
python qt quicktime readline samba sasl sdl spell ssl svga tcpd tiff truetype
truetype-fonts type1-fonts vcd xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Christopher DeMarco 2005-03-08 11:35:14 UTC
To clarify - it's great that the ebuild creates a cron entry, and I don't mean to say that !fcron is wrong.  What I mean is that if it's clever enough to create a cron entry, it should take the next step to being clever enough to create the /correct/ entry for the available cron app.

How this will be accomplished I don't know - is it kosher to put `rc-update show default | grep cron` in an ebuild?  And what if somebody's got more than one cron app running (is there even a valid reason (other than brain damage) to be doing that?)?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-13 02:04:28 UTC
ALL cron daemons look in /etc/cron.{daily,weekly,hourly,monthly}.
This is by design on Gentoo. The only reason this wouldn't hold is if you remove the crontab entries that handled them.

Thus sysstat SHOULD put it's script in one of the directories I have listed.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-03-13 08:53:01 UTC
The problem I see here is that the current crontab does things at pretty specific times - e.g. it is possible to do 8am-7pm activity reports every 20 minutes during weekdays or so forth, which you couldn't quite do with cron.daily/hourly. sa2 however could go into cron.daily easily, yes; the problem is sa1. And if we work directly on crontab code would be needed to ensure duplicates don't go in if sysstat is remerged, for example.

Robin, do you have any further suggestions?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-03-13 12:35:26 UTC
does one really need to be spammed 66 times a day? (8am-7pm, every 10 minutes)

The current (uncommented) lines are:
0 * * * * /usr/lib/sa/sa1 600 6 &
and
5 19 * * * /usr/lib/sa/sa2 -A &

The sa1 entry can just go into cron.hourly, without changing it's functionality (since it handles the every 10 minutes part itself).

For the sa2 entry, midnight (the time of the cron.daily run) makes a lot more sense that 7.15pm.

If users want more customization than that, they can write their own cron setup into the system crontab or root's crontab. Just put the current crontab into docs as an example for them.
Comment 5 Sergiy Borodych 2005-04-22 01:12:04 UTC
Current entries in cron.d/sysstat not for for me
I must added who user run it

0 * * * *   root    /usr/lib/sa/sa1 600 6 &
5 19 * * *  root    /usr/lib/sa/sa2 -A &

and after this it only start work

plz fix it in portage

PS: have current x86 system
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-07-16 15:34:48 UTC
Aaron - you seem to be maintaining this now, mind having a look?
Comment 7 Aaron Walker (RETIRED) gentoo-dev 2005-08-12 18:32:39 UTC
I'm more tempted to patch fcron to support /etc/cron.d (which is doable since I
maintain it) than to create separate cron files for each cron daemon.  No other
package does this afaik.

In the meantime, I will fix the current cron.d sysstat installs since it fails
to specify a user.
Comment 8 Alec Warner (RETIRED) archtester gentoo-dev Security 2007-01-22 07:47:21 UTC
This appears to be fixed.