BLOG     |     FORUM
Welcome, Guest
Username: Password: Remember me
Get quick Unbrowse SNMP help from Unleash Networks Engineers. The fastest way.
  • Page:
  • 1

TOPIC: Problems with TrapReceiver.TimestampLocal

Problems with TrapReceiver.TimestampLocal 14 years 8 months ago #213

Hi,
I am using t2sql.vbs with unbrowse to log traps to a mysql database. Sometimes the TimestampLocal method does not show the same time as the server. It seems to happen when the server has not received a trap for a while, although I am not sure that this is the reason.

The code, with debugging statements, is:
AbsTime = TheTrap.TimestampLocal
Sout.WriteLine " Original timestamp local: " & TheTrap.TimestampLocal
DateSplit = instr(AbsTime,"M")
Sout.WriteLine " Get the position of the M -AM or PM: " & DateSplit
DateTime = Left(Abstime,DateSplit)
Sout.WriteLine " Raw Date and Time: " & DateTime
MicroSecs = Right(Abstime,Len(Abstime)-DateSplit-1) 'microseconds
Sout.WriteLine " Microsecs: " & Microsecs
DateTime = ConvertDateToMysql(DateTime) 'date / time
Sout.WriteLine " Reformatted date and time: " & DateTime
Sout.WriteLine vbCrLf ' print a carriage return / line feed

The output is for this portion, the first one with correct time stamp and the second incorrect time stamp is:

Original timestamp local: 8/21/2009 5:39:58 PM.722590
Get the position of the M -AM or PM: 20
Raw Date and Time: 8/21/2009 5:39:58 PM
Microsecs: 722590
Reformatted date and time: 2009-08-21 17:39:58


Original timestamp local: 8/21/2009 4:07:42 PM.4294834127
Get the position of the M -AM or PM: 20
Raw Date and Time: 8/21/2009 4:07:42 PM
Microsecs: 4294834127
Reformatted date and time: 2009-08-21 16:07:42


I logged these entries, and I show some before and after:

8/21/2009 5:23:09 PM 131720 1 2009-08-21 17:23:08 699251
8/21/2009 5:39:58 PM 131721 1 2009-08-21 17:39:58 190967
>>8/21/2009 5:39:59 PM 131722 1 2009-08-21 17:39:58 722590
>>8/21/2009 6:16:13 PM 131723 1 2009-08-21 16:07:42 4294834127
8/21/2009 6:16:15 PM 131724 1 2009-08-21 16:07:44 4294813125

The second column shows the sever time, time(), and the next time comes from TimestampLocal. After the first time the time goes bad, it does not recover. Once I restart the program, the TimestampLocal is correct for a while, only to become incorrect sometime later on. You can see that the microseconds are incorrect too.
If you have any ideas on this, I would greatly appreciate it. Thanks.
The administrator has disabled public write access.

Re:Problems with TrapReceiver.TimestampLocal 14 years 7 months ago #214

There was a similar issue reported with an older version of Unbrowse.

1) What version are you using ? The latest is 1.6.0.1278

2) Do you see the same behavior in the trap console.

a) Start up Unbrowse
b) Ctrl+T to open the trap console or Ctrl+Shift+T to open and start the console


We will try to reproduce this in our lab setup tomorrow. In this meantime, the above information will be of great help.


Best,
Vivek
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
The administrator has disabled public write access.

Re:Problems with TrapReceiver.TimestampLocal 14 years 7 months ago #217

Hi Vivek,

1) I am currently running 1.6.0.1276.

2) I am not using the console currently. I will run it just to see if I get a similar behavior there.

Please let me know if you find anything on this, as currently our traps are depend on this setup.

Any insight, greatly appreciated. Thank you,

Roberto
The administrator has disabled public write access.

Re:Problems with TrapReceiver.TimestampLocal 14 years 7 months ago #227

Hi Vivek,
Anything new on my requests?

A few updates:

We were running the code on MS Server2003; we moved it to another box running XP. Do you think this might have something to do?

We updgraded the version to 1281.

We have had other issues with the OneVar object, with several of the methods used (OneTrap.GetVarbindByIdx(I), OneVar.OID & OneVar.Value). When these fail, it usually makes the whole application fail and no more traps are received until I run t2sql again. Are you aware of any problems that might occur with these?

We like unbrowse, but we have had quite a few issues with it. Do you think some of the ones I have mentioned might have been addressed in the latest version? Please let me know if you can help us out with this. I will let you know if our current configuration is working better than before.

Thanks,
Roberto
The administrator has disabled public write access.

Re:Problems with TrapReceiver.TimestampLocal 14 years 7 months ago #228

Hi Roberto,

We are simply unable to reproduce the timestamp issue here. I also checked with another customer who has been running Unbrowse (the GUI) on a quiet network for weeks. No timestamp issues. If you still receive these errors, can you do the following ?
  1. Go to the Program Files\Unleash Networks\Unbrowse\BIN directory
  2. Rt click on the ATSNW3.EXE file. This is the trap receiver server.
  3. Go to Details , Product Version
  4. It should read something like 1_6_0_1297

Did you get a chance to test the timestamp issue with the GUI Trap Console ?


--
When these fail, it usually makes the whole application fail and no more traps are received until I run t2sql again. Are you aware of any problems that might occur with these?

This is typical VBScript behavior. You can add the following statement to the top of the script to prevent it from bailing out on errors.
On Error Resume Next


Alternately, you can use Ruby instead of VBScript. Sadly, there is no sample yet.


Let me know how it goes,

Best,

Vivek
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
The administrator has disabled public write access.

Re:Problems with TrapReceiver.TimestampLocal 14 years 7 months ago #231

Roberto,

You can try our new Ruby sample for saving the traps to sql. www.unleashnetworks.com/resources/articl...-mysql-database.html


We found the performance to be quite impressive. Ruby also makes it really easy to customize behavior.
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: vivek [unleash]
Time to create page: 0.034 seconds