ServiceMonitor logging can gather performance statistics
Logging was added to ServiceMonitor for the purpose of gathering performance statistics over time in a way that is very low impact and very low risk. ServiceMonitor can now extract information from the HTML using regular expressions and writing this information to a log. ServiceMonitor looks for the presence of ServiceMonitor.INI in the directory with ServiceMonitor.exe. If the .INI file is absent or the Log setting is absent or FALSE, ServiceMonitor's behavior is unchanged.
The following is an example for logging Pool Service data:
[Preferences]
Log=true
Pattern1=Salespoints[\D]+(\d*)
Legend1=sp:
Pattern2=Servers[\D]+(\d*)
Legend2=svr:
Pattern3=Long calls in last minute[\D]+(\d*)
Legend3=lcs:
Pattern4=Avg. call time \(last 250 calls\)[\D]+([\d\.]*)
Legend4=act:
Pattern5=Avg. lag time \(last 250 calls\)[\D]+([\d\.]*)
Legend5=alt:
Pattern6=Total Calls[\D]+(\d*)
Legend6=tcs:
These above settings cause a log file to be generated. The log file is in the same directory with ServiceMonitor.exe and is named: sm_Service-Name_log.txt where Service-Name is the name of the actual service.
Example:
sm_Siriusware PoolService SalesEZ_log.txt. ServiceMonitor outputs one line for each update of the HTML.
Example:
2011.12.15 12:01:42.814 sp: 0 svr: 3 lcs: 0 act: 0.02 alt: 0.0019 tcs: 45
Tabs are put between the Legend and the data extracted from the HTML. The .INI settings Pattern1, Pattern2, etc. are regular expressions. Pattern1, for example, looks for the string Salespoints followed by one or more non-digits (\D), and then some number of digits (which is actually what's grabbed, indicated by the parentheses).
Added additional debugging options to save a verbosity 6 log to a sales32c_debug_crash_log.txt file when specifically activated by a developer in the event of SQL error forwarding a local record, detection of a duplicate record and when there's inconsistencies between in the pmt_amt, xchg_rate and foreign total in the sale_hdr and sh_save table.