|
Problems with TrapReceiver.TimestampLocal 2 Years, 5 Months ago
|
Karma: 0
|
|
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.
|
|
|
|
|
|
|
Re:Problems with TrapReceiver.TimestampLocal 2 Years, 5 Months ago
|
Karma: 2
|
|
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
|
|
|
|
|
|
|
Re:Problems with TrapReceiver.TimestampLocal 2 Years, 5 Months ago
|
Karma: 0
|
|
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
|
|
|
|
|
|
|
Re:Problems with TrapReceiver.TimestampLocal 2 Years, 5 Months ago
|
Karma: 0
|
|
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
|
|
|
|
|
|
|
Re:Problems with TrapReceiver.TimestampLocal 2 Years, 5 Months ago
|
Karma: 2
|
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 ?
- Go to the Program FilesUnleash NetworksUnbrowseBIN directory
- Rt click on the ATSNW3.EXE file. This is the trap receiver server.
- Go to Details , Product Version
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.
| Code: |
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
|
|
|
|
|
|
|