Periodic maintenaince

Roland Smith rsmith at xs4all.nl
Fri Jan 22 23:54:36 UTC 2010


On Fri, Jan 22, 2010 at 02:04:21PM -0800, fpineda wrote:
> 
> Hi!
> 
> I like to know how can I optimize the execution about periodic daily. I know
> periodic execute is a set of scripts, but I have some problems with a
> sepecific script: 450.status-security.
> 
> When this script is running by periodic_daily on cron, take some time to end
> and many times cause network errors like lost packets or timeouts. When the
> script is executing I saw with top command that generate a procces called
> "find" and it take all CPU resources while 450.status-security is executing.
> 
> How can I optimize this script?

This scripts calls /usr/sbin/periodic, which then executes all the scripts in
/etc/periodic/security. 

With the command 'grep find /etc/periodic/security/*', you'll find that three
scripts contain a find command;
- /etc/periodic/security/100.chksetuid
- /etc/periodic/security/800.loginfail
- /etc/periodic/security/900.tcpwrap

What you could do is prepend the find(1) commands with the nice(1) command, to
give the find commands lower priority. E.g. 'find -bla' then becomes
'/usr/bin/nice -n 19 find -bla'. 

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100122/d165aa35/attachment-0001.pgp


More information about the freebsd-questions mailing list