loops - Fast way to get information from a huge logfile on unix -


i have 6 gb applicationlogfile. loglines have following format (shortened)

[...]
timestamp;hostname;sessionid-abc;type=m
timestamp;hostname;sessionid-abc;set_to_true
[...]
timestamp;hostname;sessionid-hhh;type=m
timestamp;hostname;sessionid-hhh;set_to_false
[...]
timestamp;hostname;sessionid-zzz;type=m
timestamp;hostname;sessionid-zzz;set_to_false
[...]
timestamp;hostname;sessionid-www;type=s
timestamp;hostname;sessionid-www;set_to_true

i have lot of session more these 2 lines. need find out sessions type=m , set_to_true

my first attempt grep sessionids type=m , write file. looping every line file (1 sessionid per line) trough big logfile , grep sessionid;set_to_true

this method takes loooot of time. can give me hint solve in better , faster way?

thanks lot!


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -