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)
pgp1tX3e26zK3.pgp
Description: PGP signature