Tag: ntp

UXMON: Too many instances: ntpd

ATTENTION, RMC LEVEL 1 AGENT: This ticket will be automatically worked by the Automation Bus. Pls. ensure your Ticket List/View includes the “Assignee” column, monitor this ticket until the user “ABOPERATOR” is no longer assigned, BEFORE you start work on this ticket.
Node : linux.setaoffice.com
Node Type : Intel/AMD x64(HTTPS)
Severity : warning
OM Server Time: 2016-09-11 02:03:20
Message : UXMON: Too many instances: ntpd . ARGS: -p /var/run/ntp/ntpd.pid -x -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp.conf
Msg Group : OS
Application : psmon
Object : ntpd
Event Type : NONE
Instance Name : NONE
Instruction : No

When there are two ntp processes, review your /etc/ntp.conf file. There must be an unreachable NTP server

root@linux:~ # ps -ef | grep ntp
root 24639 24476 0 10:22 pts/0 00:00:00 grep ntp
ntp 26152 1 0 Sep11 ? 00:00:06 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -x -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp.conf
root 26277 26152 0 Sep11 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -x -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp.conf

Review your /etc/ntp.conf file and restart NTP

root@linux:~ # service ntp stop
Shutting down network time protocol daemon (NTPD) done

root@linux:~ # ps -ef | grep ntp
root 24778 24476 0 10:23 pts/0 00:00:00 grep ntp

root@linux:~ # service ntp start
Starting network time protocol daemon (NTPD) done

root@linux:~ # ps -ef | grep ntp
root 24819 1 0 10:23 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -x -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp.conf
root 24824 24476 0 10:23 pts/0 00:00:00 grep ntp

Enable NTP statistics

Edit file /etc/ntp.conf

#Enable NTP statistics
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

Restart ntp service. If it shows the following message, the directory /var/log/ntpstats has wrong permissions

May 21 14:56:40 linux ntpd[11202]: can’t open /var/log/ntpstats/peerstats.20150521: Permission denied

ntpd is running under user ntp

root@linux:~ # ps -ef | grep ntp
ntp 31445 1 0 15:05 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g

Change the permission as needed

root@linux:~ # ls -ld /var/log/ntpstats
drwxr-xr-x 2 ntp ntp 4096 May 21 15:00 /var/log/ntpstats

UXMON: NTP Problems. Running on local time. Peer: 127.127.1.0 Cur. Offset: 0.000 Cur. Symbol: * Ref. ID: .LOCL.

Node : linux.setaoffice.com
Node Type : Intel/AMD x64(HTTPS)
Severity : minor
OM Server Time: 2015-03-24 19:54:33
Message : UXMON: NTP Problems. Running on local time. Peer: 127.127.1.0 Cur. Offset: 0.000 Cur. Symbol: * Ref. ID: .LOCL.
Msg Group : OS
Application : ntpmon
Object : ntpq
Event Type :
not_found

Instance Name :
not_found

Instruction : This message shows no valid peers

Please, contact with your UX expert

Please check /var/opt/OV/log/OpC/ntp_mon.log for more details

Checking /var/opt/OV/log/OpC/ntp_mon.log shows the following message:

Mon Mar 30 09:04:47 2015 : NTP Problems. Running on local time. Peer: 127.127.1.0 Cur. Offset: 0.000 Cur. Symbol: * Ref. ID: .LOCL.

Edit file /etc/ntp.conf to not use the local clock

root@linux:~ # vi /etc/ntp.conf
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

HPOM – UXMON: There were no valid peers!

I was receiving this incident from HPOM

Node : linuxnode.setaoffice.com
Node Type : Intel/AMD x64(HTTPS)
Severity : minor
OM Server Time: 2014-01-21 12:20:43
Message : UXMON: There were no valid peers!
Msg Group : OS
Application : ntpmon
Object : ntpq
Event Type :
not_found

Instance Name :
not_found

Instruction : This message shows athe ntpq has problems to contact
with the NTPD daemon. Is posible the NTP Daemon is down

Please, contact with your UX expert

Took a look at the log file and it was showing that is a problem with NTP

root@linuxnode:/ # tail /var/opt/OV/log/OpC/ntp_mon.log
Tue Jan 21 15:34:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 16:08:16 2014 : working peer “172.16.4.198”, offset(255.81) greater than NTP_OFFSET_WARNING(230), please check!
Tue Jan 21 16:59:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 17:16:17 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 17:33:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 18:41:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 19:49:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 20:06:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 21:14:16 2014 : NTP Problems. There were no valid peers!
Tue Jan 21 21:31:16 2014 : NTP Problems. There were no valid peers!

Apparently it is not synchronizing with more than one peer

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
172.23.72.50 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.23.72.51 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.23.72.52 .INIT. 16 u – 16 0 0.000 0.000 0.000
172.16.4.198 172.23.72.51 4 u 16 16 3 52.630 5.543 4.069

Edit /etc/ntp.conf and insert new NTP servers

root@linuxnode:~ #vi /etc/ntp.conf
#
#server 172.23.72.50 version 3 minpoll 4 maxpoll 4
server 142.40.238.18 version 3 minpoll 4 maxpoll 4
#server 172.23.72.51 version 3 minpoll 4 maxpoll 4
server 142.40.238.19 version 3 minpoll 4 maxpoll 4
#server 172.23.72.52 version 3 minpoll 4 maxpoll 4
server 142.40.236.20 version 3 minpoll 4 maxpoll 4
server 172.16.4.198 version 3 minpoll 4 maxpoll 4

Restart NTP

root@linuxnode:~ # /etc/init.d/ntp restart
Shutting down network time protocol daemon (NTPD) done
Try to get initial date and time via NTP from ntp.setaoffice.com done
Starting network time protocol daemon (NTPD) done

Then checking again the results

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
142.40.238.18 142.40.234.152 3 u 2 16 1 0.476 51.879 0.001
142.40.238.19 142.40.238.18 4 u 1 16 1 0.406 50.896 0.001
142.40.236.20 .INIT. 16 u – 16 0 0.000 0.000 0.001
172.16.4.198 .INIT. 16 u – 16 0 0.000 0.000 0.001

root@linuxnode:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
142.40.238.18 142.40.234.152 3 u 14 16 1 0.476 51.879 0.001
142.40.238.19 142.40.238.18 4 u 13 16 1 0.406 50.896 0.001
142.40.236.20 172.22.248.13 5 u 12 16 1 0.173 49.724 0.001
172.16.4.198 172.23.72.51 4 u 11 16 1 52.181 53.676 0.001