bash实例-参数/函数/统计IP

1、写一个脚本getinterface.sh,脚本可以接受参数(i,I,a),完成以下任务:
   (1)使用以下形式:getinterface.sh [-i interface|-I IP|-a]
   (2)当用户使用-i选项时,显示其指定网卡的IP地址;
   (3)当用户使用-I选项时,显示其后面的IP地址所属的网络接口;(如 192.168.199.183:eth0)   (4)当用户单独使用-a选项时,显示所有网络接口及其IP地址(lo除外)

Getinterface.sh脚本代码如下:

#!/bin/bash
#echo $1
#echo $2‘

arg2=`echo $2 | sed ‘s/]//‘`
#echo $arg2

if [ "$1" == ‘[-i‘ ];then
	if `ifconfig | grep $arg2 &> /dev/null`; then
		echo "Ip for $arg2 is:"`ifconfig $arg2 | grep "inet addr" | awk ‘{print $2}‘ | awk -F: ‘{print $2}‘`
	else
		echo "No this interface, please input again."
	fi
elif [ "$1" == ‘[-I‘ ];then
	if `ifconfig | grep $arg2 &> /dev/null`; then
		echo $arg2:`ip addr show | grep $arg2 | awk ‘{print $7}‘`
	else
		echo "No this ip address, please input again."
	fi
elif [ "$1" == ‘[-a]‘ ];then
	jiekou=`ifconfig | grep "Link encap" | awk ‘{print $1}‘ | grep -v "lo"`
	echo $jiekou:`ifconfig $jiekou | grep "inet addr" | awk ‘{print $2}‘ | awk -F: ‘{print $2}‘`

else
	echo "you input error command. Please input as getinterface.sh [-i interface|-I IP|-a]"
fi

2、写一个脚本analyzelog.sh,完成日志分析:(使用函数)(日志文件在课件中)
说明:此脚本可以接受选项(i,d,t,a),使用格式:analyzelog.sh <-i IP|-d DATE|-t TYPE|-a> 日志文件名 :
先判断是访问日志文件还是错误日志文件
访问日志文件如下:
   (1)当用户使用选项-i时,统计出访问日志文件中指定IP地址的访问次数(通常每一行为一次);
   (2)当用户使用选项-d时,统计出访问日志文件中指定日期(某一天,如:04/May/2015)内每个IP地址访问的次数;如:
    192.168.0.1:33
    192.168.0.195:17
    ...
   (3)当用户使用选项-t时,统计出访问日志文件中以后缀后指定类型的文件(如.png表示png格式的图片)被访问的次数;
   (4)当用户使用选项-a时,统计出访问日志文件中每个IP地址访问的次数;

错误日志文件日下:
   (1)当用户使用选项-i时,统计出错误日志文件中指定IP地址的访问次数(通常每一行为一次);
   (2)当用户使用选项-d时,统计出错误日志文件中指定日期(某一天,如:2015/05/04)内每个IP地址访问的次数;如:
    192.168.0.1:33
    192.168.0.195:17
    ...
   (3)当用户使用选项-t时,统计出错误日志文件中GET获取失败的次数(就是一行错误信息中包含GET);
   (4)当用户使用选项-a时,统计出错误日志文件中每个IP地址访问的次数;

analyzelog.sh代码如下:

#!/bin/bash
#echo "1: $1"
#echo "2: $2"
#echo "3: $3"
#echo "Count for args is: $#"

arg2=`echo $2 | sed ‘s/]//‘`
#echo $arg2

getIp()
{
	#echo "Count for args in getIp is: $#"
	#awk ‘{ip[$1]++}END{for(i in ip){print i}}‘ access.log > ip
	if [ $# -eq 2 ];then
		if [ "$2" == "access.log" ];then
			grep "$1" $2 | awk ‘/^[0-9]/{print $1}‘ | sort -u > ip
		elif [ "$2" == "error.log" ];then
			awk ‘{print $16}‘ $2 | sed ‘s/,//‘ | sort -u > ip
		else
			echo "Can.t find the log file, please check again."
		fi
	else
		if [ "$1" == "access.log" ];then
			awk ‘/^[0-9]/{print $1}‘ $1 | sort -u > ip
		elif [ "$1" == "error.log" ];then
			awk ‘{print $16}‘ $1 | sed ‘s/,//‘ | sort -u > ip
		else
			echo "Can.t find the log file, please check again."
		fi
	fi
	ip_count=`cat ip | wc -l`

	#把每个ip的记录提取出来
	for((i=1;i<=$ip_count;i++));
	do
		#逐一取出各个ip
		one_ip=`sed -n "$i"p ip`

		#根据ip筛选出属于此ip的报告记录,并统计报告次数
		list_count=`grep "$one_ip" access.log | wc -l`

		#将每个ip的报告总次数写入行首
		sed -i "$i{s/^/ $list_count /}" ip &> /dev/null

	done
}

choice()
{
	#echo "The file is $3"		

	if [ "$1" == ‘[-i‘ ]; then
		#echo "[-i $2"
		echo "Access count for $arg2 is: "`grep $2 $3 | wc -l`
	elif [ "$1" == ‘[-d‘ ]; then
		#echo "[-d $2"
		getIp $2 $3;
		#echo `awk ‘{printf "%20s:%-20s\n\n",$2,$1}‘ ip
		awk ‘{print $2,$1}‘ ip | sed ‘s/ /:/‘ 

	elif [ "$1" == ‘[-t‘ ]; then
		#echo "[-t $2"
		echo "Access count for $2 is: "`grep $2 $3 | wc -l`
	else
		echo "Error command, please check."
	fi
}

choice_2()
{
	#echo "The file is $1"
	getIp $1;
	awk ‘{print $2,$1}‘ ip | sed ‘s/ /:/‘
}

if [ $# -eq 3 ];then
	choice $1 $arg2 $3;
elif [ $# -eq 2 ]; then
	choice_2 $2;
else
	echo "Error args, please check again."
fi

其中的access.log文件内容如下:

192.168.199.244 - - [04/May/2015:11:04:49 -0400] "GET / HTTP/1.1" 200 3698 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:49 -0400] "GET /nginx-logo.png HTTP/1.1" 200 370 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:49 -0400] "GET /poweredby.png HTTP/1.1" 200 3034 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:49 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:52 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:54 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:56 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:57 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:57 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:58 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:04:59 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:05:00 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:05:01 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:05:02 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:05:09 -0400] "-" 400 0 "-" "-" "-"
192.168.199.244 - - [04/May/2015:11:05:09 -0400] "-" 400 0 "-" "-" "-"
192.168.199.244 - - [04/May/2015:11:06:12 -0400] "GET / HTTP/1.1" 200 3698 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:06:12 -0400] "GET /nginx-logo.png HTTP/1.1" 200 370 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:06:12 -0400] "GET /poweredby.png HTTP/1.1" 200 3034 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:06:12 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:06:22 -0400] "-" 400 0 "-" "-" "-"
192.168.199.244 - - [04/May/2015:11:06:22 -0400] "-" 400 0 "-" "-" "-"
192.168.199.183 - - [04/May/2015:11:06:33 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.180 - - [04/May/2015:11:07:12 -0400] "GET / HTTP/1.1" 200 3698 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" "-"
192.168.199.180 - - [04/May/2015:11:07:12 -0400] "GET /nginx-logo.png HTTP/1.1" 200 370 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" "-"
192.168.199.180 - - [04/May/2015:11:07:12 -0400] "GET /poweredby.png HTTP/1.1" 200 3034 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" "-"
192.168.199.180 - - [04/May/2015:11:07:12 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" "-"
192.168.199.180 - - [04/May/2015:11:07:12 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0" "-"
192.168.199.180 - - [04/May/2015:11:07:17 -0400] "-" 400 0 "-" "-" "-"
192.168.199.155 - - [04/May/2015:11:07:18 -0400] "GET / HTTP/1.1" 200 3698 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:18 -0400] "GET /nginx-logo.png HTTP/1.1" 200 370 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:18 -0400] "GET /poweredby.png HTTP/1.1" 200 3034 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:20 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:20 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:30 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:30 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:30 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:35 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:35 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:35 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:37 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:37 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:37 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:38 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:39 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:40 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:41 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:42 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:43 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:43 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:43 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:48 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:49 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /nginx-logo.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.155 - - [04/May/2015:11:07:50 -0400] "GET /poweredby.png HTTP/1.1" 304 0 "http://192.168.199.183/" "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0; QQBrowser/8.0.1080.400) like Gecko" "-"
192.168.199.116 - - [04/May/2015:11:08:27 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:40 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:41 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:08:46 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:47 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:48 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:50 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:52 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:52 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:53 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:53 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:53 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.116 - - [04/May/2015:11:08:55 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:08:59 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:01 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:02 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:04 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:05 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:07 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:08 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.174 - - [04/May/2015:11:09:08 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:09 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:10 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:10 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:10 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:11 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:11 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:11 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:12 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:12 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.178 - - [04/May/2015:11:09:13 -0400] "GET / HTTP/1.1" 200 3698 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2" "-"
192.168.199.244 - - [04/May/2015:11:09:26 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36" "-"
192.168.199.244 - - [04/May/2015:11:09:30 -0400] "GET /bb HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:09:30 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:09:34 -0400] "GET /cc HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:09:34 -0400] "GET /favicon.ico HTTP/1.1" 404 3652 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" "-"
192.168.199.244 - - [04/May/2015:11:09:44 -0400] "-" 400 0 "-" "-" "-"

error.log文件:

2015/05/04 11:04:49 [error] 2145#0: *2 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:06:12 [error] 2145#0: *7 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:07:12 [error] 2145#0: *10 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.180, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:07:12 [error] 2145#0: *10 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.180, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:07:20 [error] 2145#0: *14 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:07:20 [error] 2145#0: *15 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.155, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:09:26 [error] 2145#0: *47 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:09:30 [error] 2145#0: *49 open() "/usr/share/nginx/html/bb" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /bb HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:09:30 [error] 2145#0: *49 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:09:34 [error] 2145#0: *50 open() "/usr/share/nginx/html/cc" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /cc HTTP/1.1", host: "192.168.199.183"
2015/05/04 11:09:34 [error] 2145#0: *50 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.199.244, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.199.183"
时间: 2024-10-12 22:04:04

bash实例-参数/函数/统计IP的相关文章

MSSQL 4表联查,子查询,函数统计,分组条件查询综合应用实例

1 SELECT 2 [UserName] 3 ,[Yhxm] 4 ,[Qx] 5 ,[Phone] 6 ,[Number] = COUNT([UserName]) 7 FROM 8 (SELECT 9 [UserName] = A.[username] 10 ,[Yhxm] = B.[xm] 11 ,[Qx] = D.[P_Power] 12 ,[Phone] = B.[dh] 13 ,[DayCount] = (SELECT COUNT(*) FROM [Caihuashun_FuJian_

C利用可变参数列表统计一组数的平均值,利用函数形式参数栈原理实现指针运算

//描述:利用可变参数列表统计一组数的平均值 #include <stdarg.h> #include <stdio.h> float average(int num, ...);//函数原型:即声明 float average2(int num, ...);//num个数 void add(int num, int x, int y, int z); int main(void){ int a=10; int b=20; printf("a地址:%p b地址:%p\n&

Bash 实例,第 2 部分

我们先看一下处理命令行自变量的简单技巧,然后再看看 bash 基本编程结构. 接收自变量 在 介绍性文章 中的样本程序中,我们使用环境变量 "$1" 来引用第一个命令行自变量.类似地,可以使用 "$2"."$3" 等来引用传递给脚本的第二和第三个自变量.这里有一个例子: #!/usr/bin/env bash echo name of script is $0 echo first argument is $1 echo second argum

娓娓道来c指针 (8)开发可变参数函数

(8)开发可变参数函数 在c语言中,可变参数的函数极其常见,如常用的printf().可变参数函数的一般形式如下: 返回值类型 函数名(类型1 参数1,类型2 参数2,...类型n 参数n,...); 如上所示,这是一个典型的可变参数样式,它共有n个确定的参数,最后的...表示可变参数的含义.必须指出...必须位于最后,并且它至少要有一个确定的参数,原因后面陈述. 为了开发可变参数的函数,需用到头文件stdarg.h.下面共给出两个实例,在实例中详细解释用法.一是求可变个整数的和:二是模仿pri

实用的bash别名和函数

本文来自于:程序师 作为一个命令行探索者,你或许发现你自己一遍又一遍重复同样的命令.如果你总是用ssh进入到同一台电脑,如果你总是将一连串命令连接起来,如果你总是用同样的参数运行一个程序,你也许希望在这种不断的重复中为你的生命节约下几秒钟. 解决方案是使用一个别名(alias).正如你可能知道的,别名用一种让你的shell记住一个特定的命令并且给它一个新的名字的方式.不管怎么样,别名有一些限制,它只是shell命令的快捷方式,不能传递或者控制其中的参数.所以作为补充,bash 也允许你创建你自己

MySQL数据库实例参数对比脚本

如何对比两个MySQL实例的参数情况,生产中常会有这样的需求,最近写了个python脚本,可基本实现该需求. 脚本 #!/usr/bin/python import MySQLdb,sys def fetch_variables(ip,user,passwd,port,variable=False): # Open database connection try: db = MySQLdb.connect(host=ip, user=user,passwd=passwd,port=port) e

【转】一大波实用的 bash 别名和函数

作为一个命令行探索者,你或许发现你自己一遍又一遍重复同样的命令.如果你总是用ssh进入到同一台电脑,如果你总是将一连串命令连接起来,如果你总是用同样的参数运行一个程序,你也许希望在这种不断的重复中为你的生命节约下几秒钟. 解决方案是使用一个别名(alias).正如你可能知道的,别名用一种让你的shell记住一个特定的命令并且给它一个新的名字的方式.不管怎么样,别名有一些限制,它只是shell命令的快捷方式,不能传递或者控制其中的参数.所以作为补充,bash 也允许你创建你自己的函数,这可能更长一

一大波实用的 bash 别名和函数

作为一个命令行探索者,你或许发现你自己一遍又一遍重复同样的命令.如果你总是用ssh进入到同一台电脑,如果你总是将一连串命令连接起来,如果你总是用同样的参数运行一个程序,你也许希望在这种不断的重复中为你的生命节约下几秒钟. 解决方案是使用一个别名(alias).正如你可能知道的,别名用一种让你的shell记住一个特定的命令并且给它一个新的名字的方式.不管怎么样,别名有一些限制,它只是shell命令的快捷方式,不能传递或者控制其中的参数.所以作为补充,bash 也允许你创建你自己的函数,这可能更长一

Bash 实例,第 3 部分

进入 ebuild 系统 我真是一直期待着这第三篇.也是最后一篇 Bash 实例文章,因为既然已经在 第 1 篇和 第 2 篇 中讲述了 bash 编程基础,就可以集中讲述象 bash 应用开发和程序设计这样更高级的主题.在本文中,将通过我花了许多时间来编码和细化的项目,Gentoo Linux ebuild 系统,来给您大量实际的.现实世界的 bash 开发经验. 我是 Gentoo Linux(目前还是 beta 版的下一代 Linux OS) 的首席设计师.我的主要责任之一就是确保所有二进