Date: Sat, 23 Jan 2010 00:54:33 +0100 From: Roland Smith <rsmith@xs4all.nl> To: fpineda <fpineda@live.com.mx> Cc: freebsd-questions@freebsd.org Subject: Re: Periodic maintenaince Message-ID: <20100122235433.GA35458@slackbox.xs4all.nl> In-Reply-To: <27280687.post@talk.nabble.com> References: <27280687.post@talk.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 22, 2010 at 02:04:21PM -0800, fpineda wrote: >=20 > Hi! >=20 > I like to know how can I optimize the execution about periodic daily. I k= now > periodic execute is a set of scripts, but I have some problems with a > sepecific script: 450.status-security. >=20 > 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 t= he > 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 executi= ng. >=20 > How can I optimize this script? This scripts calls /usr/sbin/periodic, which then executes all the scripts = in /etc/periodic/security.=20 With the command 'grep find /etc/periodic/security/*', you'll find that thr= ee 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'.=20 Roland --=20 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) --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAktaOrkACgkQEnfvsMMhpyW1zACgiRkiK5P3PTXjB7ztTvQJZSkn t2sAnRyJGM6Cvp9eQEcOInfYjgfDQmGs =OM7N -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100122235433.GA35458>