AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 891765
Accepted
karobar
karobar
Asked: 2018-01-12 07:34:53 +0800 CST2018-01-12 07:34:53 +0800 CST 2018-01-12 07:34:53 +0800 CST

NTP Peer 状态的 Select Field 中的 8 表示什么?

  • 772

我已经完成ntpq,然后运行associations并收到以下内容:

ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 12097  c811   yes  none   yes    reject    mobilize  1

从man ntp-decode(Peer Status)的文档中,我了解到第一个数字表示Status,第二个Select,第三个Count和第四个Code。

我试图找到 Select Status本手册的部分并找到以下内容:

The Select Field displays the current selection status. (The T Field in the following table gives the corresponding tally codes used in the ntpq peers dis-
play.) The values are coded as follows:

+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        Code             |            Message                    |            T             |            Description                                      |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        0                |            sel_reject                 |                          |            discarded as not valid (TEST10-TEST13)           |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        1                |            sel_falsetick              |            x             |            discarded by intersection algorithm              |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        2                |            sel_excess                 |            .             |            discarded by table overflow (not used)           |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        3                |            sel_outlyer                |            -             |            discarded by the cluster algorithm               |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        4                |            sel_candidate              |            +             |            included by the combine algorithm                |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        5                |            sel_backup                 |            #             |            backup (more than tos maxclock sources)          |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        6                |            sel_sys.peer               |            *             |            system peer                                      |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+
|        7                |            sel_pps.peer               |            o             |            PPS peer (when the prefer peer is valid)         |
+-------------------------+---------------------------------------+--------------------------+-------------------------------------------------------------+

那么,这个8数字Select Status是什么意思呢?

ntp
  • 1 1 个回答
  • 524 Views

1 个回答

  • Voted
  1. Best Answer
    Paul Gear
    2018-02-16T20:36:36+08:002018-02-16T20:36:36+08:00

    文档中对等状态代码的解释说,状态字段“为 5 位宽,并与 3 位宽的选择字段结合以创建对等状态字的第一个完整字节。” 选择字段是 3 位,所以它只能有 0-7 的值。第 2 位的 8 是状态字段中的最低有效位,而不是选择字段中的最高有效位。

    所以c8表示“持久关联”、“启用身份验证”和“广播关联”(位 0、1 和 4,计算大端序)。您可以ntpq使用readvar命令为您解释这些字段。这是我笔记本电脑的一个示例,它被配置为[0-3].ubuntu.pool.ntp.org在pool模式下使用:

    # ntpq -n
    ntpq> peers
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
     0.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
     1.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
    ...
    ntpq> assoc
    
    ind assid status  conf reach auth condition  last_event cnt
    ===========================================================
      1 32962  8811   yes  none  none    reject    mobilize  1
      2 32963  8811   yes  none  none    reject    mobilize  1
    ...
    ntpq> readvar 32962
    associd=32962 status=8811 conf, bcast, sel_reject, 1 event, mobilize,
    srcadr=0.0.0.0, srcport=0, srchost="0.ubuntu.pool.ntp.org",
    dstadr=0.0.0.0, dstport=0, leap=11, stratum=16, precision=-24,
    rootdelay=0.000, rootdisp=0.000, refid=POOL,
    reftime=00000000.00000000  Thu, Feb  7 2036 16:28:16.000,
    ...
    

    请注意“conf”(永久配置关联)和“bcast”(广播关联),它们是状态字段的简短解释。(显然,当它具有 POOL 的 refid 时,广播不仅仅意味着广播。)

    • 2

相关问题

  • 网络时间服务器的 DHCP 选项

  • 公共 NTP 服务器

  • 时间同步和计划任务

  • 时间漂移

  • Windows Server 无法可靠地同步 NTP 时间

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve