[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LOG Rotating for IPTRAF
Just reporting that Log Rotating for portlogs have been implemented in
IPTRAF.
WHERE to GET:
* as usual, at http://www.elixar.net/download
HOW it is IMPLEMENTED:
IPTRAF port-logging facility scans the directory for the existence of the
"portlog" file and increments the filename to "portlog.1", "portlog.2",
"portlog.3" and so on with the highest number being the most recent
instance.
NOTE:: I could just as easily change the file name style to "portlog1.log"
or "portlog.1.log" or anything you'd want it to be.
The checking loop scans the directory only for portlog files, but the
incrementation loops through each postfix ".N" before settling on an unused
number.
So if the log files start to get above 1000 or so, there might be a slight
performance hit, but I doubt it'd get that large.
The code itself is fairly simple, and "neat".
Just figuring out where to put it, how to put it, and what to put in what
way took some time. :)
Enjoy!
-Peter