Subject: TimeStamp issues

From: Nalinaksh Pai <[email-masked]>
Date: Wed, 15 Dec 1999 13:30:52 +0530

Hi,
    Consider the scenario where I need to give a unified view to a set
of independant systems, each running its own OS and hardware. One such
system runs the master agent and the others run the sub agent. Each
subagent maintains its MIBs local to that box.

The question I have here is, how do I handle sysUpTime and all the other
objects related to sysUpTime.

One way to do it would be, sysUpTime would be retrieved from the master
agent MIB storage. But there are objects that have a particular
sysUpTime timestamp as their value.  Objects like ifTableLastChange
store a timestamp when the ifTable was last changed. The ifTable needs
to be represented as a common seamless table across all systems.

The problem here is sysUpTime is not the same across all the systems,
hence it is not right to assume that the maximum value of
ifTableLastChange across all systems is 'the value' to be returned back
to the management station.

Does anybody have any suggestions as to how such objects that store
timestamps can be correctly supported in the agentx framework?

Regards,
Nalin

---

From: Dave Shield <[email-masked]>
Date: Wed, 15 Dec 1999 09:13:43 +0000

> to the management station.

The way that I approached this for the UCD implementation, was to use
the value of sysUpTime returned in the responses to administrative
requests, and synchronise the subagent with the master.
  In particular, the subagent will re-set its idea of "when I started"
whenever it receives a response PDU. Something like (slightly simplified):

    if (op == RECEIVED_MESSAGE) {
        if (pdu->command == AGENTX_MSG_RESPONSE) {

                /*
                 * Synchronise sysUpTime with the master agent
                 */
          gettimeofday( &now, NULL );
          diff.tv_sec  = pdu->time/100;
          diff.tv_usec = (pdu->time - (diff.tv_sec * 100)) * 10000;
          starttime.tv_sec  = now.tv_sec  - diff.tv_sec;
          starttime.tv_usec = now.tv_usec - diff.tv_usec;
        }
    }

Everything else can then use 'starttime' quite happily - nothing else
realises that this refers to the master rather than the subagent.

Hope this helps.

Dave

---

From: Nalinaksh Pai <[email-masked]>
Date: Wed, 15 Dec 1999 18:17:36 +0530

Hi David,
    Thanks for your quickfire response.

I totally agree with you that synchronizing the timestamps across the master
agent and the subagent solves the basic problem.

But there are some scenarios where this could lead to inconsistency in the
sysUpTime values referenced by other objects.

If the master agent goes down and comes up again, the value of the sysUpTime
would be reset back in time. The subagent now would extract this sysUpTime
from the agentx response PDU and reset its own sysUpTime reference base. But
what about the MIB objects on the subagent who have stored values w.r.to the
previous time scale of the sysUpTime before the master agent went down?

I understand that one way to tackle this problem is to actually live with it
!!!!!

I wanted to know whether such issues were taken care of in the UCD
implementation and if yes then how.

Comments welcome.

Nalin

--
Nalinaksh Pai
Software Engineer
Cisco Systems
Phone: 91-022-2289931 Ext: 5007
Email: [email-masked]
Epage: [email-masked]