11-30-2011 12:24 AM - edited 03-19-2019 04:01 AM
Hi guys,
Is there a way to check the value of the system clock, and whether it is synchronized with NTP?
I configured NTP with "net" CLI command, with root privilege of course. Then I rebooted the appliance. However, on the Cisco Wiki, I found no indication of a CLI command to check the result.
any idea?
Wass
Solved! Go to Solution.
11-30-2011 07:06 AM
Hi Wass,
You can use "ntpq -p" command to check if you MPX is synchronized with NTP server (you need to be logged in as root to MPX CLI in order to run this command.
"date" will show the current date and time on the MPX server.
HTH,
Natasa
11-30-2011 07:06 AM
Hi Wass,
You can use "ntpq -p" command to check if you MPX is synchronized with NTP server (you need to be logged in as root to MPX CLI in order to run this command.
"date" will show the current date and time on the MPX server.
HTH,
Natasa
12-01-2011 12:21 AM
thanks Natasa for the input. Problem solved.
I'd like to share what I did. Here's the output from the MPX CLI:
[root@TNSVMPCS01A6 root]# date
Wed Nov 30 08:57:24 CET 2011
[root@TNSVMPCS01A6 root]#
[root@TNSVMPCS01A6 root]#
[root@TNSVMPCS01A6 root]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.100.254.1 CHU_AUDIO(1) 8 u 51 64 77 1.857 8734905 0.922
LOCAL(0) LOCAL(0) 10 l 56 64 77 0.000 0.000 0.004
[root@TNSVMPCS01A6 root]#
As you can see, MPX "seems" to synchronize its time with 10.100.254.1- which is the NTP server. However, "date" command shows a wrong date.
Here's a "debug ntp packet" issued on the NTP server:
TNSWCRCS01A2#
Dec 1 09:14:36.522 CET: NTP: rcv packet from 172.20.2.3 to 10.100.254.1 on Vlan1900:
Dec 1 09:14:36.522 CET: leap 0, mode 3, version 4, stratum 9, ppoll 64
Dec 1 09:14:36.522 CET: rtdel 0070 (1.709), rtdsp F15B (942.795), refid 0A64FE01 (10.100.254.1)
Dec 1 09:14:36.522 CET: ref D2806076.79206C87 (08:57:42.473 CET Wed Nov 30 2011)
Dec 1 09:14:36.522 CET: org D281B5AB.8649BFF0 (09:13:31.524 CET Thu Dec 1 2011)
Dec 1 09:14:36.522 CET: rec D2806076.79206C87 (08:57:42.473 CET Wed Nov 30 2011)
Dec 1 09:14:36.526 CET: xmt D28060B7.78ADCD2D (08:58:47.471 CET Wed Nov 30 2011)
Dec 1 09:14:36.526 CET: inp D281B5EC.86979788 (09:14:36.525 CET Thu Dec 1 2011)
TNSWCRCS01A2#
Dec 1 09:14:36.526 CET: NTP: stateless xmit packet to 172.20.2.3:
Dec 1 09:14:36.526 CET: leap 0, mode 4, version 4, stratum 8, ppoll 64
Dec 1 09:14:36.526 CET: rtdel 0000 (0.000), rtdsp 0002 (0.031), refid 7F7F0701 (127.127.7.1)
Dec 1 09:14:36.526 CET: ref D281B5C0.3E09E917 (09:13:52.242 CET Thu Dec 1 2011)
Dec 1 09:14:36.526 CET: org D28060B7.78ADCD2D (08:58:47.471 CET Wed Nov 30 2011)
Dec 1 09:14:36.526 CET: rec D281B5EC.86979788 (09:14:36.525 CET Thu Dec 1 2011)
Dec 1 09:14:36.526 CET: xmt D281B5EC.86C42481 (09:14:36.526 CET Thu Dec 1 2011)
TNSWCRCS01A2#
I had to reboot MPX and wait a couple of minutes to see it synchronized:
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
[mpxadmin@TNSVMPCS01A6 mpxadmin]$ date
Wed Nov 30 09:11:37 CET 2011
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
[mpxadmin@TNSVMPCS01A6 mpxadmin]$ date
Thu Dec 1 09:31:51 CET 2011
[mpxadmin@TNSVMPCS01A6 mpxadmin]$
12-01-2011 05:43 AM
Hi Wass,
It shouldn't take that long to sync. Could you please try the following:
- Login as root and stop MPX application: "mpx_sys stop"
- With "net" command make sure that NTP server is set correctly
- Verify that ntp deamon is running: "ps -ax | grep -i ntpd"
- Stop the ntp deamon: "/etc/init.d/ntpd stop"
- Manually sync time with NTP server: "/usr/sbin/ntpdate -s ntp-source-ip"
- Start ntp deamon: "/etc/init.d/ntpd start"
- Reboot the server: "reboot"
- After the server is up, check if the date/time is correct: "date"
- Verify that ntpd will start after a reboot: "/sbin/chkconfig --list ntpd"
You should see:
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- If they are all set to off, then set ntpd to start during startup "/sbin/chkconfig ntpd on"
HTH,
Natasa
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide