( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484072{main}( ).../index.php:0
20.0001484424require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.15414118680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.15524147784include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.15524147784get_header( $name = ???, $args = ??? ).../archive.php:19
60.15524148000locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.15524148096load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.15524148640require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.15534156048wp_head( ).../header.php:18
100.15534156048do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.15534156264WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.15534156264WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.15554159680wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.15554159680do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15554159896WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15554159896WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15564286200twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.15574287720wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.15574287720WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.15574287720WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.15574287720_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.15574288040wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.15584288792trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484072{main}( ).../index.php:0
20.0001484424require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.15414118680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.15524147784include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.15524147784get_header( $name = ???, $args = ??? ).../archive.php:19
60.15524148000locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.15524148096load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.15524148640require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.15534156048wp_head( ).../header.php:18
100.15534156048do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.15534156264WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.15534156264WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.15554159680wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.15554159680do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15554159896WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15554159896WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15564286200twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.18224289896wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.18224289896WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.18224289896WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.18224289896_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.18224290216wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.18234290440trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

快速分析 Apache 的 access log,抓出前十大網站流量兇手

說到 Log 分析大家都會先想到用 AWStats 來分析,沒錯這絕對是一個最好的解決方式,但如果你只是要簡單的分析一些資訊,就可以利用一些簡單的 shell 組合來撈出你要的資料

 

這篇主要是針對 Apache 的 access log 來進行分析,並提供以下範例給大家參考

 

取得前十名access 最多的IP 位址

cat access_log | awk'{print $ 1}'| sort | uniq -c | sort -nr | head -10

 

取得前十名 access 最多的網頁

cat access_log | awk'{print $ 11}'| sort | uniq -c | sort -nr | head -10

 

取得前十名下載流量最大的 zip 檔案

cat access.log | awk'($ 7〜/ \。zip /){print $ 10“” $ 1“” $ 4“” $ 7}'| sort -nr | head -10

 

取得前十名 Loading 最大的頁面 (大於60秒的 php 頁面)

cat access_log | awk'($ NF> 60 && $ 7〜/ \。php /){print $ 7}'| sort -n | uniq -c | sort -nr | head -10

 

取得前十名 User access 最久的頁面

cat access_log | awk'($ 7〜/ \。php /){print $ NF“” $ 1“” $ 4“” $ 7}'| sort -nr | head -10

 

取得access log 平均流量(GB)

cat access_log | awk'{sum + = $ 10} END {print sum / 1024/1024/1024}'

 

取得所有404 Link

awk'($ 9〜/ 404 /)'access_log | awk'{print $ 9,$ 7}'| 分類

 

取得所有 access code 的 stats 數量

cat access_log | awk -F'''$ 9 ==“ 400” || $ 9 ==“ 404” || $ 9 ==“ 408” || $ 9 ==“ 499” || $ 9 ==“ 500” || $ 9 ==“ 502” || $ 9 ==“ 504” {print $ 9}'| | 排序| uniq -c | 更多

 

以上只是簡單分析出常用的需求,也可以自行斟酌調整,然後再從中找到自己想要的分析模式

相信在日常的維護使用中可以幫上很大的忙。

 

varnish,squid,apache,nginx缓存文件比较

一,测试环境

1,硬件是奔腾双核,机子三年前买的。系统是archlinux

2,测试varnish和squid的时候,web服务用的apache

3,测试apache的时候,启动了5个进程,不过随着压力的增加,进程会增加的。

4,测试nginx的时候,启动了十个nginx进程,20个php-cgi进程

 

5,varnish,squid,nginx用的是反向代理的形势,也就是说访问图片的时候,要先透过缓存工具

二,测试

1,varnish

[root@BlackGhost bin]# /usr/local/bin/webbench -c 100 -t 20 http://127.0.0.1:8080/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://127.0.0.1:8080/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
100 clients, running 20 sec.

Speed=476508 pages/min, 47258114 bytes/sec.
Requests: 158836 susceed, 0 failed.

访问了这么次,没有缓存只有一次,效率真的很高。

2,squid

[root@BlackGhost bin]# /usr/local/bin/webbench -c 100 -t 20 http://localhost:9000/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://localhost:9000/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
100 clients, running 20 sec.

Speed=133794 pages/min, 7475018 bytes/sec.
Requests: 44598 susceed, 0 failed.

从测试效果来说,squid挺让我失望的,在测试前,我心里是这样估计的,缓存最好的是varnish,其次是squid,然后nginx,最后是apache,现在呢,squid是最差的。后来我看了一下log文件,发现正常情况下,缓存和没有缓存的比率不是1:2,如果在高压力下,缓存和没有缓存的比率更小。

3,apache

[root@BlackGhost conf]# /usr/local/bin/webbench -c 100 -t 20 http://localhost/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://localhost/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
100 clients, running 20 sec.

Speed=160890 pages/min, 15856005 bytes/sec.
Requests: 53630 susceed, 0 failed.

4,nginx

[root@BlackGhost conf]# /usr/local/bin/webbench -c 100 -t 20 http://localhost:10000/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://localhost:10000/00/01/RwGowEtWvcQAAAAAAAAWHH0Rklg81.gif
100 clients, running 20 sec.

Speed=304053 pages/min, 30121517 bytes/sec.
Requests: 101351 susceed, 0 failed.

从上面的测试结果我们可以发现,varnish > nginx > apache > squid,我想这个结果,根大家预期的结果有点出入,因为squid做老牌文件缓存工具怎么会这么差呢,squid的命中率低,我在网上查了一下,很多人都是这样的,这个可能根个人配置有关系,也许真正的高手,才能让squid发挥最大功力。

原文地址:http://blog.51yip.com/server/1032.html