ITeye博客

professional linux kernel architecture and java lucene search engine

wushexin · 共 49 篇文章

ttserver性能报告

从数据库读入和写入ttserver 共耗时:312525259.0 (ms) = 3.6172 (天) 写入总条数:5832998+7324557+5937646+5594306+2166555=26856062 = 2680万 平均每条记录写入时间:312525259/26856062=11.637 ms

2011-08-10 14:57 · 几种流行的高速缓存机制比较 · 评论(0)

Redis, Memcached, Tokyo Tyrant and MySQL comparision

Redis, Memcached, Tokyo Tyrant and MySQL comparision Filed Under: ASP.NET , benchmark , Technology by Nguyễn Bá Khoa — 2 Comments 13/11/2010 I wanted to compare the following DBs, NoSQLs and caching solutions for speed and connections. Tested the following Redis Memcached Tokyo Tyrant / Tokyo Cabin…

2011-08-04 16:24 · 几种流行的高速缓存机制比较 · 评论(0)

oracle 数据库表优化

oracle 有时候 性能优化需要用到: analyze table base_site_info compute statistics;

2011-08-04 13:33 · sql · 评论(0)

java 方法 参数

an argument usually looks like a piece of information provided to the method, not something to be modified. This is an important guarantee, since it makes code easier to write and understand.

2011-07-13 16:26 · java 基础 · 评论(0)

shell md5

今日群里问起一个问题: echo 123|md5sum ba1f2511fc30423bdbb183fe33f3dd0f - php -r "echo md5('123');" 202cb962ac59075b964b07152d234b70 两者的md5值不一致,于是有很多有趣的解法: 1 Mysql解法: mysql> select md5('123'); +----------------------------------+ | md5('123') | +----------------------------------+ | 202cb962ac59075b964b07152d…

2011-05-06 18:15 · linux shell · 评论(0)

samba 挂载文件

[oracle@centos223 samba]$ cat smb.conf # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options (perhaps too # many!) most of which are not shown in this example # # F…

2011-05-03 14:31 · linux shell · 评论(0)

linux 修改文件中某一行

sed -i "1s/oldstr/newstr/" filename 示例: config文件: [wusx@centos245 gather]$ cat config start=359822 end=550000 threads=15 output=/home/wusx/gather/output log=/home/wusx/gather/_wget.log #将当前下的文档序列,写回config文件。 sed -i "1s/start=$(($i-1))/start=$i/" /home/wusx/gather/config

2011-04-27 18:21 · linux shell · 评论(0)

shell find scp 命令

查询某个文件下 文件大小大于 10k 的文件 : find /home/user/dir -size +10k 查找大于4的文件,全部复制到另一目录: find /home/user/dir/ -size +4k -exec cp {} /home/user/newdir/ \; scp 从本机拷贝到远程服务器: scp valid/* wusx@192.168.2.245:/home/wusx/gather/valid/ 从远处服务器拷贝到本地: scp user@192.168.2.245:/home/user/dir/ ./

2011-04-27 18:11 · linux shell · 评论(0)

wget下载页面脚本

首先配置文件: [wusx@centos245 gather]$ cat config start=359822 end=550000 threads=15 output=/home/wusx/gather/output log=/home/wusx/gather/_wget.log 然后运行脚本: [wusx@centos245 gather]$ cat wget.sh #!bin/sh #执行下载任务 # #Threads=10; #i=100000; #max=999999; filename=/home/wusx/gather/config eval `cat $filename |…

2011-04-27 18:04 · linux shell · 评论(0)

curl 下载 字符集转化

shell 写道 curl 下载页面时,时常会乱码,可以用:iconv -f gbk -t utf-8 来转码;示例: [oracle@localhost ~]$ curl http://www.ip138.com/ip2city.asp | grep body <body style="margin:0px"><center>?μ?Pμ?·?£o[114.249.221.61] </center></body></html> [oracle@localhost ~]$ curl http://www.ip138.com/ip2city.asp | grep body | iconv -f …

2011-04-21 10:02 · linux shell · 评论(0)

linux 下获取 互联网ip

方式一: [root@centos200 monitor_adsl_connect]# ifconfig 方式二: [oracle@localhost ~]$ curl http://www.ip138.com/ip2city.asp | grep body | awk -F "[" '{print $2}'| awk -F "]' '{print $1}' 114.249.210.26 方式三: [wusx@centos245 CycleTaskManager]$ curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Addre…

2011-04-21 09:55 · linux shell · 评论(0)

shell 比较字符串是否相等

比较两个字符串是否相等的办法是: if [ "$test"x = "test"x ]; then 这里的关键有几点: 1 使用单个等号 2 注意到等号两边各有一个空格:这是unix shell的要求 3 注意到"$test"x最后的x,这是特意安排的,因为当$test为空的时候,上面的表达式就变成了x = testx,显然是不相等的。而如果没有这个x,表达式就会报错:[: =: unary operator expected 二元比较操作符,比较变量或者比较数字.注意数字与字符串的区别. 整数比较 -eq 等于,如:if [ "$a" -eq "$b" ] -ne 不等于,如:if [ "$…

2011-04-20 15:39 · linux shell · 评论(0)

shell 监控服务器联网状态

-rw-r--r-- 1 root root 1037 04-20 15:26 monitor_adsl_connect.log-rw-r--r-- 1 root root 1876 04-20 15:05 monitor_adsl_connect.sh -rw-r--r-- 1 root root 1664 04-20 14:39 monitor_adsl_connect.sh.bak -rw-r--r-- 1 root root 122 04-20 15:26 monitor.pid -rw-r--r-- 1 root root 300 04-20 15:12 status.log #!…

2011-04-20 15:34 · linux shell · 评论(0)

sql语句

如表: create table TEST_FOR_CYCLE_TASK_MANAGER( "ID" NUMBER not null, "SITE" VARCHAR2(1024), "ACCESS_DATE" VARCHAR2(16), "LINECOUNT" NUMBER, "VALID_LINECOUNT" NUMBER, "ALL_404" NUMBER, "GGBOT_404" NUMBER, "DAY_IP_COUNT" NUMBER, "ALL_IP_COUNT" NUMBER, "BANDWIDTH" NUMBER, "GGSEARCH_COUNT" NUMBER, "GGSE…

2011-04-19 10:48 · sql · 评论(0)

js 去重

Array.prototype.delRepeat=function(){ var newArray=[]; var provisionalTable = {}; for (var i = 0, item; (item= this[i]) != null; i++) { var s = typeof(item) + item; if (!provisionalTable[s]) { newArray.push(item); provisionalTable[s] = true; } } return newArray; } 详见: http://www.css88.com/archives/…

2011-04-18 14:54 · js · 评论(0)