The common log analysis commands in linux are as follows. log content: 211.123.23.20.--[10/Dec/2010: 09: 31: 17 + 0800] "GET/query/trendxml/district/todayreturn/month/2009-12-14/2010-12-09/haizhu_tianhe.xml HTTP/1.1" 200 1933 "-" "Mozilla/ 5.0 (Windows; u; Windows NT 5.1; zh-CN; rv: 1.9.2.8) Gecko/20100722 Firefox/3.6.8 (. net clr 3.5.30729) "can analyze and extract valuable content only by using commands or scripts. The following are some commands or scripts used for log analysis. For more information, see. 1. Run the following code to view the number of apache processes: ps-aux | grep httpd | wc-l2. Analyze the log and view the ip connection count for the current day: cat default-access_log | grep "10/Dec/2010" | awk '{print $2}' | sort | uniq-c | sort-nr3, shows the sample code of the url accessed by the specified ip address on the current day: cat default-access_log | grep "10/Dec/2010" | grep "218.19.140.242" | awk '{print $7}' | sort | uniq-c | sort-nr4, view the url code example of the top 10 access rankings on the current day: cat default-access_log | grep "10/Dec/2010" | awk '{print $7}' | sort | uniq-c | sort-nr | head-n 105, see the sample code for the specified ip Address: cat default-access_log | grep 218.19.140.242 | awk '{print $1 "\ t" $8}' | sort | uniq-c | sort-nr | less6, code example for viewing the minutes with the most visits (finding the hotspot: awk '{print $4}' default-access_log | cut-c 14-18 | sort | uniq-c | sort-nr | head7, count the number of characters in a text example code: cat pic. access. log | grep/2012/| wc-lcat c_access.log | grep "/message/publishmsg/\ |/message/publish/"> test1.log