- Advanced Tracing
When the Rocrail server is running as service or daemon it needs some more trace facility beyond the standards to aid the administrator.
These options are not changeable by dialog and are for experts only.
XML description: http://www.rocrail.net/doc/rocrail-wrappers/wrapper-en.html#trace
|protpath||.||Protocol path; Where to write the trace files. (Use relative only if using http service.) Path is relative to pwd¹!|
|unique||false||Create a unique trace filename at startup.|
|size||100||Filesize of trace files in KB.|
|nr||10||Number of continuous trace files. In case of 0 or 1: All traces are written in one file disregarding filesize.|
|exceptionfile||false||Create extra file for exceptions.|
|invoke||./xmail.pl||External program or script to invoke on exception file creation.|
|invokeasync||false||The invokation will take place in a separate thread.|
|dumpsize||128||Max. byte dump size.|
¹) pwd = process working directory
To prevent the overwriting of existing traces, in case of a not easy to catch problem, this flag will make sure that trace files always get a unique file name.
The invoke option, in conjunction with exceptionfile, provides a mechanism to notify someone or something of the first exception written in the newly created exception file.
After reviewing this exception file it should be moved or deleted to get a new triggered event when an exception is raised. (If wanted.)
The script or program to be invoked is user defined, but if the external program could block the Rocrail server it is recommended to set the invokeasync to true to avoid it.
The example Perl script will send an email in case of the exception file creation:
#!/usr/bin/perl require 5.000; $mailaddr = $ARGV; open(SENDMAIL, "| /usr/sbin/sendmail -t -n") || die "Unable to open sendmail"; print SENDMAIL "From: Rocrail\n"; print SENDMAIL "To: $mailaddr\n"; print SENDMAIL "Reply-To: Rocrail\n"; print SENDMAIL "Subject: Exception file created.\n"; print SENDMAIL "This email is sended to notify you because an exception file is created.\n"; close(SENDMAIL);