During development many times we need pin_virtual_time utility to move the BRM time forward to test many scenarios like billing, invoicing, dunning et.c.
After installing the BRM 7.4 components in the server, generally the pin_virtual_time_file is not created and also the entry is commented in almost all the component's pin.conf file.
Here are some tips to enable the pin_virtual_time (may be useful to novice BRM developers/testers)
1). Uncomment pin_virtual_time entry in all the components' pin.conf file. You may run the following command :
find $PIN_HOME/ -name "pin.conf" | xargs sed -i 's/# - - pin_virtual_time/- - pin_virtual_time/g'
2). Restart the BRM server
3). Goto the $PIN_HOME/sys/test directory and execute
$> pin_virtual_time
This will create the pin_virtual_time_file and from now on you can move the time.
PIN_VIRTUAL_TIME USAGE
usage: pin_virtual_time [-h|-H|-?] [-f filename] [-m mode [value]]|[-i interval]
-h, -H, -? print this message.
-m ... set pin_virtual_time to mode, nothing or -i query pin_virtual_time
mode is 0 (regular), 1 (fixed) or 2 (running)
value as [mmdd]HHMM[[cc]yy][.SS]
interval is time between queries in seconds
After installing the BRM 7.4 components in the server, generally the pin_virtual_time_file is not created and also the entry is commented in almost all the component's pin.conf file.
Here are some tips to enable the pin_virtual_time (may be useful to novice BRM developers/testers)
1). Uncomment pin_virtual_time entry in all the components' pin.conf file. You may run the following command :
find $PIN_HOME/ -name "pin.conf" | xargs sed -i 's/# - - pin_virtual_time/- - pin_virtual_time/g'
2). Restart the BRM server
3). Goto the $PIN_HOME/sys/test directory and execute
$> pin_virtual_time
This will create the pin_virtual_time_file and from now on you can move the time.
PIN_VIRTUAL_TIME USAGE
usage: pin_virtual_time [-h|-H|-?] [-f filename] [-m mode [value]]|[-i interval]
-h, -H, -? print this message.
-m ... set pin_virtual_time to mode, nothing or -i query pin_virtual_time
mode is 0 (regular), 1 (fixed) or 2 (running)
value as [mmdd]HHMM[[cc]yy][.SS]
interval is time between queries in seconds
Once BRM time is moved forward, how can it be reverted back ?
ReplyDeleteIt depends on how people sets query's. Normally we will use "pin_virtual_time -m0" command to revert back to normal time.
ReplyDeleteto Move "pin_virtual_time -m2 050110102016"
After -m2 format is "<>"