SNMP TimeFilter 类型分析介绍

SNMP TimeFilter 类型介绍

See the TimeFilter textual convention in IETF RFC 2021 to see how TimeFilter works.

TimeFilter类型定义于RFC2021中,文档也很好找,自行百度。下面将定义列出:

TimeFilter ::= TEXTUAL-CONVENTION
    STATUS        current
    DESCRIPTION
        "To be used for the index to a table.  Allows an application
         to download only those rows changed since a particular time.
        A row is considered changed if the value of any object in the
        row changes or if the row is created or deleted.

        When sysUpTime is equal to zero, this table shall be empty.

        One entry exists for each past value of sysUpTime, except that
        the whole table is purged should sysUpTime wrap.

        As this basic row is updated new conceptual rows are created
        (which still share the now updated object values with all
        other instances).  The number of instances which are created
        is determined by the value of sysUpTime at which the basic row
        was last updated.  One instance will exist for each value of
        sysUpTime at the last update time for the row.  A new
        timeMark instance is created for each new sysUpTime value.
        Each new conceptual row will be associated with the timeMark
        instance which was created at the value of sysUpTime with
        which the conceptual row is to be associated.

        By definition all conceptual rows were updated at or after
        time zero and so at least one conceptual row (associated with
        timeMark.0) must exist for each underlying (basic) row.

        See the appendix for further discussion of this variable.

        Consider the following fooTable:

        fooTable ...
        INDEX { fooTimeMark, fooIndex }

        FooEntry {
           fooTimeMark  TimeFilter
           fooIndex     INTEGER,
           fooCounts    Counter
        }

        Should there be two basic rows in this table (fooIndex == 1,
        fooIndex == 2) and row 1 was updated most recently at time 6,
        while row 2 was updated most recently at time 8, and both rows
        had been updated on several earlier occasions such that the
        current values were 5 and 9 respectively then the following
        fooCounts instances would exist.
        
        fooCounts.0.1  5
        fooCounts.0.2  9
        fooCounts.1.1  5
        fooCounts.1.2  9
        fooCounts.2.1  5
        fooCounts.2.2  9
        fooCounts.3.1  5
        fooCounts.3.2  9
        fooCounts.4.1  5
        fooCounts.4.2  9
        fooCounts.5.1  5
        fooCounts.5.2  9
        fooCounts.6.1  5
        fooCounts.6.2  9
        fooCounts.7.2  9    -- note that row 1 doesn't exist for
        fooCounts.8.2  9    -- times 7 and 8"
    SYNTAX    TimeTicks

按照这个例子看,这个类型用来记录该表的行经过的几次修改的时间点。

  • 每太看明白,没时间了,下周再看吧。

(2020.12.10)
我的理解是,这是一张记录表的索引,表中关心的数据变化时,记录一条,并以当时的时间为索引。该索引值是一个INTEGER类型。

补充 SYNTAX TimeTicks 类型:

SYNTAX TimeTicks定义在RFC1155中,定义了SMI,针对管理目的用于描述和命名对象的机制。

3.2.3.5. TimeTicks
 This application-wide type represents a non-negative integer which
 counts the time in hundredths of a second since some epoch. When
 object types are defined in the MIB which use this ASN.1 type, the
 description of the object type identifies the reference epoch.
	TimeTicks ::=
	 [APPLICATION 3]
	 IMPLICIT INTEGER (0..4294967295)

就是一个无符号整型,每个单位代表百分之一秒,也就是0.01s=10ms

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值