For versions 25 and higher, logging has been added to the pcmmv.dll and to the pcmsockxx.exe layers in addition to the existing logging at the pcmsrv32.dll/pcmserve.ini level. Logging should be only used during trouble shooting as the files can grow quite large.
Pcmmv.dll, which connects to the version-specific instances of pcmsockXX.exe, which in turn connect to their version-specific instances of pcmsrv32.dll logging at these three levels, is turned on as follows:
1. Pcmmv.dll logging is turned on in your pcmmv.ini file. Add the following (below in bold) to your pcmmv.ini in notepad. Pcmmv.ini is typically found in C:\Windows. You need a pcmmv.dll dated 11/10/10 or newer for logging to work. For older installs, this file is shipped with the v25 release.
[Logging]
Enable=0 off 1 on
File=C:\temp\Pcmmv.txt <=Folder must exist
Append=1 to append, 0 will overwrite
Use Append=1 for troubleshooting crashes.
2. Pcmmv.dll only reads pcmmv.ini at startup, you will have to restart your application after making the .INI file edits.
3. PcmsockXX.exe logging is turned on with command line parameters:
Make a copy of your StartMVS.bat file. Rename the file “StartLogging.bat”.
Edit StartLogging.bat in notepad as follows:
Change v25’s line from Start Pcmsock25.exe PC_MILER 8250 to:
- Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC .\V25log.txt or
- Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC C:\PcmLogs\V25log.txt <=Folder must exist
4. Another option is to add a fourth parameter of ‘Append’ to be used to troubleshoot crashes:
- Start Pcmsock25.exe PC_MILER 8250 LOG_BASIC C:\PcmLogs\V25log.txt APPEND
- To include communications and not just routing and distance information, use LOG_ADVANCED instead of LOG_BASIC.
- Start Pcmsock25.exe PC_MILER 8250 LOG_ADVANCED C:\PcmLogs\V25log.txt APPEND
To run on logging for older versions you will need to copy \pmw250\tcpip\pcmtcp.dll, listex.dll, and pcmsock25.exe to the older PmwXXX\Tcpip folders. After copying Pcmsock25.exe, rename the copy to PCMSockXX.exe to match the version you are replacing. For example, if you are copying pcmsock25.exe to \pmw220\tcpip, rename this copy of pcmsock25.exe to pcmsock22.exe.
You will need to close the existing instances of PcmsockXX.exe before starting them in logging mode. Failure to close the existing instances will result in ‘bind failed’ errors.
Pcmsrv32.dll logging is turned on in your pcmserve.ini files.
[Logging]
Enable=0 off, 1 on
File=C:\temp\V25log.txt <=Folder must exist
Append=1 to append, 0 will overwrite
Use Append=1 for troubleshooting crashes.
Pcmsrv32.dll only reads pcmserve.ini at startup, you will have to restart pcmsockXX.exe after making the INI file edits.