On Mon, Jan 05, 2009 at 09:16:28AM -0800, David Bustos wrote:
> Quoth Richard L. Hamilton on Sat, Jan 03, 2009 at 09:19:16AM -0800:
> > Looking at the method script for the sar service (as of snv_97), I see that
> > it creates the sys crontab file if it doesn't exist (for start) or deletes 
> > it unconditionally
> > (for stop), directly, without using the crontab command. That might not 
> > work well if
> > someone enabled the service when cron was already running (although if the 
> > file was
> 
> Can you take a look at
> http://bugs.opensolaris.org/view_bug.do?bug_id=6197324 and see whether
> that describes the problem?  If not, please file a new bug at
> bugs.opensolaris.org .

IMO 6197324 is a subset of the problem, and should either be closed as a
dup of a CR covering the larger problem, or it should be taken over to
describe the larger problem.

ISTM that the sar cron entries should always be created at install time
and that they should be no-ops when the service is disabled.  That is:
this is a design bug in the sar service.

Looks like the fix should be simple though, since the programs run by the
cron entries are shell scripts -- testing that the sar service is online
should be easy enough, and since the cronjobs run rarely, the impact of
this additional checking should be minimal.  Perhaps the fix is as
simple as adding this to the top of the sa1 and sa2 scripts:

/bin/svcs -H -o state svc:/system/sar:default | \
        /usr/xpg4/bin/grep -q online || exit 0

(sar depends on filesystem/minimal, so that pipeline should work fine)

Nico
-- 

Reply via email to