From owner-freebsd-questions@freebsd.org Fri Feb 3 20:39:17 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 0E04ACCF1C2 for ; Fri, 3 Feb 2017 20:39:17 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from inet08.hamilton.harte-lyne.ca (inet08.hamilton.harte-lyne.ca [216.185.71.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "inet08.hamilton.harte-lyne.ca", Issuer "CA_HLL_ISSUER_2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AAE3F5DF for ; Fri, 3 Feb 2017 20:39:16 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from localhost (localhost [127.0.0.1]) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTP id 009E162305 for ; Fri, 3 Feb 2017 15:39:09 -0500 (EST) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from inet08.hamilton.harte-lyne.ca ([127.0.0.1]) by localhost (inet08.hamilton.harte-lyne.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WGWyOkVRCUW2 for ; Fri, 3 Feb 2017 15:39:06 -0500 (EST) Received: from webmail.harte-lyne.ca (inet04.hamilton.harte-lyne.ca [216.185.71.24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTPSA id 68C2E622FA for ; Fri, 3 Feb 2017 15:39:06 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1486154346; bh=PYudHJON/CP91HR4Ru+cQhhpJ1c1zn7B/G14NI2Ffrc=; h=Date:Subject:From:To:Reply-To; b=dfpC+ImNPu1SECIdiiqhp47ez9VY8LQ2qF7UpzhPgwaO1VSjWdPa4sllarlaJdXkg dCIS5RNks5x1A8XNPaOq+gDKll34mzI1F+y20mK4uL7ziIDWOkH3LlZjFmwT93N8T9 L3DYy+rqEFOAx9HEtXk+feEwktddP3Qeu0na/Prxres87woKGGKDTZeGaygCQpkMHU Zuo2+LhhUttKR8Zx4CXLfWaAQ1BkvBb6I3jPpiWe7NXWlFMLSgXoOnqlzhHABv4oXH 5JEPOb/+J64QcMjiww4vAXrLvcyL4Tgf/E4sc3JmI0yVpx4d+GjWtNFpW8pG0r3fQ4 gIQBjXcVRmoaw== Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Fri, 3 Feb 2017 15:39:06 -0500 Message-ID: Date: Fri, 3 Feb 2017 15:39:06 -0500 Subject: FreeBSD 10.3 'service ntpd start' does not create a pid file From: "James B. Byrne" To: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.22-4.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal 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: Fri, 03 Feb 2017 20:39:17 -0000 Today I have had occasion to stop and restart ntpd on a FreeBSD-10.3 system multiple times. I now note that the command 'service ntpd start' no longer creates a /var/run/ntpd.pid file or updates an existing one. As a result the 'service ntpd status' command always returns that ntpd is stopped. [root@SAMBA-01 ~]# cat /var/run/ntpd.pid 69962 [root@SAMBA-01 ~]# echo 70039 > /var/run/ntpd.pid [root@SAMBA-01 ~]# service ntpd status kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast ntpd is running as pid 70039. [root@SAMBA-01 ~]# cat /var/run/ntpd.pid 70039 [root@SAMBA-01 ~]# service ntpd stop kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast Stopping ntpd. Waiting for PIDS: 70039, 70039. [root@SAMBA-01 ~]# cat /var/run/ntpd.pid 70039 [root@SAMBA-01 ~]# service ntpd start kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast Starting ntpd. [root@SAMBA-01 ~]# cat /var/run/ntpd.pid 70039 [root@SAMBA-01 ~]# ps -auwx | grep sbin/ntpd root 70145 0.0 0.4 32376 18188 - Is 3:28PM 0:00.05 /usr/sbin/ntpd -g -c /etc/ntp.conf If I manually delete the file /var/run/ntpd.pid then the service start does not recreate it: [root@SAMBA-01 ~]# echo 70145 > /var/run/ntpd.pid [root@SAMBA-01 ~]# service ntpd stop kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast Stopping ntpd. Waiting for PIDS: 70145, 70145. [root@SAMBA-01 ~]# ll /var/run/ntpd.pid -rw-r--r-- 1 root wheel 6 Feb 3 15:30 /var/run/ntpd.pid [root@SAMBA-01 ~]# rm /var/run/ntpd.pid remove /var/run/ntpd.pid? y [root@SAMBA-01 ~]# ll /var/run/ntpd.pid ls: /var/run/ntpd.pid: No such file or directory [root@SAMBA-01 ~]# service ntpd status kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast ntpd is not running. [root@SAMBA-01 ~]# service ntpd start kern.timecounter.hardware: ACPI-fast -> ACPI-fast kern.timecounter.hardware: ACPI-fast -> ACPI-fast Starting ntpd. [root@SAMBA-01 ~]# ll /var/run/ntpd.pid ls: /var/run/ntpd.pid: No such file or directory [root@SAMBA-01 ~]# ps -auwx | grep ntpd root 70217 0.0 0.4 32376 18188 - Is 3:31PM 0:00.06 /usr/sbin/ntpd -g -c /etc/ntp.conf root 70238 0.0 0.1 18832 2340 1 S+ 3:34PM 0:00.00 grep --color ntpd Can anyone tell me why this is happening? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3