Due to various reasons, we had to improve the shell that handles poorly performing access logs. I wanted to investigate the event at home, so I decided to make test data for the access log. (I don't like that kind of work, but it's interesting as an engineer simply how to get it faster.)
yum install ruby
gem install apache-loggen
Only this. There is a lot of information on Amazon Linux instead of CentOS, and the information that comes to the top is something like make and I got a flat tire, so I will leave it as an article.
By the way, regarding the improvement of the shell, it is assumed that it will probably take time to read, write and search the log. This is because the CPU usage is not high at all. No nice command is used either. Hold the number of lines as a variable that does not handle the log directly and does not overload the memory, I think that a significant improvement can be expected by processing from there. I would like to write this as an article when the results come out.
Recommended Posts