NTP同步

RedHat?Linux????NTP實施步驟
1、 查看本系統與NTP服務器的時間偏差

ntpdate -d 192.168.142.114

?

[root@zabbix-proxy ~]# ntpdate -d 192.168.142.114
24 Aug 17:26:45 ntpdate[3355]: ntpdate 4.2.6p5@1.2349-o Fri Apr 13 12:52:28 UTC 2018 (1)
Looking for host 192.168.142.114 and service ntp
host found : 192.168.142.114
transmit(192.168.142.114)
receive(192.168.142.114)
transmit(192.168.142.114)
receive(192.168.142.114)
transmit(192.168.142.114)
receive(192.168.142.114)
transmit(192.168.142.114)
receive(192.168.142.114)
server 192.168.142.114, port 123
stratum 1, precision -18, leap 00, trust 000
refid [MRS], delay 0.02600, dispersion 0.00003
transmitted 4, in filter 4
reference time:    df2a4dd8.09606edb  Fri, Aug 24 2018 17:26:48.036
originate timestamp: df2a4ddb.fbbb6da2  Fri, Aug 24 2018 17:26:51.983
transmit timestamp:  df2a4ddb.fb8df6df  Fri, Aug 24 2018 17:26:51.982
filter delay:  0.02602  0.02603  0.02600  0.02614 0.00000  0.00000  0.00000  0.00000 
filter offset: -0.00005 -0.00002 0.000006 0.0000370.000000 0.000000 0.000000 0.000000
delay 0.02600, dispersion 0.00003
offset 0.00000624 Aug 17:26:51 ntpdate[3355]: adjust time server 192.168.142.114 offset 0.000006 sec

單位:秒
2、查看本系統之前是否配置過定時時間同步操作
?????

crontab -l

  若有,應刪除?crontab?-e
3、查看本系統時區是否正確

date

???????若不正確,則應停應用,調整時區,可以參考tzselect
4、查看本系統之前是否配置過ntp服務命令

service ntpd status

???????若有過配置,應關閉NTP服務

service ntpd stop   

  關閉NTP服務
5、確認NTP服務是否已經停止
???

 ntpq -p

6、編輯文件/etc/ntp.conf
注釋broadcastclient
#broadcastclient
需添加內容

server 192.168.150.142 minpoll 4 maxpoll 4 prefer
##maxpoll 42^4(16s)同步一次
server 192.168.150.143 minpoll 4 maxpoll 4
tinker step 0               ##如果使用緩慢調整應添加參數
driftfile /etc/ntp.drift    ##默認系統自帶,無需自己添加*/
tracefile /etc/ntp.trace

7、設置NTP服務開機自啟動

chkconfig ntpd on


9、重啟NTP服務

service ntpd restart

10、查看NTP運行狀態

ntpq -p 

顯示內容類似如下

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================192.168.142.114 .MRS.            1 u    8   16    1    0.403    0.037   0.000192.168.142.224 .INIT.          16 u    -   16    0    0.000    0.000   0.000

補充:直接對時命令
?

ntpdate 192.168.142.114

?

轉載于:https://www.cnblogs.com/xue0123/p/7474366.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391467.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391467.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391467.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

項目經濟規模的估算方法_估算英國退歐的經濟影響

項目經濟規模的估算方法On June 23 2016, the United Kingdom narrowly voted in a country-wide referendum to leave the European Union (EU). Economists at the time warned of economic losses; the Bank of England produced estimates that that GDP could be as much …

Oracle宣布新的Java Champions

\看新聞很累?看技術新聞更累?試試下載InfoQ手機客戶端,每天上下班路上聽新聞,有趣還有料!\\\Oracle宣布了2017年新接納的Java Champion的綜述。這次宣布了40位新的成員,包括InfoQ的貢獻者Monica Beckwith。…

lambda ::_您無法從這里到達那里:Netlify Lambda和Firebase如何使我陷入無服務器的死胡同

lambda ::[Update: Apparently you can get there from here! That is, if you use firebase-admin instead of google-cloud/firestore. Ill have more on this in the future, but the gist of it is summarized here.][ 更新:顯然您可以從這里到達那里&#xff…

leetcode 264. 丑數 II(堆)

給你一個整數 n ,請你找出并返回第 n 個 丑數 。 丑數 就是只包含質因數 2、3 和/或 5 的正整數。 示例 1: 輸入:n 10 輸出:12 解釋:[1, 2, 3, 4, 5, 6, 8, 9, 10, 12] 是由前 10 個丑數組成的序列。 解題思路 維…

奇跡網站可視化排行榜]_外觀可視化奇跡

