Example-Macro OpenVMS Time Related System Services Interceptors on Alpha
PRODUCT: OpenVMS Version 7.3-2
OP/SYS: OpenVMS Version 7.3-2
COMPONENT: Time related system services
SOURCE: Philippe Vouters Fontainebleau/France
LOW-COST HIGH-TECH: http://techno-star.fr
OVERVIEW: This article contains a pointer to OpenVMS time related system services interceptors. The interceptors work on a processes basis and all subprocesses or detached processes it may create. Each process gets a time referential difference from current system time. The interceptors modify the time returned to each process (and created subprocesses, detached processes) according to an offset from current system time. This has been used in development to test a software product before its release date, and afterwards when bugs are reported to check the software behaviour thanks to the date the bug has been reported. It has been used by the author of this code to check whether time related system services are indeed called within an HP OpenVMS product (specifically DECWindows).
*** CAUTION *** This sample set of code has been tested using OpenVMS V7.3-2. However, we cannot guarantee its effectiveness because of the possibility of error in transmitting or implementing it. It is meant to be used as a template for writing your own system services interceptors, and may require modification for use on your system.
PROCEDURE NOTES: The system services which are intercepted are: - $gettim - $numtim - $setimr - $creprc - $getutc - $schdwk Each system services can be rebuilt using: $ @mtm$ssint_build 'system service' For example: $ @mtm$ssint_build gettim Edit the file loader.com and select the system service you wish to load. Edit the file unloader.com and select the system service you wish to unload. To change the time offset from current system time for a process, subprocesses and detached process a process creates, enter: $ set command mtm$update_process $ mtm$update_process [PID] "[+/-]delta_time" Parameters between square brackets are optional. A delta time without a sign is considered as positive.
PROCEDURE: COPYRIGHT (C) 2005 BY HEWLETT-PACKARD COMPANY ALL RIGHTS RESERVED. THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY HEWLETT-PACKARD COMPANY. HP ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY HP. NO RESPONSIBILITY IS ASSUMED FOR THE USE OR RELIABILITY OF SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY HEWLETT-PACKARD COMPANY. SUPPORT FOR THIS SOFTWARE IS NOT COVERED UNDER ANY HP SOFTWARE PRODUCT SUPPORT CONTRACT, BUT MAY BE PROVIDED UNDER THE TERMS OF THE CONSULTING AGREEMENT UNDER WHICH THIS SOFTWARE WAS DEVELOPED. The zip file containing all sources can be downloaded from ../zip/ft.zip
REFERENCE: OpenVMS Internal and Data Structure Manual.