From owner-freebsd-questions@freebsd.org Fri Feb 3 21:43:18 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 5B81ECCF310 for ; Fri, 3 Feb 2017 21:43:18 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22EA41097 for ; Fri, 3 Feb 2017 21:43:18 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-it0-x230.google.com with SMTP id r185so21580688ita.0 for ; Fri, 03 Feb 2017 13:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=p+e0Y6UkxaTJQxkcC54tewknZpgBspTn7Z6DU/VPfhk=; b=tdKjXgDBLCvTTNC+E+YDVe1BDhSilru13ga/6Gb/PEznNsO9578wbm08PjkMhXqvej h8suayAEaM7rjvrs2DeL2PsGXxke23HrUz2AG65JJE4BUYPFVnRnBvu0l4Qnui0N79hk Oxpf/WEgEL0mdEJvPIdlwZ3s6lyf+Nwsg8MhAK/7DgoqAAIPcbNpA2Gylu5a5HuS08z9 RzWWcEPEs71zWR3H6t+cj6BWNrNtJpKcjdgLs8JtW6uaFIiSwN1OcHR+R9IJebBK7GpR itMnGkFSM8PnIeBgs8mnFssPxmD7LE90byRCL0HXKo/ZJm4E6bt/TWO+TdFkqSITOs/q QlGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=p+e0Y6UkxaTJQxkcC54tewknZpgBspTn7Z6DU/VPfhk=; b=MM67zmoJ5EQjKPB2XtD2UUwDwn5QkibOn4SPhXXdIdnAtUs3mhicfDJTQPcwZkGG0T qqnJ7TZErt5NmluaMyucrp4l3mzvf4SXljojs15/4flO6ks+U1NMLlnGMbdv+QWOeQGj KaAUfCeynM51KxLgrHFkStoGlo64nU7/KlvfcvThWJljRwad/esUP/NQ2SBN3LSyjeH3 aaHonbAucGQRrPanjFx4MY9eNvUUHDo0XvEVrmecnf8d2nrwTCWJ8DTNPP/sbLDU4Wb5 7pTBn3Wbc8Sv/yQgUjiVjBzNexcIb589FvkcU6vaxNgbdBrOeE916bfMvm7ZEHZ/roIM 95vA== X-Gm-Message-State: AIkVDXIZxjGWsRQdaM18ycgKAy80smh4dzupiZFhZCmUdwTh5Af4DRTqCOZg0buDTQJf3Q== X-Received: by 10.36.65.161 with SMTP id b33mr2802434itd.114.1486158197034; Fri, 03 Feb 2017 13:43:17 -0800 (PST) Received: from [10.0.10.3] (cpe-24-165-207-226.neo.res.rr.com. [24.165.207.226]) by smtp.googlemail.com with ESMTPSA id y126sm1607593itf.14.2017.02.03.13.43.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 13:43:16 -0800 (PST) Message-ID: <5894F99C.5090503@gmail.com> Date: Fri, 03 Feb 2017 16:43:56 -0500 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: byrnejb@harte-lyne.ca CC: freebsd-questions@freebsd.org Subject: Re: FreeBSD 10.3 'service ntpd start' does not create a pid file References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 21:43:18 -0000 James B. Byrne via freebsd-questions wrote: > 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? > ntpd had some security updates before the end of the year. Run freebsd-update to get 10.3 updated with ntpd fixs.