I use the following command to see which VirtualHosts are getting traffic on my server (alternatives welcome).
ngrep 'Host:' port 80 -t -W byline -q | grep '^Host'
I want to be able to analyse the number of hits in a time interval while also seeing what's going on. To do this I have been trying to write the output to a file while also displaying it using tee.
ngrep 'Host:' port 80 -t -W byline -q | grep '^Host' | tee ~/hosts.log
However, nothing is printed to screen or logged to file.
I have tried different file locations, outside of my screen
session - with no difference. Does grep
need special handling?