08 Jan 11, 10:17PM
(08 Jan 11, 09:57PM)Fiz Wrote: I wasn't saying tail was unreliable I was saying the method of which it is being used is.I don't see how..
Quote:If you are saying actually use it in your method to parse logs I am not understanding how it could be used in a more efficient way then just piping the server directly to what you are using to parse the data.It's not direct, you're doing it through PHP. If anything, this may in fact hinder your server performance because it's run inside PHP (I'm not sure though)
Quote:Because "tail -f" doesnt stop until you make it stop anything you use to run "tail -f" with will hang foreverNo it won't. If you pipe tail -f | xyz, then the whole thing will terminate once xyz terminates.
Quote:unless you create a pipe to it thats bidirectional like I did in my php script directly with the server.There's no need to have a bidirectional pipe because you're not sending anything to the server.
Quote: I suppose it would be a good alternative if parsing the data in the php script running the server become a problem.The only good alternative, in fact.
Looking at your script, your server would get killed if your PHP code failed (did you check for all the possible bugs?).
Try restarting your MySQL database when it's running.
Or maybe the SQL server runs out of the available space.
Or maybe your server gets killed by a bug (that happens often when someone finds a bug) and you can't restart your logging from the right place, or so, and so on...