4 ms·
No. pw works strictly with a small window of live data. It doesn't assume that the file descriptor being read is a seekable file. It doesn't hoard all the data
by kazinator 5y ago
No. pw works strictly with a small window of live data. It doesn't assume that the file descriptor being read is a seekable file. It doesn't hoard all the data for searching.
If there is some dynamic pattern in the logs that repeats (or that you can cause to repeat by executing some test steps on the software which produces the logs), you may be able to use pw to latch on to that pattern.
E.g. suppose there is detailed function enter/leave tracing in the log. You can discover that certain functions are traced when you do something, and then filter for that material to remove unrelated spewage, and perhaps set up a trigger to capture the scenario you are reproducing.
Once you know that, you can use other tools to find the same thing. You know what to look for in off-line analysis of a complete log.
This is not just for logs. If you pipe
tcpdump -i <eth> -l | pw
you basically get an interactive network monitoring utility.
E.g. add:
:g thishost.*>.*thathost
and now you're just seeing packets from thishost to thathost.