-
Get memcached all items and deleted them if needed.
Jul142010I see there are so many api to operate memcached,such as get and set,but no list all items,so i write a shell just list all the items in memcached and we can delete the items when we don’t know the exactly items key. #!bin/bash# get_items_from_memcached.sh# Usge: sh get_ ...
阅读全文作者:u2 | 分类:OpenSource | 标签:memcached2条评论
-
write nagios nrpe plugin
Jul012010Scripts and executables must do two things (at a minimum) in order to function as Nagios plugins:1.Exit with one of several possible return values2.Return at least one line of text output to STDOUT Plugin Return Code Service State Host State0 OK UP1 WARNING UP or DOWN/UNREACHABLE*2 CRITICAL DOWN ...
阅读全文
-
notice Hostnames should not contain an ‘_’
Jun172010notice Hostnames should not contain an ‘_’: such as vm_test01.2hei.net Please have a look at RFC952 (http://tools.ietf.org/html/rfc952) Hostnames should not contain an ‘_’! ASSUMPTIONS: 1. A “name” (Net, Host, Gateway, or Domain name) is a text ...
阅读全文作者:u2 | 分类:OpenSource | 标签:rfcnotice Hostnames should not contain an ‘_’已关闭评论
-
SHELL中的2进制、10进制、8进制、16进制之间的转换
May042010一、16进制转换成10进制printf %d 0xF15或者echo $((16#F))15 二、10进制转换成16进制printf %x 15f或者echo “obase=16;15″|bcF 三、10进制转换成8进制printf %o 911 四、8进制转换成10进制echo $((8#11))9 五、同理二进制转换成10进制echo $((2#111))7 六、10进制转换成二进制echo “obase=2;15̸ ...
阅读全文SHELL中的2进制、10进制、8进制、16进制之间的转换已关闭评论
-
openssh5.4升级后ssh无法登陆
Mar302010杯具啊! 新装的服务器,从openssh5.2升级到openssh5.4,重启sshd服务后发现无法登陆了!!!没办法,找机房人员终端登陆上去开启telnet,又把版本降了回来,汗一个!谁让手欠呢!阅读全文作者:u2 | 分类:OpenSource | 标签:opensshopenssh5.4升级后ssh无法登陆已关闭评论
-
nginx代理模式下,伪造X-Forwarded-For头的测试
Mar182010测试环境: nginx+resinIP: 内网:172.16.100.10 客户端IP:123.123.123.123 测试页面: test.jsp<%out.println(“x-forwarded-for: ” + request.getHeader(“x-forwarded-for”));out.println(“remote hosts: ” + request.getRemoteAddr());%> nginx 配置一 ...
阅读全文
-
ethtool maybe caused by “TCP checksum offload”
Mar032010使用tcpdump抓包时发现有这样的错误信息: Transmission Control Protocol, Src Port: 44937 (44937), Dst Port: https (443), Seq: 111, Ack: 147, Len: 6 Checksum: 0x5edd [incorrect, should be 0x15db (maybe caused by “TCP checksum offload”?)] Good Checksum: False Bad Checksum: True ...
阅读全文作者:u2 | 分类:OpenSource | 标签:ethtoolethtool maybe caused by “TCP checksum offload”已关闭评论
-
linux下支持https的压力测试工具
Jan242010测试了linux下的几种压力测试工具,发现有些不支持https,先简单总结如下: 一、apache的ab工具 /home/webadm/bin/ab -c 50 -n 10000 https://2hei.net/mt/index.htmlSSL not compiled in; no https support看样子是说SSL没有编译进来,所以不支持https 二、apache的flood工具 http://httpd.apache.org/test/flood/ wge ...
阅读全文
-
nginx authentication
Jan202010今天配置nginx的basic authentication折腾了好半天,开始error_log一直报错:no user/password was provided for basic authentication 我是按照nginx的wiki配置的:location / { auth_basic “Restricted”; au ...
阅读全文作者:u2 | 分类:OpenSource | 标签:nginxnginx authentication已关闭评论
-
[notice] child pid 19818 exit signal Bus error (7)
Jan072010apache logs:[Thu Dec 31 12:27:41 2009] [notice] child pid 19818 exit signal Bus error (7) The first error “Bus Error” is caused by someones (possibly CGI) program crashing. A bus error happens when someone wrote a C program for Intel and re-compiled it for another processor like PPC ...
阅读全文作者:u2 | 分类:OpenSource | 标签:apache