In the help for "Functionality of the pmon", we see the following:
The size of the PVSS_II.log file as well as pmon. log is monitored by the Pmon. The file size can be defined via the config entry maxLogFileSize in the [general] section (default = 10 MB, 0 = unlimited). If the defined size is exceeded the file is renamed PVSS_II.bak. Thereafter a possibly existing shell script (batch file) with the name postLogFileHandler and extension .sh (under Linux) or .cmd (under Windows) is executed. This file has to be located in the directory /bin. The name of the PVSS_II.bak file is passed as parameter.
I wish to have the system email me the log file when it rolls over. I was thinking that I could use this postLogFileHandler.cmd to do that... but I cannot find any examples of how to "passed as a parameter"?
Has anyone used this before? Maybe ETM can give us a working example of this file?
Todd Malone
postLogFileHandler appears in the help but no example
- tmalone
- Posts:192
- Joined: Mon Nov 22, 2010 11:21 pm
postLogFileHandler appears in the help but no example
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: postLogFileHandler appears in the help but no example
$1 passed to the script is the absolute path to the logfile which has been renamed to .bak
- tmalone
- Posts:192
- Joined: Mon Nov 22, 2010 11:21 pm
Re: postLogFileHandler appears in the help but no example
Here is the outcome of this exercise: a batch file for windows.
This file is put in the /bin folder and needs your information to send email. This batch file will send to your email account any log file which rolls over in the /log folder. The reason for a log file to get really big in a project is either too many debug statements, or a problem with your SCADA project. This will email to you the offending log file so you can review it before looking at it on the server and fixing the problem.
This file is put in the /bin folder and needs your information to send email. This batch file will send to your email account any log file which rolls over in the /log folder. The reason for a log file to get really big in a project is either too many debug statements, or a problem with your SCADA project. This will email to you the offending log file so you can review it before looking at it on the server and fixing the problem.
- tmalone
- Posts:192
- Joined: Mon Nov 22, 2010 11:21 pm
Re: postLogFileHandler appears in the help but no example
please unzip this .cmd file an place it in your \\bin folder on your OA SCADA server running on Windows. https://www.winccoa.com/fileadmin/image ... andler.zip
- Attachments
-
- postLogFileHandler.zip
- (742 Bytes) Downloaded 208 times