奇跡網站可視化排行榜]When reading a visualization is what we see really what we get?閱讀可視化內容時,我們真正看到的是什么? This post summarizes and accompanies our paper “Surfacing Visualization Mirages” that was presented at CHI …

Oracle自動性能統計

Oracle自動性能統計 高效診斷性能問題,需要提供完整可用的統計信息,好比醫生給病人看病的望聞問切,才能夠正確的確診,然后再開出相應的藥方。Oracle數據庫為系統、會話以及單獨的sql語句生成多種類型的累積統計信息。本文主要描述…

numpy2

1、通用函數,是一種在ndarray數據中進行逐元素操作的函數。某些函數接受一個或多個標量數值,并產生一個或多個標量結果,通用函數就是對這些函數的封裝。 1、常用的一元通用函數有:abs\fabs  sqrt   square  exp  log\log2…

Apache Prefork、Worker和Event三種MPM簡單分析

(1) Prefork MPM (優點) :使用多個子進程,每個子進程只有一個線程來處理一個 http 連接,不用擔心線程安全問題缺點:內存消耗大,不擅長處理高并發環境,使用keep-alive長連接時要等到超…

grasshopper_如何使用Google的Grasshopper編碼應用程序來學習手機上的編碼基礎知識...

grasshopper什么是蚱hopper? (What is Grasshopper?) Grasshopper is an interactive education app for learning about coding. It began at Google as an experimental project created by a group called Area 120. Grasshopper是一個用于學習編碼的交互式教育…

機器學習 量子_量子機器學習:神經網絡學習

機器學習 量子My last articles tackled Bayes nets on quantum computers (read it here!), and k-means clustering, our first steps into the weird and wonderful world of quantum machine learning.我的最后一篇文章討論了量子計算機上的貝葉斯網絡( 在這里閱讀&#xf…

leetcode 179. 最大數(排序)

給定一組非負整數 nums,重新排列每個數的順序(每個數不可拆分)使之組成一個最大的整數。 注意:輸出結果可能非常大,所以你需要返回一個字符串而不是整數。 示例 1: 輸入:nums [10,2] 輸出&a…

test3

test3 轉載于:https://www.cnblogs.com/Forever77/p/11441068.html

linux滲透測試_滲透測試:選擇正確的(Linux)工具棧來修復損壞的IT安全性

linux滲透測試Got IT infrastructure? Do you know how secure it is? The answer will probably hurt, but this is the kind of bad news you’re better off getting sooner rather than later.有IT基礎架構嗎? 你知道它有多安全嗎? 答案可能會很痛…

BZOJ 1176: [Balkan2007]Mokia

一道CDQ分治的模板題,然而我De了一上午Bug...... 按時間分成左右兩半,按x坐標排序然后把y坐標丟到樹狀數組里,掃一遍遇到左邊的就add,遇到右邊的query 幾個弱智出了bug的點, 一是先分了左右兩半再排序,保證的是這次的左…

深入理解InnoDB(1)—行的存儲結構

1.InnoDB頁的簡介 頁(Page)是 Innodb 存儲引擎用于管理數據的最小磁盤單位。常見的頁類型有數據頁、Undo 頁、系統頁、事務數據頁等 2.InnoDB行的存儲格式 我們插入MySQL的記錄在InnoDB中可能以4中行格式存儲,分別是Compact、Redundant、D…

做嵌入式的必須學Android嗎

做嵌入式的必須學Android嗎Android方向適合哪些人呢?適合那些已經在自己領域有了一定的工作經驗的人,適合作為自己的拓展,適合提升自己的能力,譬如說已經做三年Linux驅動,就可以嘗試拓展去做Android驅動首先從技術角度…

test4

test4 轉載于:https://www.cnblogs.com/Forever77/p/11441980.html

boltzmann_推薦系統系列第7部分:用于協同過濾的Boltzmann機器的3個變體

boltzmannRecSys系列 (RecSys Series) Update: This article is part of a series where I explore recommendation systems in academia and industry. Check out the full series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, and Part 7.更新: 本文是我探索…

.net 初學者_在此初學者課程中學習使用TensorFlow 2.0開發神經網絡

.net 初學者Learn how to use TensorFlow 2.0 in this full video course from Tech with Tim. This course will show you how to create neural networks with Python and TensorFlow 2.0.在Tech與Tim的完整視頻課程中,學習如何使用TensorFlow 2.0。 本課程將向您…

AndroidStudio怎樣導入library項目開源庫 - 轉

https://jingyan.baidu.com/article/1974b2898917aff4b1f77415.html轉載于:https://www.cnblogs.com/EasyLive2006/p/7477719.html