Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to do Apache log Shell analysis

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to conduct Apache log Shell analysis. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

1. Check the number of IP visits on the day:

Awk'{print $1} 'log_file | sort | uniq | wc-l

2. View the number of times a page has been visited:

Grep "/ index.php" log_file | wc-l

3. Check the number of pages visited by each IP:

Awk'{+ + S [$1]} END {for (an in S) print S [a]} 'log_file

4. Sort the number of pages visited by each IP from small to large:

Awk'{+ + S [$1]} END {for (an in S) print S [a], a} 'log_file | sort-n

5. Check which pages have been visited by an IP:

Grep ^ 111.111.111.111 log_file | awk'{print $1J 7}'

6. Remove the page for the day of search engine statistics:

Awk'{print $12 recording 1} 'log_file | grep ^\ "Mozilla | awk' {print $2}'| sort | uniq | wc-l

7. See how many IP visits were made during the 14:00 hour on June 21, 2009:

Awk'{print $4 print 1} 'log_file | grep 21/Jun/2009:14 | awk' {print $2}'| sort | uniq | wc-l

The above is the editor for you to share how to carry out Apache log Shell analysis, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report