Say I am running tcpdump and outputting the contents to a text file. As it is running in the background (memory), it will keep dumping the contents. Thus, the text file increases over time.
Now I would like to write a PHP page that refreshes itself and reads the tcpdump output "live "text file. I used meta refresh html code.
The problem is when I try to read it, the browser stalls. But once I stop tcpdump the page works and it is able to read the text file.
I think the problem here is that I must stop tcpdump first, thus the text file is not increasing and is static, suitable for reading.
My purpose here is to read the latest content in the text file say through a refresh of 10 sec and leaving tcpdump to get the "live" data. But it does not work until I stop tcpdump. I would like to leave tcpdump running and do not want to stop it.
Any ideas how I should go about this problem? Pls provide an example.
Thanks a million.Appreciate your help
James