From owner-freebsd-questions@freebsd.org Tue Oct 31 00:06:40 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C27AE2FDFB for ; Tue, 31 Oct 2017 00:06:40 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay14.qsc.de (mailrelay14.qsc.de [212.99.163.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1ECA7C610 for ; Tue, 31 Oct 2017 00:06:39 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay14.qsc.de; Tue, 31 Oct 2017 01:06:30 +0100 Received: from r56.edvax.de (port-92-195-25-5.dynamic.qsc.de [92.195.25.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id EA3543CBF9; Tue, 31 Oct 2017 01:06:28 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v9V06RwU002010; Tue, 31 Oct 2017 01:06:28 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 31 Oct 2017 01:06:27 +0100 From: Polytropon To: Yasuhiro KIMURA Cc: freebsd-questions@freebsd.org Subject: Re: Ways to help investigating behavior of periodic scripts Message-Id: <20171031010627.cda5cd42.freebsd@edvax.de> In-Reply-To: <20171031.080731.85349314815802482.yasu@utahime.org> References: <20171031.080731.85349314815802482.yasu@utahime.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay14.qsc.de with 7C10A68342E X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:1.143 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2017 00:06:40 -0000 On Tue, 31 Oct 2017 08:07:31 +0900 (JST), Yasuhiro KIMURA wrote: > As you know cron(8) executes daily periodic scripts at 03:01 of every > day and 2 mails are sent to root reporting output of each script. On > my home server (11.1-RELEASE amd64) these mails usually arrive before > 03:10. But sometimes they arrive after 03:30 and in rare case after > 04:00. The delay is not problem for me but I would like to know why it > happens. Several reasons are possible. For example, all the find-related processes usually search all mounted file systems. Let's say that you have an external hard disk mounted when the 3 o'clock run starts, it will be searched; if not, it won't. There are also options that affect the runtime of certain system scripts. You can find a list in /etc/defaults/periodic.conf which _might_ be overriden in /etc/periodic.conf if present. See "man periodic.conf" for additional information. > So are there any ways to help investigating this delay? > (Option to make periodic(8) write start and end time of each script to > syslog, for example.) You could add this manually to /usr/sbin/periodic; I'm not aware of a built-in mechanism to log the starting / finishing time of the many scripts that are run (depending on daily, weekly or monthly call). > BTW I'm not sure if this ML is best place to ask this question. So > plese let me know if I should move to other ML. This list is a good place to start. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...