|
least expensive way to monitor a log file?
i'm writing a php script which will be running with max_execution time set to 0. the sole purpose of this script is to monitor a log file and print something once the log file has been modified.
this is obviously not going to be a public app, it's only meant to be used by a single web client at a time.
so, my question is, what's the least expensive way to monitor if a log file has changed.
right now, i'm just getting the filesize and clearing the statcache in every iteration of the loop which is once per second.
any other ideas or comments on that?
__________________
testing 1 2 3
|