您好,欢迎进入北京泰福特电子科技有限公司官网

咨询服务热线

400-015-1230

Solaris的时间服务配置

发布时间:2022-04-11 13:57:32

1、复制NTP配置文件

# cd/etc/inet

# cpntp.client ntp.conf

2、修改/etc/inet/ntp.conf#添加NTP服务器地址

server10.48.3.182 minpoll 4 maxpoll 4 prefer

server192.168.5.21 minpoll 4 maxpoll 4

tinkerstep 0 #时间缓慢调整

driftfile/etc/inet/ntp.drift

Solaris

3、添加偏差记录文件

touch/etc/inet/ntp.drift

4、去除开机自动同步

OnSolaris 9 the /etc/rc2.d/S74xntpd

ntp服务的启动脚本:/lib/svc/method/xntp中,将如下一行注释。

# Runntpdate to sync system to peer before starting xntpd

[ -n"$ARGS" ] && /usr/sbin/ntpdate $ARGS

5、启动xntp用

/etc/init.d/xntpdstart

或者svcadm enable ntp

#svcadmrestart ntp

6、检查ntp同步状态

[root@localhostroot]# ntpq -premoterefid st t when poll reach delay offset jitter

==============================================================================

*10.48.3.182.GPS. 1 u 9 16 377 1.332 0.021 32.915

+192.168.5.21.GPS. 1 u 43 64 377 0.000 0.040 0.015

注:10.48.3.182和192.168.5.21为泰福特的HJ210-BDRBP设置为和卫星获取时间。

a、Snoop |grep –i ntp进行ntp包的抓取,相当于tcpdump。

b、检查 ntp 依赖:# svcs -lsvc:/network/ntp:default

c、#svcs -a |grep ntp 查询ntp进程

online13:09:43 svc:/network/ntp:default

d、# pgrep -lfntp

1595/usr/lib/inet/xntpd

e、查询进程相当于ps

# pgrep-lf ntp

1595/usr/lib/inet/xntpd


  • 联系方式
  • 传 真:86-10-82782026
  • 电 话:400-015-1230
  • 地 址:北京市海淀区北清路68号院用友软件园北区17号楼三层
在线咨询

咨询电话:

400-015-1230

  • 微信扫码 关注我们

Copyright © 2002-2035 北京泰福特电子科技有限公司 版权所有 备案号:京ICP备12028220号-1
京公网安备 11010802025976号

扫一扫咨询微信客服

18519396506
Powered by RRZCMS