Periodic maintenaince
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? -- View this message in context: http://old.nabble.com/Periodic-maintenaince-tp27280687p27280687.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Periodic maintenaince
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
Re: Periodic maintenaince
On Sat, 23 Jan 2010 00:54:33 +0100 Roland Smith wrote: > 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'. Unless there's something under periodic that really needs normal priority, it's easier to modify /etc/crontab so that all periodic tasks run under nice. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"