syntheticTime

0 Likes
This is an excerpt from an article by Peter Kuo, "Detecting Synthetic Time Programmatically":


The following is a sample output from syntheticTime.exe which shows the server is not using synthetic time.


C:\>synthetictime w2k-test-nds.sitea
syntheticTime v1.0, Copyright (C) 2005 Peter Kuo (www.DreamLAN.com)
---------------------------------------------------
| syntheticTime comes with ABSOLUTELY NO WARRANTY. |
| This is free software, and you are welcome to |
| redistribute or modify it under the GPL licensing |
| terms. |
---------------------------------------------------

Replica [Root]: No synthetic time in use.
Replica O=DreamLAN: No synthetic time in use.
Replica O=SiteA: No synthetic time in use.

The following illustrates the date is rolled back by a week in order to cause synthetic time:


C:\>date
The current date is: Tue 05/31/2005
Enter the new date: (mm/dd/yy) 05-24-2005
C:\>synthetictime w2k-test-nds.sitea
syntheticTime v1.0, Copyright (C) 2005 Peter Kuo (www.DreamLAN.com)
---------------------------------------------------
| syntheticTime comes with ABSOLUTELY NO WARRANTY. |
| This is free software, and you are welcome to |
| redistribute or modify it under the GPL licensing |
| terms. |
---------------------------------------------------

Replica [Root]: Synthetic time in effect.
Last "real" timestamp is 148:21:46 (534106 seconds) in the future.
Replica O=DreamLAN: Synthetic time in effect.
Last "real" timestamp is 167:57:13 (604633 seconds) in the future.
Replica O=SiteA: Synthetic time in effect.
Last "real" timestamp is 167:45:05 (603905 seconds) in the future.


Notice that the latest "real" timestamps on replicas O=DreamLAN and O=SiteA correspond to the seven day rollback as several objects were modified just before the date was changed. The timestamp on the [Root] replica is six days in the future as nothing there was changed for about a day before this time change.



The syntheticTime application accepts a server object name as command-line parameter, and determines if synthetic time has been issued for each replica hosted on the server. It sets an exit status code (so you can test for the result in a batch file):


 0 = no synthetic time in use
>0 = synthetic time in use (value depends on the number of replicas)
-1 = no server object name supplied
-2 = server has no replica
-3 = failed to obtain info from server

Download the executable and its C source code (ftp://ftp.dreamlan.com/Freeware/syntheticTime.zip)


A special thank you goes to Susan Perrin of Novell Developer Support for her explaining to me the dependencies and order of the NWDSListPartitionsExtInfo, NWDSGetPartitionExtInfoPtr, and NWDSGetPartitionExtInfo API calls.


See the article by Peter Kuo, "Detecting Synthetic Time Programmatically", for additional details.

Labels:

Collateral
Comment List
Anonymous
Related Discussions
Recommended