Is there a way to configure the mttrapd probe to log multiple log files and limit the size of each file. Currently it backs up just one and overwrites that when it backs up a new one. I thought there was a way to create multiple files. Can't seem to find any attributes in the props file.
Pinned topic mttrapd logging (more than 1 rolled file)
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-19T20:46:51Z at 2013-02-19T20:46:51Z by SystemAdmin
GuyThorne 060001URNM50 Posts
Re: mttrapd logging (more than 1 rolled file)2013-01-25T09:09:18ZThis is the accepted answer. This is the accepted answer.Hi Ravi,
The probes do have the functionality you mention but only when running on Windows. Have a look for "LogFilePoolSize" and "LogFileUsePool" in the Probe/Gateway user guide if you are on Windows. http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/topic/com.ibm.netcool_OMNIbus.doc/omn_pdf_prgw_master_731.pdf
If you have not already you can increase the MaxLogFileSize as the default is just 1MB.
SystemAdmin 110000D4XK1283 Posts
Re: mttrapd logging (more than 1 rolled file)2013-02-19T20:46:51ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
$ export NDE_LOGFILE_ROTATION_FORMAT="yyyyMMddHHmmss"
$ export NDE_LOGFILE_ROTATION_TIME=2044
I then ran my simnet probe for a bit (so that it wrapped at 20:44) and now I have the following in my log dir:-
$ ls -ltr log/sim*
-rw-rw-r-- 1 alexg nco_src 375331 Feb 19 20:44 log/simnet.log_20130219204400
-rw-rw-r-- 1 alexg nco_src 29619 Feb 19 20:44 log/simnet.log
So you can see that a new logfile (simnet.log) was started at 20:44 with the old log rolled to a name based on the timestamp at that point.
Also bear in mind the note on the page:-
If you set the NDE_LOGFILE_ROTATION_FORMAT environment variable, the NDE_LOGFILE_MAXSIZE environment is ignored.
So this can be used to give you daily log files that have unique names.